public class ImageInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ImageInfo.ColorType |
static class |
ImageInfo.CompressionAlgorithm |
Constructor and Description |
---|
ImageInfo(java.lang.String formatDetails,
int bitsPerPixel,
java.util.List<java.lang.String> comments,
ImageFormat format,
java.lang.String formatName,
int height,
java.lang.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) |
Modifier and Type | Method and Description |
---|---|
void |
dump() |
int |
getBitsPerPixel()
Returns the bits per pixel of the image data.
|
ImageInfo.ColorType |
getColorType()
Returns the
ImageInfo.ColorType of the image. |
java.util.List<java.lang.String> |
getComments()
Returns a list of comments from the image file.
|
ImageInfo.CompressionAlgorithm |
getCompressionAlgorithm()
Returns a description of the compression algorithm, if any.
|
ImageFormat |
getFormat()
Returns the image file format, ie.
|
java.lang.String |
getFormatDetails()
Returns a description of the file format, ie.
|
java.lang.String |
getFormatName()
Returns a string with the name of the image file format.
|
int |
getHeight()
Returns the height of the image in pixels.
|
java.lang.String |
getMimeType()
Returns the MIME type of the image.
|
int |
getNumberOfImages()
Returns the number of images in the file.
|
int |
getPhysicalHeightDpi()
Returns horizontal dpi of the image, if available.
|
float |
getPhysicalHeightInch()
Returns physical height of the image in inches, if available.
|
int |
getPhysicalWidthDpi()
Returns vertical dpi of the image, if available.
|
float |
getPhysicalWidthInch()
Returns physical width of the image in inches, if available.
|
int |
getWidth()
Returns the width of the image in pixels.
|
boolean |
isProgressive()
Returns true if the image is progressive or interlaced.
|
boolean |
isTransparent()
Returns true if the image has transparency.
|
java.lang.String |
toString() |
void |
toString(java.io.PrintWriter pw,
java.lang.String prefix) |
boolean |
usesPalette()
Returns true if the image uses a palette.
|
public ImageInfo(java.lang.String formatDetails, int bitsPerPixel, java.util.List<java.lang.String> comments, ImageFormat format, java.lang.String formatName, int height, java.lang.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)
public int getBitsPerPixel()
public java.util.List<java.lang.String> getComments()
public ImageFormat getFormat()
ImageFormats
public java.lang.String getFormatName()
getFormat()
public int getHeight()
getWidth()
public java.lang.String getMimeType()
getFormat()
public int getNumberOfImages()
Applies mostly to GIF and TIFF; reading PSD/Photoshop layers is not supported, and Jpeg/JFIF EXIF thumbnails are not included in this count.
public int getPhysicalHeightDpi()
Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72).
public float getPhysicalHeightInch()
Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72).
public int getPhysicalWidthDpi()
Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72).
public float getPhysicalWidthInch()
Applies to TIFF (optional), BMP (always), GIF (constant: 72), Jpeg (optional), PNG (optional), PNM (constant: 72), PSD/Photoshop (constant: 72).
public int getWidth()
getHeight()
public boolean isProgressive()
public ImageInfo.ColorType getColorType()
ImageInfo.ColorType
of the image.public void dump()
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.io.PrintWriter pw, java.lang.String prefix)
public java.lang.String getFormatDetails()
public boolean isTransparent()
public boolean usesPalette()
public ImageInfo.CompressionAlgorithm getCompressionAlgorithm()
Copyright © 2010 - 2020 Adobe. All Rights Reserved