PixelDataFormat

Inheritance: java.lang.Object

public class PixelDataFormat

The pixel data format. This is an immutable object.

Fields

FieldDescription
GrayscaleGets the PixelDataFormat defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval.
Grayscale16Defined for 16 bits per pixel with up to 16 bits representing grayscale intensity.

Methods

MethodDescription
getRgb32Bpp()Gets the PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.
getCmyk()Gets the PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the cyan, magenta, yellow and black.
getCmyka()Gets the acmyk.
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.
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.
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.
getRgbIndexed8Bpp()Gets the PixelDataFormat defined for indexed 8 bit per color.
getRgbIndexed4Bpp()Gets the PixelDataFormat defined for indexed 4 bit per color.
getRgbIndexed2Bpp()Gets the PixelDataFormat defined for indexed 2 bit per color.
getRgbIndexed1Bpp()Gets the PixelDataFormat defined for indexed 1 bit per color.
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.
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.
getRgba32Bpp()Gets the PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.
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.
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.
getPixelFormat()Gets the pixel format.
getBitsPerPixel()Gets the bits per pixel.
getChannelsCount()Gets the channels count.
getChannelBits()Gets the bits count for each channel.
getCaption()Gets the pixel data format caption.
getGrayscale(int bitsPerSample)Gets Grayscale color with a specified number of bits per sample.
getGrayscaleAlpha(int bitsPerSample)Gets GrayscaleAlpha color with a specified number of bits per sample.
getGrayscaleAlpha(int bitsPerSample, int alphaChannelBits)Gets GrayscaleAlpha color with a specified number of bits per sample.
getRgb(int bitsPerSample)Gets RGB color with a specified number of bits per sample.
getRgb(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel)Gets RGB color with a specified number of bits per sample.
getRgba(int bitsPerSample)Gets RGBA color with a specified number of bits per sample.
getRgba(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel, int bitsPerAlphaChannel)Gets RGBA color with a specified number of bits per sample.
getRgbIndexed(int bitsPerSample)Gets BGRA indexed color with a specified number of bits per sample.
getBgra(int bitsPerSample)Gets BGRA color with a specified number of bits per sample.
getBgr(int bitsPerSample)Gets BGR color with a specified number of bits per sample.
getYCbCr(int bitsPerSample)Gets YCbCr color with a specified number of bits per sample.
getYCbCr(int bitsPerY, int bitsPerCb, int bitsPerCr)Gets YCbCr color with a specified number of bits per sample.
getCmyk(int bitsPerSample)Gets CMYK color with a specified number of bits per sample.
getCmyk(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel)Gets CMYK color with a specified number of bits per sample.
getCmyka(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel, int bitsPerAlphaChannel)Gets CMYKA color with a specified number of bits per sample.
getYcck(int bitsPerSample)Gets YCCK color with a specified number of bits per sample.
getCieLab(int bitsPerL, int bitsPerA, int bitsPerB)Gets CIE Lab color with a specified number of bits per sample.
op_Inequality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)Returns result of non-equality for two PixelDataFormat classes.
op_Equality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)Returns result of equality for two PixelDataFormat classes.
equals(Object obj)Determines whether the specified System.Object is equal to this instance.
hashCode()Returns a hash code for this instance.
toString()Returns a System.String that represents this instance.

Grayscale

public static final PixelDataFormat Grayscale

Gets the PixelDataFormat defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval.

Value: The PixelDataFormat defined for 8 bits per pixel with 8 bits representing grayscale intensity in the 0-255 interval.

Grayscale16

public static final PixelDataFormat Grayscale16

Defined for 16 bits per pixel with up to 16 bits representing grayscale intensity.

getRgb32Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.

getCmyk()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the cyan, magenta, yellow and black.

getCmyka()

public static PixelDataFormat getCmyka()

Gets the acmyk.

