APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.imageio

public Class ImageTypeSpecifier

extends Object
Class Inheritance
Known Direct Subclasses
javax.imageio.ImageTypeSpecifier.Packed, javax.imageio.ImageTypeSpecifier.Interleaved, javax.imageio.ImageTypeSpecifier.Banded, javax.imageio.ImageTypeSpecifier.Grayscale, javax.imageio.ImageTypeSpecifier.Indexed
Imports
java.awt.Point, .Transparency, java.awt.image.BandedSampleModel, .BufferedImage, .ColorModel, .IndexColorModel, .ComponentColorModel, .DataBuffer, .DirectColorModel, .MultiPixelPackedSampleModel, .PixelInterleavedSampleModel, .SinglePixelPackedSampleModel, .Raster, .RenderedImage, .SampleModel, .WritableRaster, java.awt.color.ColorSpace, java.util.Hashtable

A class that allows the format of an image (in particular, its SampleModel and ColorModel) to be specified in a convenient manner.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static ImageTypeSpecifier[]
BISpecifier

Cached specifiers for all of the standard BufferedImage types.

protected ColorModel
colorModel

The ColorModel to be used as a prototype.

protected SampleModel
sampleModel

A SampleModel to be used as a prototype.

private static ColorSpace

Constructor Summary

AccessConstructor and Description
private
ImageTypeSpecifier()

A constructor to be used by inner subclasses only.

public
ImageTypeSpecifier(ColorModel
a ColorModel.
colorModel
,
SampleModel
a SampleModel.
sampleModel
)

Constructs an ImageTypeSpecifier directly from a ColorModel and a SampleModel.

public
ImageTypeSpecifier(RenderedImage
a RenderedImage.
image
)

Constructs an ImageTypeSpecifier from a RenderedImage.

Method Summary

Modifier and TypeMethod and Description
public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createBanded
(ColorSpace
the desired ColorSpace.
colorSpace
,
int[]
an array of ints indicating the bank in which each band will be stored.
bankIndices
,
int[]
an array of ints indicating the starting offset of each band within its bank.
bandOffsets
,
int
the desired data type, as one of the enumerations from the DataBuffer class.
dataType
,
boolean
true if an alpha channel is desired.
hasAlpha
,
boolean
true if the color channels will be premultipled by the alpha channel.
isAlphaPremultiplied
)

Returns a specifier for a banded image format that will use a ComponentColorModel and a BandedSampleModel to store each channel in a separate array.

public BufferedImage

Returns:

a new BufferedImage
createBufferedImage
(int
the desired width of the returned BufferedImage.
width
,
int
the desired height of the returned BufferedImage.
height
)

Creates a BufferedImage with a given width and height according to the specification embodied in this object.

