|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sanselan.ImageInfo
public class ImageInfo
ImageInfo represents a collection of basic properties of an image, such as width, height, format, bit depth, etc.
Field Summary | |
---|---|
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 java.lang.String |
COMPRESSION_ALGORITHM_CCITT_1D
|
static java.lang.String |
COMPRESSION_ALGORITHM_CCITT_GROUP_3
|
static java.lang.String |
COMPRESSION_ALGORITHM_CCITT_GROUP_4
|
static java.lang.String |
COMPRESSION_ALGORITHM_JPEG
|
static java.lang.String |
COMPRESSION_ALGORITHM_LZW
|
static java.lang.String |
COMPRESSION_ALGORITHM_NONE
|
static java.lang.String |
COMPRESSION_ALGORITHM_PACKBITS
|
static java.lang.String |
COMPRESSION_ALGORITHM_PNG_FILTER
|
static java.lang.String |
COMPRESSION_ALGORITHM_PSD
|
static java.lang.String |
COMPRESSION_ALGORITHM_RLE
|
static java.lang.String |
COMPRESSION_ALGORITHM_UNKNOWN
|
Constructor Summary | |
---|---|
ImageInfo(java.lang.String formatDetails,
int bitsPerPixel,
java.util.ArrayList 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 isProgressive,
boolean isTransparent,
boolean usesPalette,
int colorType,
java.lang.String compressionAlgorithm)
|
Method Summary | |
---|---|
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. |
java.lang.String |
getColorTypeDescription()
Returns a description of the color type of the image. |
java.util.ArrayList |
getComments()
Returns a list of comments from the image file. |
ImageFormat |
getFormat()
Returns the image 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. |
boolean |
getIsProgressive()
Returns true if the image is progressive or interlaced. |
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. |
java.lang.String |
toString()
|
void |
toString(java.io.PrintWriter pw,
java.lang.String prefix)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 java.lang.String COMPRESSION_ALGORITHM_UNKNOWN
public static final java.lang.String COMPRESSION_ALGORITHM_NONE
public static final java.lang.String COMPRESSION_ALGORITHM_LZW
public static final java.lang.String COMPRESSION_ALGORITHM_PACKBITS
public static final java.lang.String COMPRESSION_ALGORITHM_JPEG
public static final java.lang.String COMPRESSION_ALGORITHM_RLE
public static final java.lang.String COMPRESSION_ALGORITHM_PSD
public static final java.lang.String COMPRESSION_ALGORITHM_PNG_FILTER
public static final java.lang.String COMPRESSION_ALGORITHM_CCITT_GROUP_3
public static final java.lang.String COMPRESSION_ALGORITHM_CCITT_GROUP_4
public static final java.lang.String COMPRESSION_ALGORITHM_CCITT_1D
Constructor Detail |
---|
public ImageInfo(java.lang.String formatDetails, int bitsPerPixel, java.util.ArrayList 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 isProgressive, boolean isTransparent, boolean usesPalette, int colorType, java.lang.String compressionAlgorithm)
Method Detail |
---|
public int getBitsPerPixel()
public java.util.ArrayList getComments()
public ImageFormat getFormat()
ImageFormat
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 getIsProgressive()
public int getColorType()
getColorTypeDescription()
public java.lang.String getColorTypeDescription()
getColorType()
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) throws ImageReadException, java.io.IOException
ImageReadException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |