public class ImageInfo extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COLOR_TYPE_BW |
static int |
COLOR_TYPE_CMYK |
static int |
COLOR_TYPE_GRAYSCALE |
static int |
COLOR_TYPE_OTHER |
static int |
COLOR_TYPE_RGB |
static int |
COLOR_TYPE_UNKNOWN |
static String |
COMPRESSION_ALGORITHM_CCITT_1D |
static String |
COMPRESSION_ALGORITHM_CCITT_GROUP_3 |
static String |
COMPRESSION_ALGORITHM_CCITT_GROUP_4 |
static String |
COMPRESSION_ALGORITHM_JPEG |
static String |
COMPRESSION_ALGORITHM_LZW |
static String |
COMPRESSION_ALGORITHM_NONE |
static String |
COMPRESSION_ALGORITHM_PACKBITS |
static String |
COMPRESSION_ALGORITHM_PNG_FILTER |
static String |
COMPRESSION_ALGORITHM_PSD |
static String |
COMPRESSION_ALGORITHM_RLE |
static String |
COMPRESSION_ALGORITHM_UNKNOWN |
Constructor and Description |
---|
ImageInfo(String formatDetails,
int bitsPerPixel,
ArrayList comments,
ImageFormat format,
String formatName,
int height,
String mimeType,
int numberOfImages,
int physicalHeightDpi,
float physicalHeightInch,
int physicalWidthDpi,
float physicalWidthInch,
int width,
boolean isProgressive,
boolean isTransparent,
boolean usesPalette,
int colorType,
String compressionAlgorithm) |
Modifier and Type | Method and Description |
---|---|
void |
dump() |
int |
getBitsPerPixel()
Returns the bits per pixel of the image data.
|
int |
getColorType()
Returns the color type of the image, as a constant (ie.
|
String |
getColorTypeDescription()
Returns a description of the color type of the image.
|
ArrayList |
getComments()
Returns a list of comments from the image file.
|
ImageFormat |
getFormat()
Returns the image file format, ie.
|
String |
getFormatName()
Returns a string with the name of the image file format.
|
int |
getHeight()
Returns the height of the image in pixels.
|
boolean |
getIsProgressive()
Returns true if the image is progressive or interlaced.
|
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.
|
String |
toString() |
void |
toString(PrintWriter pw,
String prefix) |
public static final int COLOR_TYPE_BW
public static final int COLOR_TYPE_GRAYSCALE
public static final int COLOR_TYPE_RGB
public static final int COLOR_TYPE_CMYK
public static final int COLOR_TYPE_OTHER
public static final int COLOR_TYPE_UNKNOWN
public static final String COMPRESSION_ALGORITHM_UNKNOWN
public static final String COMPRESSION_ALGORITHM_NONE
public static final String COMPRESSION_ALGORITHM_LZW
public static final String COMPRESSION_ALGORITHM_PACKBITS
public static final String COMPRESSION_ALGORITHM_JPEG
public static final String COMPRESSION_ALGORITHM_RLE
public static final String COMPRESSION_ALGORITHM_PSD
public static final String COMPRESSION_ALGORITHM_PNG_FILTER
public static final String COMPRESSION_ALGORITHM_CCITT_GROUP_3
public static final String COMPRESSION_ALGORITHM_CCITT_GROUP_4
public static final String COMPRESSION_ALGORITHM_CCITT_1D
public ImageInfo(String formatDetails, int bitsPerPixel, ArrayList comments, ImageFormat format, String formatName, int height, String mimeType, int numberOfImages, int physicalHeightDpi, float physicalHeightInch, int physicalWidthDpi, float physicalWidthInch, int width, boolean isProgressive, boolean isTransparent, boolean usesPalette, int colorType, String compressionAlgorithm)
public int getBitsPerPixel()
public ArrayList getComments()
public ImageFormat getFormat()
ImageFormat
public String getFormatName()
getFormat()
public int getHeight()
getWidth()
public 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 getIsProgressive()
public int getColorType()
getColorTypeDescription()
public String getColorTypeDescription()
getColorType()
public void dump()
public void toString(PrintWriter pw, String prefix) throws ImageReadException, IOException
ImageReadException
IOException
Copyright © 2007-2012. All Rights Reserved.