public class PixelDataFormat extends Object
The pixel data format. This is an immutable object.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determines whether the specified
System.Object is equal to this instance. |
static PixelDataFormat |
getBgr(int bitsPerSample)
Gets BGR color with a specified number of bits per sample.
|
static PixelDataFormat |
getBgra(int bitsPerSample)
Gets BGRA color with a specified number of bits per sample.
|
int |
getBitsPerPixel()
Gets the bits per pixel.
|
String |
getCaption()
Gets the pixel data format caption.
|
int[] |
getChannelBits()
Gets the bits count for each channel.
|
int |
getChannelsCount()
Gets the channels count.
|
static PixelDataFormat |
getCieLab(int bitsPerL,
int bitsPerA,
int bitsPerB)
Gets CIE Lab color with a specified number of bits per sample.
|
static PixelDataFormat |
getCmyk()
Gets the
PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the cyan, magenta, yellow and black. |
static PixelDataFormat |
getCmyk(int bitsPerSample)
Gets CMYK color with a specified number of bits per sample.
|
static PixelDataFormat |
getCmyk(int bitsPerCyanChannel,
int bitsPerMagentaChannel,
int bitsPerYellowChannel,
int bitsPerKeyChannel)
Gets CMYK color with a specified number of bits per sample.
|
static PixelDataFormat |
getCmyka()
Gets the acmyk.
|
static PixelDataFormat |
getCmyka(int bitsPerCyanChannel,
int bitsPerMagentaChannel,
int bitsPerYellowChannel,
int bitsPerKeyChannel,
int bitsPerAlphaChannel)
Gets CMYKA color with a specified number of bits per sample.
|
static PixelDataFormat |
getGrayscale()
Gets the
PixelDataFormat defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval. |
static PixelDataFormat |
getGrayscale(int bitsPerSample)
Gets Grayscale color with a specified number of bits per sample.
|
static PixelDataFormat |
getGrayscaleAlpha()
Gets the
PixelDataFormat defined for 16 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval and additional 8 bit alpha component. |
static PixelDataFormat |
getGrayscaleAlpha(int bitsPerSample)
Gets GrayscaleAlpha color with a specified number of bits per sample.
|
static PixelDataFormat |
getGrayscaleAlpha(int bitsPerSample,
int alphaChannelBits)
Gets GrayscaleAlpha color with a specified number of bits per sample.
|
int |
getPixelFormat()
Gets the pixel format.
|
static PixelDataFormat |
getRgb(int bitsPerSample)
Gets RGB color with a specified number of bits per sample.
|
static PixelDataFormat |
getRgb(int bitsPerRedChannel,
int bitsPerGreenChannel,
int bitsPerBlueChannel)
Gets RGB color with a specified number of bits per sample.
|
static PixelDataFormat |
getRgb16Bpp555()
Gets the
PixelDataFormat defined for 16 bits per pixel with 5 bits for each of the red, green and blue, alpha is not defined. |
static PixelDataFormat |
getRgb16Bpp565()
Gets the
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. |
static PixelDataFormat |
getRgb24Bpp()
Gets the
PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined. |
static PixelDataFormat |
getRgb24BppPng()
Gets the
PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined. |
static PixelDataFormat |
getRgb32Bpp()
Gets the
PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue. |
static PixelDataFormat |
getRgba(int bitsPerSample)
Gets RGBA color with a specified number of bits per sample.
|
static PixelDataFormat |
getRgba(int bitsPerRedChannel,
int bitsPerGreenChannel,
int bitsPerBlueChannel,
int bitsPerAlphaChannel)
Gets RGBA color with a specified number of bits per sample.
|
static PixelDataFormat |
getRgba32Bpp()
Gets the
PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue. |
static PixelDataFormat |
getRgbIndexed(int bitsPerSample)
Gets BGRA indexed color with a specified number of bits per sample.
|
static PixelDataFormat |
getRgbIndexed1Bpp()
Gets the
PixelDataFormat defined for indexed 1 bit per color. |
static PixelDataFormat |
getRgbIndexed2Bpp()
Gets the
PixelDataFormat defined for indexed 2 bit per color. |
static PixelDataFormat |
getRgbIndexed4Bpp()
Gets the
PixelDataFormat defined for indexed 4 bit per color. |
static PixelDataFormat |
getRgbIndexed8Bpp()
Gets the
PixelDataFormat defined for indexed 8 bit per color. |
static PixelDataFormat |
getYCbCr()
Gets the
PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the luma, blue-difference and red-difference chroma components. |
static PixelDataFormat |
getYCbCr(int bitsPerSample)
Gets YCbCr color with a specified number of bits per sample.
|
static PixelDataFormat |
getYCbCr(int bitsPerY,
int bitsPerCb,
int bitsPerCr)
Gets YCbCr color with a specified number of bits per sample.
|
static PixelDataFormat |
getYcck()
Gets the
PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the luma, blue-difference, red-difference and black chroma components. |
static PixelDataFormat |
getYcck(int bitsPerSample)
Gets YCCK color with a specified number of bits per sample.
|
int |
hashCode()
Returns a hash code for this instance.
|
static boolean |
op_Equality(PixelDataFormat pixelFormat1,
PixelDataFormat pixelFormat2)
Returns result of equality for two
PixelDataFormat classes. |
static boolean |
op_Inequality(PixelDataFormat pixelFormat1,
PixelDataFormat pixelFormat2)
Returns result of non-equality for two
PixelDataFormat classes. |
String |
toString()
Returns a
System.String that represents this instance. |
public static PixelDataFormat getRgb32Bpp()
Gets the PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.
PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.public static PixelDataFormat getCmyk()
Gets the PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the cyan, magenta, yellow and black.
PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the cyan, magenta, yellow and black.public static PixelDataFormat getCmyka()
Gets the acmyk.
PixelDataFormat
defined for 40 bits per pixel with 8 bits for each of the alpha, cyan, magenta, yellow and black.public static PixelDataFormat getRgb24Bpp()
Gets the PixelDataFormat
defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined.
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 getRgb16Bpp555()
Gets the PixelDataFormat
defined for 16 bits per pixel with 5 bits for each of the red, green and blue, alpha is not defined.
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 getRgb16Bpp565()
Gets the 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.
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 getRgbIndexed8Bpp()
Gets the 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.
PixelDataFormat
defined for indexed 8 bit per color.public static PixelDataFormat getRgbIndexed4Bpp()
Gets the 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.
PixelDataFormat
defined for indexed 4 bit per color.public static PixelDataFormat getRgbIndexed2Bpp()
Gets the 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.
PixelDataFormat
defined for indexed 2 bit per color.public static PixelDataFormat getRgbIndexed1Bpp()
Gets the 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.
PixelDataFormat
defined for indexed 1 bit per color.public static PixelDataFormat getYCbCr()
Gets the PixelDataFormat
defined for 24 bits per pixel with 8 bits for each of the luma, blue-difference and red-difference chroma components.
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 getGrayscale()
Gets the PixelDataFormat
defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval.
PixelDataFormat
defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval.public static PixelDataFormat getYcck()
Gets the PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the luma, blue-difference, red-difference and black chroma components.
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 getRgba32Bpp()
Gets the PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.
PixelDataFormat
defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.public static PixelDataFormat getRgb24BppPng()
Gets the PixelDataFormat
defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined.
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 getGrayscaleAlpha()
Gets the PixelDataFormat
defined for 16 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval and additional 8 bit alpha component.
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 int getPixelFormat()
Gets the pixel format.
public int getBitsPerPixel()
Gets the bits per pixel.
public int getChannelsCount()
Gets the channels count.
public int[] getChannelBits()
Gets the bits count for each channel.
public String getCaption()
Gets the pixel data format caption.
public static PixelDataFormat getGrayscale(int bitsPerSample)
Gets Grayscale color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getGrayscaleAlpha(int bitsPerSample)
Gets GrayscaleAlpha color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getGrayscaleAlpha(int bitsPerSample, int alphaChannelBits)
Gets GrayscaleAlpha color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.alphaChannelBits
- The number of bits per sample in the alpha channel.public static PixelDataFormat getRgb(int bitsPerSample)
Gets RGB color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getRgb(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel)
Gets RGB color with a specified number of bits per sample.
bitsPerRedChannel
- The number of bits per Red channel.bitsPerGreenChannel
- The number of bits per Green channel.bitsPerBlueChannel
- The number of bits per Blue channel.public static PixelDataFormat getRgba(int bitsPerSample)
Gets RGBA color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getRgba(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel, int bitsPerAlphaChannel)
Gets RGBA color with a specified number of bits per sample.
bitsPerRedChannel
- The number of bits per Red channel.bitsPerGreenChannel
- The number of bits per Green channel.bitsPerBlueChannel
- The number of bits per Blue channel.bitsPerAlphaChannel
- The number of bits per Alpha channel.public static PixelDataFormat getRgbIndexed(int bitsPerSample)
Gets BGRA indexed color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getBgra(int bitsPerSample)
Gets BGRA color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getBgr(int bitsPerSample)
Gets BGR color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getYCbCr(int bitsPerSample)
Gets YCbCr color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getYCbCr(int bitsPerY, int bitsPerCb, int bitsPerCr)
Gets YCbCr color with a specified number of bits per sample.
bitsPerY
- The number of bits per Y channel.bitsPerCb
- The number of bits per Cb channel.bitsPerCr
- The number of bits per Cr channel.public static PixelDataFormat getCmyk(int bitsPerSample)
Gets CMYK color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getCmyk(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel)
Gets CMYK color with a specified number of bits per sample.
bitsPerCyanChannel
- The number of bits per Cyan channel.bitsPerMagentaChannel
- The number of bits per Magenta channel.bitsPerYellowChannel
- The number of bits per Yellow channel.bitsPerKeyChannel
- The number of bits per Key channel.public static PixelDataFormat getCmyka(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel, int bitsPerAlphaChannel)
Gets CMYKA color with a specified number of bits per sample.
bitsPerCyanChannel
- The number of bits per Cyan channel.bitsPerMagentaChannel
- The number of bits per Magenta channel.bitsPerYellowChannel
- The number of bits per Yellow channel.bitsPerKeyChannel
- The number of bits per Key channel.bitsPerAlphaChannel
- The number of bits per Alpha channel.public static PixelDataFormat getYcck(int bitsPerSample)
Gets YCCK color with a specified number of bits per sample.
bitsPerSample
- The number of bits per sample.public static PixelDataFormat getCieLab(int bitsPerL, int bitsPerA, int bitsPerB)
Gets CIE Lab color with a specified number of bits per sample.
bitsPerL
- The number of bits per L channel.bitsPerA
- The number of bits per A channel.bitsPerB
- The number of bits per B channel.public static boolean op_Inequality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)
Returns result of non-equality for two PixelDataFormat
classes.
pixelFormat1
- The first PixelDataFormat
to compare.pixelFormat2
- The second PixelDataFormat
to compare.pixelFormat1
and pixelFormat2
contain non-equal data or one of the parameters is null.public static boolean op_Equality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)
Returns result of equality for two PixelDataFormat
classes.
pixelFormat1
- The first PixelDataFormat
to compare.pixelFormat2
- The second PixelDataFormat
to compare.pixelFormat1
and pixelFormat2
contain equal data or both parameters are null.public boolean equals(Object obj)
Determines whether the specified System.Object
is equal to this instance.
public int hashCode()
Returns a hash code for this instance.