A module for performing operations on Images stored in the eXist db
image:crop($image as xs:base64Binary, $dimension as xs:integer*, $mimeType as xs:string) as xs:base64Binary?
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'.
$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 |
image:get-height($image as xs:base64Binary) as xs:integer?
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.
$image | The image data |
image:get-width($image as xs:base64Binary) as xs:integer?
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.
$image | The image data |
image:scale($image as xs:base64Binary, $dimension as xs:integer*, $mimeType as xs:string) as xs:base64Binary?
Scale the image image to a specified dimension. If no dimensions are specified, then the default values are 'maxheight = 100' and 'maxwidth = 100'.
$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 |
image:thumbnail($collection as xs:anyURI, $thumbnail-location as xs:anyURI?, $dimension as xs:integer*, $prefix as xs:string?) as xs:string*
Generate thumbnails from the given database collection
$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 |