pack-priv static ColorModel
createComponentCM(ColorSpace colorSpace, int numBands, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createFromBufferedImageType
(int
an int representing one of the standard BufferedImage types.
bufferedImageType
)

Returns an ImageTypeSpecifier that encodes one of the standard BufferedImage types (other than TYPE_CUSTOM).

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createFromRenderedImage
(RenderedImage
a RenderedImage.
image
)

Returns an ImageTypeSpecifier that encodes the layout of a RenderedImage (which may be a BufferedImage).

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createGrayscale
(int
the number of bits per gray value (1, 2, 4, 8, or 16).
bits
,
int
the desired data type, as one of the enumerations from the DataBuffer class.
dataType
,
boolean
true if negative values are to be represented.
isSigned
)

Returns a specifier for a grayscale image format that will pack pixels of the given bit depth into array elements of the specified data type.

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createGrayscale
(int
the number of bits per gray value (1, 2, 4, 8, or 16).
bits
,
int
the desired data type, as one of the enumerations from the DataBuffer class.
dataType
,
boolean
true if negative values are to be represented.
isSigned
,
boolean
true if the luminance channel will be premultipled by the alpha channel.
isAlphaPremultiplied
)

Returns a specifier for a grayscale plus alpha image format that will pack pixels of the given bit depth into array elements of the specified data type.

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createIndexed
(byte[]
an array of bytes containing the red values for each index.
redLUT
,
byte[]
an array of bytes containing * the green values for each index.
greenLUT
,
byte[]
an array of bytes containing the blue values for each index.
blueLUT
,
byte[]
an array of bytes containing the alpha values for each index, or null to create a fully opaque LUT.
alphaLUT
,
int
the number of bits in each index.
bits
,
int
the desired output type, as one of the enumerations from the DataBuffer class.
dataType
)

Returns a specifier for an indexed-color image format that will pack index values of the given bit depth into array elements of the specified data type.

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createInterleaved
(ColorSpace
the desired ColorSpace.
colorSpace
,
int[]
an array of ints indicating the offsets for each band.
bandOffsets
,
int
the desired data type, as one of the enumerations from the DataBuffer class.
dataType
,
boolean
true if an alpha channel is desired.
hasAlpha
,
boolean
true if the color channels will be premultipled by the alpha channel.
isAlphaPremultiplied
)

Returns a specifier for an interleaved image format that will use a ComponentColorModel and a PixelInterleavedSampleModel to store each pixel component in a separate byte, short, or int.

public static ImageTypeSpecifier

Returns:

an ImageTypeSpecifier with the desired characteristics.
createPacked
(ColorSpace
the desired ColorSpace.
colorSpace
,
int
a contiguous mask indicated the position of the red channel.
redMask
,
int
a contiguous mask indicated the position of the green channel.
greenMask
,
int
a contiguous mask indicated the position of the blue channel.
blueMask
,
int
a contiguous mask indicated the position of the alpha channel.
alphaMask
,
int
the desired SampleModel transfer type.
transferType
,
boolean
true if the color channels will be premultipled by the alpha channel.
isAlphaPremultiplied
)

Returns a specifier for a packed image format that will use a DirectColorModel and a packed SampleModel to store each pixel packed into in a single byte, short, or int.

private static ImageTypeSpecifier
createSpecifier(int type)

public boolean

Returns:

true if the given object is an equivalent ImageTypeSpecifier.
equals
(Object
the Object to be compared for equality.
o
)

Overrides java.lang.Object.equals.

Returns true if the given Object is an ImageTypeSpecifier and has a SampleModel and ColorModel that are equal to those of this object.

public int

Returns:

an int specifying a number of bits.
getBitsPerBand
(int
the index of the band to be queried, as an int.
band
)

Return the number of bits used to represent samples of the given band.

public int

Returns:

an int representing a BufferedImage type.
getBufferedImageType
()

Returns an int containing one of the enumerated constant values describing image formats from BufferedImage.

public ColorModel

Returns:

a ColorModel.
getColorModel
()

Returns the ColorModel specified by this object.

public int

Returns:

the number of bands in the image.
getNumBands
()

Return the number of bands specified by this object.

public int

Returns:

the number of components in the image.
getNumComponents
()

Return the number of color components specified by this object.

public SampleModel

Returns:

a SampleModel with arbitrary dimensions.
getSampleModel
()

Returns a SampleModel based on the settings encapsulated within this object.

public SampleModel

Returns:

a SampleModel with the given dimensions.
getSampleModel
(int
the desired width of the returned SampleModel.
width
,
int
the desired height of the returned SampleModel.
height
)

Returns a SampleModel based on the settings encapsulated within this object.

private static ImageTypeSpecifier
getSpecifier(int type)

public int

Returns:

a hash code for this ImageTypeSpecifier
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code for this ImageTypeSpecifier.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

BISpecifierback to summary
private static ImageTypeSpecifier[] BISpecifier

Cached specifiers for all of the standard BufferedImage types.

colorModelback to summary
protected ColorModel colorModel

The ColorModel to be used as a prototype.

sampleModelback to summary
protected SampleModel sampleModel

A SampleModel to be used as a prototype.

sRGBback to summary
private static ColorSpace sRGB

Constructor Detail

ImageTypeSpecifierback to summary
private ImageTypeSpecifier()

A constructor to be used by inner subclasses only.

ImageTypeSpecifierback to summary
public ImageTypeSpecifier(ColorModel colorModel, SampleModel sampleModel)

Constructs an ImageTypeSpecifier directly from a ColorModel and a SampleModel. It is the caller's responsibility to supply compatible parameters.

Parameters
colorModel:ColorModel

a ColorModel.

sampleModel:SampleModel

a SampleModel.

Exceptions
IllegalArgumentException:
  • if either parameter is null.
  • if sampleModel is not compatible with colorModel.
ImageTypeSpecifierback to summary
public ImageTypeSpecifier(RenderedImage image)

Constructs an ImageTypeSpecifier from a RenderedImage. If a BufferedImage is being used, one of the factory methods createFromRenderedImage or createFromBufferedImageType should be used instead in order to get a more accurate result.

Parameters
image:RenderedImage

a RenderedImage.

Exceptions
IllegalArgumentException:
if the argument is null.

Method Detail

createBandedback to summary
public static ImageTypeSpecifier createBanded(ColorSpace colorSpace, int[] bankIndices, int[] bandOffsets, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

Returns a specifier for a banded image format that will use a ComponentColorModel and a BandedSampleModel to store each channel in a separate array.

Parameters
colorSpace:ColorSpace

the desired ColorSpace.

bankIndices:int[]

an array of ints indicating the bank in which each band will be stored.

bandOffsets:int[]

an array of ints indicating the starting offset of each band within its bank.

dataType:int

the desired data type, as one of the enumerations from the DataBuffer class.

hasAlpha:boolean

true if an alpha channel is desired.

isAlphaPremultiplied:boolean

true if the color channels will be premultipled by the alpha channel.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
  • if colorSpace is null.
  • if bankIndices is null.
  • if bandOffsets is null.
  • if the lengths of bankIndices and bandOffsets differ.
  • if bandOffsets.length does not equal the number of color space components, plus 1 if hasAlpha is true.
  • if dataType is not one of the legal DataBuffer.TYPE_* constants.
createBufferedImageback to summary
public BufferedImage createBufferedImage(int width, int height)

Creates a BufferedImage with a given width and height according to the specification embodied in this object.

Parameters
width:int

the desired width of the returned BufferedImage.

height:int

the desired height of the returned BufferedImage.

Returns:BufferedImage

a new BufferedImage

Exceptions
IllegalArgumentException:
  • if either width or height are negative or zero.
  • if the product of width and height is greater than Integer.MAX_VALUE, or if the number of array elements needed to store the image is greater than Integer.MAX_VALUE.
createComponentCMback to summary
pack-priv static ColorModel createComponentCM(ColorSpace colorSpace, int numBands, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)
createFromBufferedImageTypeback to summary
public static ImageTypeSpecifier createFromBufferedImageType(int bufferedImageType)

Returns an ImageTypeSpecifier that encodes one of the standard BufferedImage types (other than TYPE_CUSTOM).

Parameters
bufferedImageType:int

an int representing one of the standard BufferedImage types.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
if bufferedImageType is not one of the standard types, or is equal to TYPE_CUSTOM.
See Also
java.awt.image.BufferedImage, java.awt.image.BufferedImage#TYPE_INT_RGB, java.awt.image.BufferedImage#TYPE_INT_ARGB, java.awt.image.BufferedImage#TYPE_INT_ARGB_PRE, java.awt.image.BufferedImage#TYPE_INT_BGR, java.awt.image.BufferedImage#TYPE_3BYTE_BGR, java.awt.image.BufferedImage#TYPE_4BYTE_ABGR, java.awt.image.BufferedImage#TYPE_4BYTE_ABGR_PRE, java.awt.image.BufferedImage#TYPE_USHORT_565_RGB, java.awt.image.BufferedImage#TYPE_USHORT_555_RGB, java.awt.image.BufferedImage#TYPE_BYTE_GRAY, java.awt.image.BufferedImage#TYPE_USHORT_GRAY, java.awt.image.BufferedImage#TYPE_BYTE_BINARY, java.awt.image.BufferedImage#TYPE_BYTE_INDEXED
createFromRenderedImageback to summary
public static ImageTypeSpecifier createFromRenderedImage(RenderedImage image)

Returns an ImageTypeSpecifier that encodes the layout of a RenderedImage (which may be a BufferedImage).

Parameters
image:RenderedImage

a RenderedImage.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
if image is null.
createGrayscaleback to summary
public static ImageTypeSpecifier createGrayscale(int bits, int dataType, boolean isSigned)

Returns a specifier for a grayscale image format that will pack pixels of the given bit depth into array elements of the specified data type.

Parameters
bits:int

the number of bits per gray value (1, 2, 4, 8, or 16).

dataType:int

the desired data type, as one of the enumerations from the DataBuffer class.

isSigned:boolean

true if negative values are to be represented.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
  • if bits is not one of 1, 2, 4, 8, or 16.
  • if dataType is not one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_SHORT, or DataBuffer.TYPE_USHORT.
  • if bits is larger than the bit size of the given dataType.
createGrayscaleback to summary
public static ImageTypeSpecifier createGrayscale(int bits, int dataType, boolean isSigned, boolean isAlphaPremultiplied)

Returns a specifier for a grayscale plus alpha image format that will pack pixels of the given bit depth into array elements of the specified data type.

Parameters
bits:int

the number of bits per gray value (1, 2, 4, 8, or 16).

dataType:int

the desired data type, as one of the enumerations from the DataBuffer class.

isSigned:boolean

true if negative values are to be represented.

isAlphaPremultiplied:boolean

true if the luminance channel will be premultipled by the alpha channel.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
  • if bits is not one of 1, 2, 4, 8, or 16.
  • if dataType is not one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_SHORT, or DataBuffer.TYPE_USHORT.
  • if bits is larger than the bit size of the given dataType.
createIndexedback to summary
public static ImageTypeSpecifier createIndexed(byte[] redLUT, byte[] greenLUT, byte[] blueLUT, byte[] alphaLUT, int bits, int dataType)

Returns a specifier for an indexed-color image format that will pack index values of the given bit depth into array elements of the specified data type.

Parameters
redLUT:byte[]

an array of bytes containing the red values for each index.

greenLUT:byte[]

an array of bytes containing * the green values for each index.

blueLUT:byte[]

an array of bytes containing the blue values for each index.

alphaLUT:byte[]

an array of bytes containing the alpha values for each index, or null to create a fully opaque LUT.

bits:int

the number of bits in each index.

dataType:int

the desired output type, as one of the enumerations from the DataBuffer class.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
  • if redLUT is null.
  • if greenLUT is null.
  • if blueLUT is null.
  • if bits is not one of 1, 2, 4, 8, or 16.
  • if the non-null LUT parameters do not have lengths of exactly 1 << bits.
  • if dataType is not one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_SHORT, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
  • if bits is larger than the bit size of the given dataType.
createInterleavedback to summary
public static ImageTypeSpecifier createInterleaved(ColorSpace colorSpace, int[] bandOffsets, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

Returns a specifier for an interleaved image format that will use a ComponentColorModel and a PixelInterleavedSampleModel to store each pixel component in a separate byte, short, or int.

Parameters
colorSpace:ColorSpace

the desired ColorSpace.

bandOffsets:int[]

an array of ints indicating the offsets for each band.

dataType:int

the desired data type, as one of the enumerations from the DataBuffer class.

hasAlpha:boolean

true if an alpha channel is desired.

isAlphaPremultiplied:boolean

true if the color channels will be premultipled by the alpha channel.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
  • if colorSpace is null.
  • if bandOffsets is null.
  • if dataType is not one of the legal DataBuffer.TYPE_* constants.
  • if bandOffsets.length does not equal the number of color space components, plus 1 if hasAlpha is true.
createPackedback to summary
public static ImageTypeSpecifier createPacked(ColorSpace colorSpace, int redMask, int greenMask, int blueMask, int alphaMask, int transferType, boolean isAlphaPremultiplied)

Returns a specifier for a packed image format that will use a DirectColorModel and a packed SampleModel to store each pixel packed into in a single byte, short, or int.

Parameters
colorSpace:ColorSpace

the desired ColorSpace.

redMask:int

a contiguous mask indicated the position of the red channel.

greenMask:int

a contiguous mask indicated the position of the green channel.

blueMask:int

a contiguous mask indicated the position of the blue channel.

alphaMask:int

a contiguous mask indicated the position of the alpha channel.

transferType:int

the desired SampleModel transfer type.

isAlphaPremultiplied:boolean

true if the color channels will be premultipled by the alpha channel.

Returns:ImageTypeSpecifier

an ImageTypeSpecifier with the desired characteristics.

Exceptions
IllegalArgumentException:
  • if colorSpace is null.
  • if colorSpace is not of type TYPE_RGB.
  • if no mask has at least 1 bit set.
  • if transferType if not one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
createSpecifierback to summary
private static ImageTypeSpecifier createSpecifier(int type)
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Returns true if the given Object is an ImageTypeSpecifier and has a SampleModel and ColorModel that are equal to those of this object.

Parameters
o:Object

the Object to be compared for equality.

Returns:boolean

true if the given object is an equivalent ImageTypeSpecifier.

getBitsPerBandback to summary
public int getBitsPerBand(int band)

Return the number of bits used to represent samples of the given band.

Parameters
band:int

the index of the band to be queried, as an int.

Returns:int

an int specifying a number of bits.

Exceptions
IllegalArgumentException:
if band is negative or greater than the largest band index.
getBufferedImageTypeback to summary
public int getBufferedImageType()

Returns an int containing one of the enumerated constant values describing image formats from BufferedImage.

Returns:int

an int representing a BufferedImage type.

See Also
java.awt.image.BufferedImage, java.awt.image.BufferedImage#TYPE_CUSTOM, java.awt.image.BufferedImage#TYPE_INT_RGB, java.awt.image.BufferedImage#TYPE_INT_ARGB, java.awt.image.BufferedImage#TYPE_INT_ARGB_PRE, java.awt.image.BufferedImage#TYPE_INT_BGR, java.awt.image.BufferedImage#TYPE_3BYTE_BGR, java.awt.image.BufferedImage#TYPE_4BYTE_ABGR, java.awt.image.BufferedImage#TYPE_4BYTE_ABGR_PRE, java.awt.image.BufferedImage#TYPE_USHORT_565_RGB, java.awt.image.BufferedImage#TYPE_USHORT_555_RGB, java.awt.image.BufferedImage#TYPE_BYTE_GRAY, java.awt.image.BufferedImage#TYPE_USHORT_GRAY, java.awt.image.BufferedImage#TYPE_BYTE_BINARY, java.awt.image.BufferedImage#TYPE_BYTE_INDEXED
getColorModelback to summary
public ColorModel getColorModel()

Returns the ColorModel specified by this object.

Returns:ColorModel

a ColorModel.

getNumBandsback to summary
public int getNumBands()

Return the number of bands specified by this object. This is the same value as returned by SampleModel.getNumBands

Returns:int

the number of bands in the image.

getNumComponentsback to summary
public int getNumComponents()

Return the number of color components specified by this object. This is the same value as returned by ColorModel.getNumComponents

Returns:int

the number of components in the image.

getSampleModelback to summary
public SampleModel getSampleModel()

Returns a SampleModel based on the settings encapsulated within this object. The width and height of the SampleModel will be set to arbitrary values.

Returns:SampleModel

a SampleModel with arbitrary dimensions.

getSampleModelback to summary
public SampleModel getSampleModel(int width, int height)

Returns a SampleModel based on the settings encapsulated within this object. The width and height of the SampleModel will be set to the supplied values.

Parameters
width:int

the desired width of the returned SampleModel.

height:int

the desired height of the returned SampleModel.

Returns:SampleModel

a SampleModel with the given dimensions.

Exceptions
IllegalArgumentException:
  • if either width or height are negative or zero.
  • if the product of width and height is greater than Integer.MAX_VALUE
getSpecifierback to summary
private static ImageTypeSpecifier getSpecifier(int type)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hash code for this ImageTypeSpecifier.

Returns:int

a hash code for this ImageTypeSpecifier

javax.imageio back to summary

pack-priv Class ImageTypeSpecifier.Banded

extends ImageTypeSpecifier
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int[]
pack-priv int[]
pack-priv ColorSpace
pack-priv int
pack-priv boolean
pack-priv boolean
Inherited from javax.imageio.ImageTypeSpecifier:
colorModelsampleModel

Constructor Summary

AccessConstructor and Description
public
Banded(ColorSpace colorSpace, int[] bankIndices, int[] bandOffsets, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object o)

Overrides javax.imageio.ImageTypeSpecifier.equals.

Returns true if the given Object is an ImageTypeSpecifier and has a SampleModel and ColorModel that are equal to those of this object.

public int
hashCode()

Overrides javax.imageio.ImageTypeSpecifier.hashCode.

Returns the hash code for this ImageTypeSpecifier.

Inherited from javax.imageio.ImageTypeSpecifier:
createBandedcreateBufferedImagecreateComponentCMcreateFromBufferedImageTypecreateFromRenderedImagecreateGrayscalecreateGrayscalecreateIndexedcreateInterleavedcreatePackedgetBitsPerBandgetBufferedImageTypegetColorModelgetNumBandsgetNumComponentsgetSampleModelgetSampleModel

Field Detail

bandOffsetsback to summary
pack-priv int[] bandOffsets
bankIndicesback to summary
pack-priv int[] bankIndices
colorSpaceback to summary
pack-priv ColorSpace colorSpace
dataTypeback to summary
pack-priv int dataType
hasAlphaback to summary
pack-priv boolean hasAlpha
isAlphaPremultipliedback to summary
pack-priv boolean isAlphaPremultiplied

Constructor Detail

Bandedback to summary
public Banded(ColorSpace colorSpace, int[] bankIndices, int[] bandOffsets, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides javax.imageio.ImageTypeSpecifier.equals.

Doc from javax.imageio.ImageTypeSpecifier.equals.

Returns true if the given Object is an ImageTypeSpecifier and has a SampleModel and ColorModel that are equal to those of this object.

hashCodeback to summary
public int hashCode()

Overrides javax.imageio.ImageTypeSpecifier.hashCode.

Doc from javax.imageio.ImageTypeSpecifier.hashCode.

Returns the hash code for this ImageTypeSpecifier.

javax.imageio back to summary

pack-priv Class ImageTypeSpecifier.Grayscale

extends ImageTypeSpecifier
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv boolean
pack-priv boolean
pack-priv boolean
Inherited from javax.imageio.ImageTypeSpecifier:
colorModelsampleModel

Constructor Summary

AccessConstructor and Description
public
Grayscale(int bits, int dataType, boolean isSigned, boolean hasAlpha, boolean isAlphaPremultiplied)

Method Summary

Inherited from javax.imageio.ImageTypeSpecifier:
createBandedcreateBufferedImagecreateComponentCMcreateFromBufferedImageTypecreateFromRenderedImagecreateGrayscalecreateGrayscalecreateIndexedcreateInterleavedcreatePackedequalsgetBitsPerBandgetBufferedImageTypegetColorModelgetNumBandsgetNumComponentsgetSampleModelgetSampleModelhashCode

Field Detail

bitsback to summary
pack-priv int bits
dataTypeback to summary
pack-priv int dataType
hasAlphaback to summary
pack-priv boolean hasAlpha
isAlphaPremultipliedback to summary
pack-priv boolean isAlphaPremultiplied
isSignedback to summary
pack-priv boolean isSigned

Constructor Detail

Grayscaleback to summary
public Grayscale(int bits, int dataType, boolean isSigned, boolean hasAlpha, boolean isAlphaPremultiplied)
javax.imageio back to summary

pack-priv Class ImageTypeSpecifier.Indexed

extends ImageTypeSpecifier
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv byte[]
pack-priv int
pack-priv byte[]
pack-priv int
pack-priv byte[]
pack-priv byte[]
Inherited from javax.imageio.ImageTypeSpecifier:
colorModelsampleModel

Constructor Summary

AccessConstructor and Description
public
Indexed(byte[] redLUT, byte[] greenLUT, byte[] blueLUT, byte[] alphaLUT, int bits, int dataType)

Method Summary

Inherited from javax.imageio.ImageTypeSpecifier:
createBandedcreateBufferedImagecreateComponentCMcreateFromBufferedImageTypecreateFromRenderedImagecreateGrayscalecreateGrayscalecreateIndexedcreateInterleavedcreatePackedequalsgetBitsPerBandgetBufferedImageTypegetColorModelgetNumBandsgetNumComponentsgetSampleModelgetSampleModelhashCode

Field Detail

alphaLUTback to summary
pack-priv byte[] alphaLUT
bitsback to summary
pack-priv int bits
blueLUTback to summary
pack-priv byte[] blueLUT
dataTypeback to summary
pack-priv int dataType
greenLUTback to summary
pack-priv byte[] greenLUT
redLUTback to summary
pack-priv byte[] redLUT

Constructor Detail

Indexedback to summary
public Indexed(byte[] redLUT, byte[] greenLUT, byte[] blueLUT, byte[] alphaLUT, int bits, int dataType)
javax.imageio back to summary

pack-priv Class ImageTypeSpecifier.Interleaved

extends ImageTypeSpecifier
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int[]
pack-priv ColorSpace
pack-priv int
pack-priv boolean
pack-priv boolean
Inherited from javax.imageio.ImageTypeSpecifier:
colorModelsampleModel

Constructor Summary

AccessConstructor and Description
public
Interleaved(ColorSpace colorSpace, int[] bandOffsets, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object o)

Overrides javax.imageio.ImageTypeSpecifier.equals.

Returns true if the given Object is an ImageTypeSpecifier and has a SampleModel and ColorModel that are equal to those of this object.

public int
hashCode()

Overrides javax.imageio.ImageTypeSpecifier.hashCode.

Returns the hash code for this ImageTypeSpecifier.

Inherited from javax.imageio.ImageTypeSpecifier:
createBandedcreateBufferedImagecreateComponentCMcreateFromBufferedImageTypecreateFromRenderedImagecreateGrayscalecreateGrayscalecreateIndexedcreateInterleavedcreatePackedgetBitsPerBandgetBufferedImageTypegetColorModelgetNumBandsgetNumComponentsgetSampleModelgetSampleModel

Field Detail

bandOffsetsback to summary
pack-priv int[] bandOffsets
colorSpaceback to summary
pack-priv ColorSpace colorSpace
dataTypeback to summary
pack-priv int dataType
hasAlphaback to summary
pack-priv boolean hasAlpha
isAlphaPremultipliedback to summary
pack-priv boolean isAlphaPremultiplied

Constructor Detail

Interleavedback to summary
public Interleaved(ColorSpace colorSpace, int[] bandOffsets, int dataType, boolean hasAlpha, boolean isAlphaPremultiplied)

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides javax.imageio.ImageTypeSpecifier.equals.

Doc from javax.imageio.ImageTypeSpecifier.equals.

Returns true if the given Object is an ImageTypeSpecifier and has a SampleModel and ColorModel that are equal to those of this object.

hashCodeback to summary
public int hashCode()

Overrides javax.imageio.ImageTypeSpecifier.hashCode.

Doc from javax.imageio.ImageTypeSpecifier.hashCode.

Returns the hash code for this ImageTypeSpecifier.

javax.imageio back to summary

pack-priv Class ImageTypeSpecifier.Packed

extends ImageTypeSpecifier
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv ColorSpace
pack-priv int
pack-priv boolean
pack-priv int
pack-priv int
Inherited from javax.imageio.ImageTypeSpecifier:
colorModelsampleModel

Constructor Summary

AccessConstructor and Description
public
Packed(ColorSpace colorSpace, int redMask, int greenMask, int blueMask, int alphaMask, int transferType, boolean isAlphaPremultiplied)

Method Summary

Inherited from javax.imageio.ImageTypeSpecifier:
createBandedcreateBufferedImagecreateComponentCMcreateFromBufferedImageTypecreateFromRenderedImagecreateGrayscalecreateGrayscalecreateIndexedcreateInterleavedcreatePackedequalsgetBitsPerBandgetBufferedImageTypegetColorModelgetNumBandsgetNumComponentsgetSampleModelgetSampleModelhashCode

Field Detail

alphaMaskback to summary
pack-priv int alphaMask
blueMaskback to summary
pack-priv int blueMask
colorSpaceback to summary
pack-priv ColorSpace colorSpace
greenMaskback to summary
pack-priv int greenMask
isAlphaPremultipliedback to summary
pack-priv boolean isAlphaPremultiplied
redMaskback to summary
pack-priv int redMask
transferTypeback to summary
pack-priv int transferType

Constructor Detail

Packedback to summary
public Packed(ColorSpace colorSpace, int redMask, int greenMask, int blueMask, int alphaMask, int transferType, boolean isAlphaPremultiplied)