org.jempbox.xmp
Class Thumbnail
java.lang.Object
org.jempbox.xmp.Thumbnail
public class Thumbnail
extends java.lang.Object
This class represents a thumbnail datatype.
- Ben Litchfield (ben@benlitchfield.com)
static String | FORMAT_JPEG - A supported thumnail format.
|
protected Element | parent - The DOM representation of this object.
|
Thumbnail(Element parentElement) - Create a thumnail based on a parent property set.
|
Thumbnail(XMPMetadata metadata) - Create a new thumbnail element.
|
Element | getElement() - Get the underlying XML element.
|
String | getFormat() - Get the format of the thumbnail.
|
Integer | getHeight() - Get the height of the image in pixels.
|
String | getImage() - Get the image data in base 64 encoding.
|
Integer | getWidth() - Get the width of the image in pixels.
|
void | setFormat(String format) - Set the format of the thumbnail, currently only JPEG is supported.
|
void | setHeight(Integer height) - Set the height of the element.
|
void | setImage(String image) - Set the image data in base 64 encoding.
|
void | setWidth(Integer width) - Set the width of the element.
|
FORMAT_JPEG
public static final String FORMAT_JPEG
A supported thumnail format.
parent
protected Element parent
The DOM representation of this object.
Thumbnail
public Thumbnail(Element parentElement)
Create a thumnail based on a parent property set.
parentElement
- The parent element that will store the thumbnail properties.
Thumbnail
public Thumbnail(XMPMetadata metadata)
Create a new thumbnail element.
metadata
- The metadata document that his thumbnail will be part of.
getElement
public Element getElement()
Get the underlying XML element.
- The XML element that this object represents.
getFormat
public String getFormat()
Get the format of the thumbnail. See FORMAT_XXX constants.
getHeight
public Integer getHeight()
Get the height of the image in pixels.
- The height of the image in pixels.
getImage
public String getImage()
Get the image data in base 64 encoding.
getWidth
public Integer getWidth()
Get the width of the image in pixels.
- The width of the image in pixels.
setFormat
public void setFormat(String format)
Set the format of the thumbnail, currently only JPEG is supported. See FORMAT_XXX constants.
format
- The image format.
setHeight
public void setHeight(Integer height)
Set the height of the element.
height
- The updated height of the element.
setImage
public void setImage(String image)
Set the image data in base 64 encoding.
setWidth
public void setWidth(Integer width)
Set the width of the element.
width
- The updated width of the element.