Class PixelDataFormat
Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.2.0)
The pixel data format. This is an immutable object.
[JsonObject(MemberSerialization.OptIn)]
public class PixelDataFormat
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Fields
Grayscale
Gets the Aspose.Imaging.PixelDataFormat defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval.
public static PixelDataFormat Grayscale
Field Value
Grayscale16
Defined for 16 bits per pixel with up to 16 bits representing grayscale intensity.
public static readonly PixelDataFormat Grayscale16
Field Value
Properties
BitsPerPixel
Gets the bits per pixel.
public int BitsPerPixel { get; }
Property Value
Caption
Gets the pixel data format caption.
public string Caption { get; }
Property Value
ChannelBits
Gets the bits count for each channel.
public int[] ChannelBits { get; }
Property Value
int[]
ChannelsCount
Gets the channels count.
public int ChannelsCount { get; }
Property Value
Cmyk
Gets the Aspose.Imaging.PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the cyan, magenta, yellow and black.
public static PixelDataFormat Cmyk { get; }
Property Value
Cmyka
Gets the acmyk.
public static PixelDataFormat Cmyka { get; }
Property Value
GrayscaleAlpha
Gets the Aspose.Imaging.PixelDataFormat defined for 16 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval and additional 8 bit alpha component.
public static PixelDataFormat GrayscaleAlpha { get; }
Property Value
PixelFormat
Gets the pixel format.
public PixelFormat PixelFormat { get; }
Property Value
Rgb16Bpp555
Gets the Aspose.Imaging.PixelDataFormat defined for 16 bits per pixel with 5 bits for each of the red, green and blue, alpha is not defined.
public static PixelDataFormat Rgb16Bpp555 { get; }
Property Value
Rgb16Bpp565
Gets the Aspose.Imaging.PixelDataFormat defined for 16 bits per pixel with 5 bits for red, 6 bits for green and 5 bits for blue, alpha is not defined.
public static PixelDataFormat Rgb16Bpp565 { get; }
Property Value
Rgb24Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined.
public static PixelDataFormat Rgb24Bpp { get; }
Property Value
Rgb24BppPng
Gets the Aspose.Imaging.PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined.
public static PixelDataFormat Rgb24BppPng { get; }
Property Value
Rgb32Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.
public static PixelDataFormat Rgb32Bpp { get; }
Property Value
RgbIndexed1Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for indexed 1 bit per color. The indexed pixel data storage is intended to allow data storage and retrieval everywhere the color palette is used. Use with caution, because may require conversion from one palette to another or from RGBA to indexed color model.
public static PixelDataFormat RgbIndexed1Bpp { get; }
Property Value
RgbIndexed2Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for indexed 2 bit per color. The indexed pixel data storage is intended to allow data storage and retrieval everywhere the color palette is used. Use with caution, because may require conversion from one palette to another or from RGBA to indexed color model.
public static PixelDataFormat RgbIndexed2Bpp { get; }
Property Value
RgbIndexed4Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for indexed 4 bit per color. The indexed pixel data storage is intended to allow data storage and retrieval everywhere the color palette is used. Use with caution, because may require conversion from one palette to another or from RGBA to indexed color model.
public static PixelDataFormat RgbIndexed4Bpp { get; }
Property Value
RgbIndexed8Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for indexed 8 bit per color. The indexed pixel data storage is intended to allow data storage and retrieval everywhere the color palette is used. Use with caution, because may require conversion from one palette to another or from RGBA to indexed color model.
public static PixelDataFormat RgbIndexed8Bpp { get; }
Property Value
Rgba32Bpp
Gets the Aspose.Imaging.PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.
public static PixelDataFormat Rgba32Bpp { get; }
Property Value
YCbCr
Gets the Aspose.Imaging.PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the luma, blue-difference and red-difference chroma components.
public static PixelDataFormat YCbCr { get; }
Property Value
Ycck
Gets the Aspose.Imaging.PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the luma, blue-difference, red-difference and black chroma components.
public static PixelDataFormat Ycck { get; }
Property Value
Methods
Equals(object)
Determines whether the specified System.Object is equal to this instance.
public override bool Equals(object obj)
Parameters
obj
object
The System.Object to compare with this instance.
Returns
true
if the specified System.Object is equal to this instance; otherwise, false
.
GetBgr(int)
Gets BGR color with a specified number of bits per sample.
public static PixelDataFormat GetBgr(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The BGR color.
GetBgra(int)
Gets BGRA color with a specified number of bits per sample.
public static PixelDataFormat GetBgra(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The BGRA color.
GetCieLab(int, int, int)
Gets CIE Lab color with a specified number of bits per sample.
public static PixelDataFormat GetCieLab(int bitsPerL, int bitsPerA, int bitsPerB)
Parameters
bitsPerL
int
The number of bits per L channel.
bitsPerA
int
The number of bits per A channel.
bitsPerB
int
The number of bits per B channel.
Returns
The CIE Lab color.
GetCmyk(int)
Gets CMYK color with a specified number of bits per sample.
public static PixelDataFormat GetCmyk(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The CMYK color.
GetCmyk(int, int, int, int)
Gets CMYK color with a specified number of bits per sample.
public static PixelDataFormat GetCmyk(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel)
Parameters
bitsPerCyanChannel
int
The number of bits per Cyan channel.
bitsPerMagentaChannel
int
The number of bits per Magenta channel.
bitsPerYellowChannel
int
The number of bits per Yellow channel.
bitsPerKeyChannel
int
The number of bits per Key channel.
Returns
The CMYK color.
GetCmyka(int, int, int, int, int)
Gets CMYKA color with a specified number of bits per sample.
public static PixelDataFormat GetCmyka(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel, int bitsPerAlphaChannel)
Parameters
bitsPerCyanChannel
int
The number of bits per Cyan channel.
bitsPerMagentaChannel
int
The number of bits per Magenta channel.
bitsPerYellowChannel
int
The number of bits per Yellow channel.
bitsPerKeyChannel
int
The number of bits per Key channel.
bitsPerAlphaChannel
int
The number of bits per Alpha channel.
Returns
The CMYK color.
GetGrayscale(int)
Gets Grayscale color with a specified number of bits per sample.
public static PixelDataFormat GetGrayscale(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The Grayscale color.
GetGrayscaleAlpha(int)
Gets GrayscaleAlpha color with a specified number of bits per sample.
public static PixelDataFormat GetGrayscaleAlpha(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The GrayscaleAlpha color.
GetGrayscaleAlpha(int, int)
Gets GrayscaleAlpha color with a specified number of bits per sample.
public static PixelDataFormat GetGrayscaleAlpha(int bitsPerSample, int alphaChannelBits)
Parameters
bitsPerSample
int
The number of bits per sample.
alphaChannelBits
int
The number of bits per sample in the alpha channel.
Returns
The GrayscaleAlpha color.
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
GetRgb(int)
Gets RGB color with a specified number of bits per sample.
public static PixelDataFormat GetRgb(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The RGB color.
GetRgb(int, int, int)
Gets RGB color with a specified number of bits per sample.
public static PixelDataFormat GetRgb(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel)
Parameters
bitsPerRedChannel
int
The number of bits per Red channel.
bitsPerGreenChannel
int
The number of bits per Green channel.
bitsPerBlueChannel
int
The number of bits per Blue channel.
Returns
The RGB color.
GetRgbIndexed(int)
Gets BGRA indexed color with a specified number of bits per sample.
public static PixelDataFormat GetRgbIndexed(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The BGRA color.
GetRgba(int)
Gets RGBA color with a specified number of bits per sample.
public static PixelDataFormat GetRgba(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The RGBA color.
GetRgba(int, int, int, int)
Gets RGBA color with a specified number of bits per sample.
public static PixelDataFormat GetRgba(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel, int bitsPerAlphaChannel)
Parameters
bitsPerRedChannel
int
The number of bits per Red channel.
bitsPerGreenChannel
int
The number of bits per Green channel.
bitsPerBlueChannel
int
The number of bits per Blue channel.
bitsPerAlphaChannel
int
The number of bits per Alpha channel.
Returns
The RGBA color.
GetYCbCr(int)
Gets YCbCr color with a specified number of bits per sample.
public static PixelDataFormat GetYCbCr(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The YCbCr color.
GetYCbCr(int, int, int)
Gets YCbCr color with a specified number of bits per sample.
public static PixelDataFormat GetYCbCr(int bitsPerY, int bitsPerCb, int bitsPerCr)
Parameters
bitsPerY
int
The number of bits per Y channel.
bitsPerCb
int
The number of bits per Cb channel.
bitsPerCr
int
The number of bits per Cr channel.
Returns
The YCbCr color.
GetYcck(int)
Gets YCCK color with a specified number of bits per sample.
public static PixelDataFormat GetYcck(int bitsPerSample)
Parameters
bitsPerSample
int
The number of bits per sample.
Returns
The YCCK color.
ToString()
Returns a System.String that represents this instance.
public override string ToString()
Returns
A System.String that represents this instance.
Operators
operator ==(PixelDataFormat, PixelDataFormat)
Returns result of equality for two Aspose.Imaging.PixelDataFormat classes.
public static bool operator ==(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)
Parameters
pixelFormat1
PixelDataFormat
The first Aspose.Imaging.PixelDataFormat to compare.
pixelFormat2
PixelDataFormat
The second Aspose.Imaging.PixelDataFormat to compare.
Returns
True if both pixelFormat1
and pixelFormat2
contain equal data or both parameters are null.
operator !=(PixelDataFormat, PixelDataFormat)
Returns result of non-equality for two Aspose.Imaging.PixelDataFormat classes.
public static bool operator !=(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)
Parameters
pixelFormat1
PixelDataFormat
The first Aspose.Imaging.PixelDataFormat to compare.
pixelFormat2
PixelDataFormat
The second Aspose.Imaging.PixelDataFormat to compare.
Returns
True if both pixelFormat1
and pixelFormat2
contain non-equal data or one of the parameters is null.