XQuery Function Documentation
http://exist-db.org/xquery/image
java:org.exist.xquery.modules.image.ImageModule
A module for performing operations on Images stored in the eXist db
image:crop
Crop the image $image to a specified dimension. If no dimensions are specified, then the default values are 'y1 = 0', 'x1 = 0', 'x2 = 100' and 'y2 = 100'.
- Parameters:
-
$image The image data $dimension* The maximum dimension of the cropd image. expressed in pixels (x1, y1, x2, y2). If empty, then the default values are are 'y1 = 0', 'x1 = 0', 'x2 = 100' and 'y2 = 100'. $mimeType The mime-type of the image - Returns:
- xs:base64Binary? : the cropd image or an empty sequence if $image is invalid
image:get-height
Gets the Height of the image passed in, returning an integer of the images Height in pixels or an empty sequence if the image is invalid.
- Parameters:
-
$image The image data - Returns:
- xs:integer? : the height in pixels
image:get-metadata
Gets the metadata of the image passed in, returning the images XML metadata.
- Parameters:
-
$image The image data $native-format When true metadata of the images native format is returned, otherwise common java ImageIO metadata is returned. - Returns:
- node()? : the image metadata
- Deprecated:
- Use the contentextraction module instead This function could be removed in the next major release version.
image:get-width
Gets the width of the image passed in, returning an integer of the images width in pixels or an empty sequence if the image is invalid.
- Parameters:
-
$image The image data - Returns:
- xs:integer? : the width in pixels
image:scale
Scale the image image to a specified dimension. If no dimensions are specified, then the default values are 'maxheight = 100' and 'maxwidth = 100'.
- Parameters:
-
$image The image data $dimension* The maximum dimension of the scaled image. expressed in pixels (maxheight, maxwidth). If empty, then the default values are 'maxheight = 100' and 'maxwidth = 100'. $mimeType The mime-type of the image - Returns:
- xs:base64Binary? : the scaled image or an empty sequence if $image is invalid
image:thumbnail
Generate thumbnails from the given database collection
- Parameters:
-
$collection The URI to the collection $thumbnail-location? The location in the database where the thumbnails should be created, this can be a local path, with the prefix 'xmldb:' a absolute path within the database or with 'rel:' path relative to the given $collection. You can leave this empty then the default is 'rel:/thumbs'. $dimension* The dimension of the thumbnails, if empty then the default values are 'maxheight = 100' and 'maxwidth = 100', the first value is 'maxheight' and the second 'maxwidth'. $prefix? The prefix to append to the thumbnail filenames - Returns:
- xs:string* : the result