public class Info extends Object
Since the output of "identify -verbose" is meant as a human-readable interface and not for parsing, this class is inherently flawed. This implementation interprets every line with a colon as a key-value-pair. This is not necessarely correct, e.g. the comment-field could be multi-line with colons within the comment.
An alternative to the Info-class is to use the exiftool-command and the wrapper for it provided by im4java.
| Constructor and Description |
|---|
Info(String pImage)
This contstructor will automatically parse the full output
of identify -verbose.
|
Info(String pImage,
boolean basic)
This constructor creates an Info-object with basic or complete
image-information (depending on the second argument).
|
Info(String pImage,
InputStream pInput)
This contstructor will automatically parse the full output
of identify -verbose.
|
Info(String pImage,
InputStream pInput,
boolean basic)
This constructor creates an Info-object with basic or complete
image-information (depending on the third argument).
|
| Modifier and Type | Method and Description |
|---|---|
String |
getImageClass()
Return the image class.
|
String |
getImageClass(int pSceneNr)
Return the image class for the given scene.
|
int |
getImageDepth()
Return the image depth.
|
int |
getImageDepth(int pSceneNr)
Return the image depth.
|
String |
getImageFormat()
Return the image format.
|
String |
getImageFormat(int pSceneNr)
Return the image format for the given scene.
|
String |
getImageGeometry()
Return the image geometry.
|
String |
getImageGeometry(int pSceneNr)
Return the image geometry for the given scene.
|
int |
getImageHeight()
Return the image height.
|
int |
getImageHeight(int pSceneNr)
Return the image height for the given scene.
|
int |
getImageWidth()
Return the image width.
|
int |
getImageWidth(int pSceneNr)
Return the image width for the given scene.
|
String |
getPageGeometry()
Return the page geometry.
|
String |
getPageGeometry(int pSceneNr)
Return the page geometry for the given scene.
|
int |
getPageHeight()
Return the page height.
|
int |
getPageHeight(int pSceneNr)
Return the page height for the given scene.
|
int |
getPageWidth()
Return the page width.
|
int |
getPageWidth(int pSceneNr)
Return the page width for the given scene.
|
String |
getProperty(String pPropertyName)
Return the given property.
|
String |
getProperty(String pPropertyName,
int pSceneNr)
Return the given property of the given scene.
|
Enumeration<String> |
getPropertyNames()
Return an enumeration of all properties.
|
int |
getSceneCount()
Return the number of scenes.
|
public Info(String pImage) throws InfoException
pImage - Source imageInfoExceptionpublic Info(String pImage, InputStream pInput) throws InfoException
pImage - Name of the source-imagepInput - Image provided as an InputStreamInfoExceptionpublic Info(String pImage, boolean basic) throws InfoException
pImage - Source imagebasic - Set to true for basic information, to false for complete infoInfoExceptionpublic Info(String pImage, InputStream pInput, boolean basic) throws InfoException
pImage - Source imagebasic - Set to true for basic information, to false for complete infopInput - Image provided as an InputStreamInfoExceptionpublic String getImageFormat()
public String getImageFormat(int pSceneNr)
pSceneNr - Scene-number (zero-based)public int getImageWidth()
throws InfoException
InfoExceptionpublic int getImageWidth(int pSceneNr)
throws InfoException
pSceneNr - Scene-number (zero-based)InfoExceptionpublic int getImageHeight()
throws InfoException
InfoExceptionpublic int getImageHeight(int pSceneNr)
throws InfoException
pSceneNr - Scene-number (zero-based)InfoExceptionpublic String getImageGeometry()
public String getImageGeometry(int pSceneNr)
pSceneNr - Scene-number (zero-based)public int getImageDepth()
throws InfoException
InfoExceptionpublic int getImageDepth(int pSceneNr)
throws InfoException
pSceneNr - Scene-number (zero-based)InfoExceptionpublic String getImageClass()
public String getImageClass(int pSceneNr)
pSceneNr - Scene-number (zero-based)public int getPageWidth()
throws InfoException
InfoExceptionpublic int getPageWidth(int pSceneNr)
throws InfoException
pSceneNr - Scene-number (zero-based)InfoExceptionpublic int getPageHeight()
throws InfoException
InfoExceptionpublic int getPageHeight(int pSceneNr)
throws InfoException
pSceneNr - Scene-number (zero-based)InfoExceptionpublic String getPageGeometry()
public String getPageGeometry(int pSceneNr)
pSceneNr - Scene-number (zero-based)public String getProperty(String pPropertyName, int pSceneNr)
pPropertyName - Name of the propertypSceneNr - Scene-number (zero-based)public int getSceneCount()
public Enumeration<String> getPropertyNames()
Copyright © 2019. All rights reserved.