Returns: PixelDataFormat - The PixelDataFormat defined for 40 bits per pixel with 8 bits for each of the alpha, cyan, magenta, yellow and black.

getRgb24Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined.

getRgb16Bpp555()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 16 bits per pixel with 5 bits for each of the red, green and blue, alpha is not defined.

getRgb16Bpp565()

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.

Returns: PixelDataFormat - 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.

getRgbIndexed8Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for indexed 8 bit per color.

getRgbIndexed4Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for indexed 4 bit per color.

getRgbIndexed2Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for indexed 2 bit per color.

getRgbIndexed1Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for indexed 1 bit per color.

getYCbCr()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the luma, blue-difference and red-difference chroma components.

getYcck()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the luma, blue-difference, red-difference and black chroma components.

getRgba32Bpp()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 32 bits per pixel with 8 bits for each of the alpha, red, green and blue.

getRgb24BppPng()

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.

Returns: PixelDataFormat - The PixelDataFormat defined for 24 bits per pixel with 8 bits for each of the alpha, red, green and blue, alpha is not defined.

getGrayscaleAlpha()

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.

Returns: PixelDataFormat - 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.

getPixelFormat()

public int getPixelFormat()

Gets the pixel format.

Returns: int - The pixel format.

getBitsPerPixel()

public int getBitsPerPixel()

Gets the bits per pixel.

Returns: int - The bits per pixel.

getChannelsCount()

public int getChannelsCount()

Gets the channels count.

Returns: int - The channels count.

getChannelBits()

public int[] getChannelBits()

Gets the bits count for each channel.

Returns: int[] - The channel bits.

getCaption()

public String getCaption()

Gets the pixel data format caption.

Returns: java.lang.String

getGrayscale(int bitsPerSample)

public static PixelDataFormat getGrayscale(int bitsPerSample)

Gets Grayscale color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The Grayscale color.

getGrayscaleAlpha(int bitsPerSample)

public static PixelDataFormat getGrayscaleAlpha(int bitsPerSample)

Gets GrayscaleAlpha color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The GrayscaleAlpha color.

getGrayscaleAlpha(int bitsPerSample, int alphaChannelBits)

public static PixelDataFormat getGrayscaleAlpha(int bitsPerSample, int alphaChannelBits)

Gets GrayscaleAlpha color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.
alphaChannelBitsintThe number of bits per sample in the alpha channel.

Returns: PixelDataFormat - The GrayscaleAlpha color.

getRgb(int bitsPerSample)

public static PixelDataFormat getRgb(int bitsPerSample)

Gets RGB color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The RGB color.

getRgb(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel)

public static PixelDataFormat getRgb(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel)

Gets RGB color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerRedChannelintThe number of bits per Red channel.
bitsPerGreenChannelintThe number of bits per Green channel.
bitsPerBlueChannelintThe number of bits per Blue channel.

Returns: PixelDataFormat - The RGB color.

getRgba(int bitsPerSample)

public static PixelDataFormat getRgba(int bitsPerSample)

Gets RGBA color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The RGBA color.

getRgba(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel, int bitsPerAlphaChannel)

public static PixelDataFormat getRgba(int bitsPerRedChannel, int bitsPerGreenChannel, int bitsPerBlueChannel, int bitsPerAlphaChannel)

Gets RGBA color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerRedChannelintThe number of bits per Red channel.
bitsPerGreenChannelintThe number of bits per Green channel.
bitsPerBlueChannelintThe number of bits per Blue channel.
bitsPerAlphaChannelintThe number of bits per Alpha channel.

Returns: PixelDataFormat - The RGBA color.

getRgbIndexed(int bitsPerSample)

public static PixelDataFormat getRgbIndexed(int bitsPerSample)

Gets BGRA indexed color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The BGRA color.

getBgra(int bitsPerSample)

public static PixelDataFormat getBgra(int bitsPerSample)

Gets BGRA color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The BGRA color.

getBgr(int bitsPerSample)

