Class ImageInfo
- Direct Known Subclasses:
- PngImageInfo
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic enum
- 
Constructor SummaryConstructorsConstructorDescriptionImageInfo(String formatDetails, int bitsPerPixel, List<String> comments, ImageFormat format, String formatName, int height, String mimeType, int numberOfImages, int physicalHeightDpi, float physicalHeightInch, int physicalWidthDpi, float physicalWidthInch, int width, boolean progressive, boolean transparent, boolean usesPalette, ImageInfo.ColorType colorType, ImageInfo.CompressionAlgorithm compressionAlgorithm) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddump()intReturns the bits per pixel of the image data.Returns theImageInfo.ColorTypeof the image.Returns a list of comments from the image file.Returns a description of the compression algorithm, if any.Returns the image file format, ie.Returns a description of the file format, ie. format version.Returns a string with the name of the image file format.intReturns the height of the image in pixels.Returns the MIME type of the image.intReturns the number of images in the file.intReturns horizontal dpi of the image, if available.floatReturns physical height of the image in inches, if available.intReturns vertical dpi of the image, if available.floatReturns physical width of the image in inches, if available.intgetWidth()Returns the width of the image in pixels.booleanReturns true if the image is progressive or interlaced.booleanReturns true if the image has transparency.toString()voidtoString(PrintWriter pw, String prefix) booleanReturns true if the image uses a palette.
- 
Constructor Details- 
ImageInfopublic ImageInfo(String formatDetails, int bitsPerPixel, List<String> comments, ImageFormat format, String formatName, int height, String mimeType, int numberOfImages, int physicalHeightDpi, float physicalHeightInch, int physicalWidthDpi, float physicalWidthInch, int width, boolean progressive, boolean transparent, boolean usesPalette, ImageInfo.ColorType colorType, ImageInfo.CompressionAlgorithm compressionAlgorithm) 
 
- 
- 
Method Details- 
dump
- 
getBitsPerPixelReturns the bits per pixel of the image data.- Returns:
- bits per pixel of the image data.
 
- 
getColorTypeReturns theImageInfo.ColorTypeof the image.- Returns:
- image color type.
 
- 
getCommentsReturns a list of comments from the image file.This is mostly obsolete. - Returns:
- A list of comments.
 
- 
getCompressionAlgorithmReturns a description of the compression algorithm, if any.- Returns:
- compression algorithm description.
 
- 
getFormatReturns the image file format, ie. ImageFormat.IMAGE_FORMAT_PNG.Returns ImageFormat.IMAGE_FORMAT_UNKNOWN if format is unknown. - Returns:
- a constant defined in ImageFormat.
- See Also:
 
- 
getFormatDetailsReturns a description of the file format, ie. format version.- Returns:
- file format description.
 
- 
getFormatNameReturns a string with the name of the image file format.- Returns:
- the name of the image file format.
- See Also:
 
- 
getHeightReturns the height of the image in pixels.- Returns:
- image height in pixels.
- See Also:
 
- 
getMimeTypeReturns the MIME type of the image.- Returns:
- image MIME type.
- See Also:
 
- 
getNumberOfImagesReturns the number of images in the file.Applies mostly to GIF and TIFF; reading PSD/Photoshop layers is not supported, and Jpeg/JFIF EXIF thumbnails are not included in this count. - Returns:
- number of images in the file.
 
- 
getPhysicalHeightDpiReturns horizontal dpi of the image, if available.Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72). - Returns:
- -1 if not present.
 
- 
getPhysicalHeightInchReturns physical height of the image in inches, if available.Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72). - Returns:
- -1 if not present.
 
- 
getPhysicalWidthDpiReturns vertical dpi of the image, if available.Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72). - Returns:
- -1 if not present.
 
- 
getPhysicalWidthInchReturns physical width of the image in inches, if available.Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72). - Returns:
- -1 if not present.
 
- 
getWidthReturns the width of the image in pixels.- Returns:
- image width in pixels.
- See Also:
 
- 
isProgressiveReturns true if the image is progressive or interlaced.- Returns:
- trueif the image is progressive or interlaced,- falseotherwise.
 
- 
isTransparentReturns true if the image has transparency.- Returns:
- trueif the image has transparency,- falseotherwise.
 
- 
toString
- 
toString
- 
usesPaletteReturns true if the image uses a palette.- Returns:
- trueif the image uses a palette,- falseotherwise.
 
 
-