Package org.apache.jempbox.xmp
Class Thumbnail
java.lang.Object
org.apache.jempbox.xmp.Thumbnail
This class represents a thumbnail datatype.
- Version:
- $Revision: 1.3 $
- Author:
- Ben Litchfield
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThumbnail
(XMPMetadata metadata) Create a new thumbnail element.Create a thumnail based on a parent property set. -
Method Summary
Modifier and TypeMethodDescriptionGet the underlying XML element.Get the format of the thumbnail.Get the height of the image in pixels.getImage()
Get the image data in base 64 encoding.getWidth()
Get the width of the image in pixels.void
Set the format of the thumbnail, currently only JPEG is supported.void
Set the height of the element.void
Set the image data in base 64 encoding.void
Set the width of the element.
-
Field Details
-
FORMAT_JPEG
A supported thumnail format.- See Also:
-
parent
The DOM representation of this object.
-
-
Constructor Details
-
Thumbnail
Create a new thumbnail element.- Parameters:
metadata
- The metadata document that his thumbnail will be part of.
-
Thumbnail
Create a thumnail based on a parent property set.- Parameters:
parentElement
- The parent element that will store the thumbnail properties.
-
-
Method Details
-
getElement
Get the underlying XML element.- Returns:
- The XML element that this object represents.
-
getHeight
Get the height of the image in pixels.- Returns:
- The height of the image in pixels.
-
setHeight
Set the height of the element.- Parameters:
height
- The updated height of the element.
-
getWidth
Get the width of the image in pixels.- Returns:
- The width of the image in pixels.
-
setWidth
Set the width of the element.- Parameters:
width
- The updated width of the element.
-
setFormat
Set the format of the thumbnail, currently only JPEG is supported. See FORMAT_XXX constants.- Parameters:
format
- The image format.
-
getFormat
Get the format of the thumbnail. See FORMAT_XXX constants.- Returns:
- The image format.
-
setImage
Set the image data in base 64 encoding.- Parameters:
image
- The image.
-
getImage
Get the image data in base 64 encoding.- Returns:
- The image data.
-