PixelFormatInfo Structure
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.2.0
public struct PixelFormatInfo : IEquatable<PixelFormatInfo>
Public Structure PixelFormatInfo
Implements IEquatable(Of PixelFormatInfo)
public value class PixelFormatInfo : IEquatable<PixelFormatInfo>
[<SealedAttribute>]
type PixelFormatInfo =
struct
inherit ValueType
interface IEquatable<PixelFormatInfo>
end
- Inheritance
- Object ValueType PixelFormatInfo
- Implements
- IEquatablePixelFormatInfo
BitsPerPixel |
Gets or sets the bits per pixel value of this PixelFormatInfo.
Supported range is 1..128 (or 1..16 for Indexed formats). Typical values are powers of two but any value is supported.
|
Grayscale |
Gets or sets whether the represented pixel format is a grayscale one.
For Indexed formats this property can be because grayscale nature is determined by the current palette.
Setting this property for non-indexed custom grayscale formats helps to auto select the preferable strategy for some operations such as dithering.
|
HasAlpha |
Gets or sets whether the represented pixel format has an alpha channel (transparency).
For Indexed formats this property can be because alpha support is determined by the current palette.
Setting this property to resets also the HasPremultipliedAlpha and HasSingleBitAlpha properties.
|
HasPremultipliedAlpha |
Gets or sets whether the represented pixel format uses premultiplied alpha.
Setting this property to sets also the HasAlpha property.
|
HasSingleBitAlpha |
Gets or sets whether the represented pixel format supports single-bit alpha only (a pixel is either completely transparent or completely opaque).
Setting this property to sets also the HasAlpha property.
It is not mandatory to set this property for custom single-bit alpha formats but it helps optimizing some drawing operations.
|
Indexed |
Gets or sets whether the represented pixel format is an indexed one.
An indexed format is not expected to have more than 16 BitsPerPixel (up to 65536 color entries).
|
IsCustomFormat |
Gets whether the represented pixel format is a custom one. That is, when this PixelFormatInfo
was not instantiated by its constructor with a KnownPixelFormat parameter
or one of its properties have been set since then.
|
LinearGamma |
Gets or sets whether the represented pixel format has linear gamma.
For Indexed formats this property should be because it can be configured
at the Palette constructors and factory methods whether the palette should work in the linear color space.
If the IBitmapData.WorkingColorSpace property returns Default,
then the value of this property may affect the selected color space of some operations.
|
Prefers128BitColors |
Gets or sets whether the represented pixel format prefers 128-bit colors (ColorF, or PColorF
if HasPremultipliedAlpha is also set) when getting or setting pixels. Some operations may consider the value of this property.
Setting this property to resets the Prefers64BitColors property.
|
Prefers64BitColors |
Gets or sets whether the represented pixel format prefers 64-bit colors (Color64, or PColor64
if HasPremultipliedAlpha is also set) when getting or setting pixels. Some operations may consider the value of this property.
Setting this property to resets the Prefers128BitColors property.
If LinearGamma is also set, then some writing operations may prefer using ColorF or PColorF types
regardless of this property.
|