public class ImageInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map |
customObjects
Map of custom objects that components further down the processing pipeline might need.
|
static java.lang.Object |
HAS_MORE_IMAGES
Key to register information about additional (sub-)images in the image file after the
selected one.
|
private java.lang.String |
mimeType
MIME type of the image
|
static java.lang.Object |
ORIGINAL_IMAGE
Key to register the "original object" among the custom objects of an ImageInfo instance.
|
private java.lang.String |
originalURI
Original URI the image was accessed with
|
private ImageSize |
size
the image size
|
Constructor and Description |
---|
ImageInfo(java.lang.String originalURI,
java.lang.String mimeType)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map |
getCustomObjects()
Returns a Map of custom objects associated with this instance.
|
java.lang.String |
getMimeType()
Returns the image's MIME type.
|
Image |
getOriginalImage()
Returns the original Image instance if such an Image instance is created while building
this ImageInfo object.
|
java.lang.String |
getOriginalURI()
Returns the original URI of the image.
|
ImageSize |
getSize()
Returns the image's intrinsic size.
|
void |
setSize(ImageSize size)
Sets the image's intrinsic size.
|
java.lang.String |
toString() |
public static final java.lang.Object ORIGINAL_IMAGE
getOriginalImage()
public static final java.lang.Object HAS_MORE_IMAGES
Boolean.TRUE
or Boolean.FALSE
. A value of TRUE indicates that there are
more subimages available but the exact number of additional images has not been determined
for performance reasons.private java.lang.String originalURI
private java.lang.String mimeType
private ImageSize size
private java.util.Map customObjects
public ImageInfo(java.lang.String originalURI, java.lang.String mimeType)
originalURI
- the original URI that was specified by the user (not the resolved URI!)mimeType
- the MIME type of the imagepublic java.lang.String getOriginalURI()
public java.lang.String getMimeType()
public ImageSize getSize()
public void setSize(ImageSize size)
size
- the sizepublic java.util.Map getCustomObjects()
public Image getOriginalImage()
This method is short for: (Image)this.customObjects.get(ORIGINAL_IMAGE);
ORIGINAL_IMAGE
public java.lang.String toString()
toString
in class java.lang.Object