public static PixelDataFormat getBgr(int bitsPerSample)

Gets BGR color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The BGR color.

getYCbCr(int bitsPerSample)

public static PixelDataFormat getYCbCr(int bitsPerSample)

Gets YCbCr color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The YCbCr color.

getYCbCr(int bitsPerY, int bitsPerCb, int bitsPerCr)

public static PixelDataFormat getYCbCr(int bitsPerY, int bitsPerCb, int bitsPerCr)

Gets YCbCr color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerYintThe number of bits per Y channel.
bitsPerCbintThe number of bits per Cb channel.
bitsPerCrintThe number of bits per Cr channel.

Returns: PixelDataFormat - The YCbCr color.

getCmyk(int bitsPerSample)

public static PixelDataFormat getCmyk(int bitsPerSample)

Gets CMYK color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The CMYK color.

getCmyk(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel)

public static PixelDataFormat getCmyk(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel)

Gets CMYK color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerCyanChannelintThe number of bits per Cyan channel.
bitsPerMagentaChannelintThe number of bits per Magenta channel.
bitsPerYellowChannelintThe number of bits per Yellow channel.
bitsPerKeyChannelintThe number of bits per Key channel.

Returns: PixelDataFormat - The CMYK color.

getCmyka(int bitsPerCyanChannel, int bitsPerMagentaChannel, int bitsPerYellowChannel, int bitsPerKeyChannel, int bitsPerAlphaChannel)

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.

Parameters:

ParameterTypeDescription
bitsPerCyanChannelintThe number of bits per Cyan channel.
bitsPerMagentaChannelintThe number of bits per Magenta channel.
bitsPerYellowChannelintThe number of bits per Yellow channel.
bitsPerKeyChannelintThe number of bits per Key channel.
bitsPerAlphaChannelintThe number of bits per Alpha channel.

Returns: PixelDataFormat - The CMYK color.

getYcck(int bitsPerSample)

public static PixelDataFormat getYcck(int bitsPerSample)

Gets YCCK color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerSampleintThe number of bits per sample.

Returns: PixelDataFormat - The YCCK color.

getCieLab(int bitsPerL, int bitsPerA, int bitsPerB)

public static PixelDataFormat getCieLab(int bitsPerL, int bitsPerA, int bitsPerB)

Gets CIE Lab color with a specified number of bits per sample.

Parameters:

ParameterTypeDescription
bitsPerLintThe number of bits per L channel.
bitsPerAintThe number of bits per A channel.
bitsPerBintThe number of bits per B channel.

Returns: PixelDataFormat - The CIE Lab color.

op_Inequality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)

public static boolean op_Inequality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)

Returns result of non-equality for two PixelDataFormat classes.

Parameters:

ParameterTypeDescription
pixelFormat1PixelDataFormatThe first PixelDataFormat to compare.
pixelFormat2PixelDataFormatThe second PixelDataFormat to compare.

Returns: boolean - True if both pixelFormat1 and pixelFormat2 contain non-equal data or one of the parameters is null.

op_Equality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)

public static boolean op_Equality(PixelDataFormat pixelFormat1, PixelDataFormat pixelFormat2)

Returns result of equality for two PixelDataFormat classes.

Parameters:

ParameterTypeDescription
pixelFormat1PixelDataFormatThe first PixelDataFormat to compare.
pixelFormat2PixelDataFormatThe second PixelDataFormat to compare.

Returns: boolean - True if both pixelFormat1 and pixelFormat2 contain equal data or both parameters are null.

equals(Object obj)

public boolean equals(Object obj)

Determines whether the specified System.Object is equal to this instance.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe System.Object to compare with this instance.

Returns: boolean - true if the specified System.Object is equal to this instance; otherwise, false.

hashCode()

public int hashCode()

Returns a hash code for this instance.

Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

toString()

public String toString()

Returns a System.String that represents this instance.

Returns: java.lang.String - A System.String that represents this instance.