expkg-zone58:image.thumbnailator   library module

Summary
Generate image thumbnails using the thumbnailator library.
Tags
See also: https://github.com/coobird/thumbnailator

Author: andy bunce

Version: 0.5

Functions

thumbnails:scale

Summary
generate scaled version of source image at given factors 0-1
Signature
thumbnails:scale( source  as  xs:base64Binary, scale  as  xs:double ) as  xs:base64Binary
thumbnails:scale( source  as  xs:base64Binary, xscale  as  xs:double, yscale  as  xs:double ) as  xs:base64Binary
Parameters
  • source as xs:base64Binary base64Binary (streamed?) e.g from `fetch:binary`
  • scale as xs:double
Return
  • xs:base64Binary: the thumbnail

thumbnails:size

Summary
generate scaled version of source image with maximum dimension of size
Signature
thumbnails:size( source  as  xs:base64Binary, size  as  xs:integer ) as  xs:base64Binary
thumbnails:size( source  as  xs:base64Binary, width  as  xs:integer, height  as  xs:integer ) as  xs:base64Binary
Parameters
  • source as xs:base64Binary base64Binary (streamed?) e.g from `fetch:binary`
  • size as xs:integer
Return
  • xs:base64Binary: base64Binary for thumbnail

thumbnails:task

Summary
generate thumbnail using parameters specified via XML
Signature
thumbnails:task( source  as  xs:base64Binary, task  as  element(thumbnail) ) as  xs:base64Binary
Parameters
  • source as xs:base64Binary base64Binary (streamed?) e.g from `fetch:binary`
  • task as element(thumbnail) XML parameters <task><size width="100" ..
Return
  • xs:base64Binary: the thumbnail

thumbnails:validate

Summary
validate task thumbnail XML against schema
Signature
thumbnails:validate( src  as  item()* ) as  empty-sequence()
Parameters
  • src as item()* XML parameters <thumbnail><size width="100" ..
Return
  • empty-sequence(): empty-sequence or error
Error
BXVA0001: the validation fails.
Error
BXVA0002: the validation process cannot be started.
Error
BXVA0003: no XML Schema validator is available.
Error
BXVA0004: no validator is found for the specified version.

thumbnails:validation-report

Summary
validate task thumbnail XML against schema
Signature
thumbnails:validation-report( src  as  item()* ) as  element(report)
Parameters
  • src as item()* XML parameters <thumbnail><size width="100" ..
Return
  • element(report): validation report

Namespaces

The following namespaces are defined:

Prefix Uri
thumbnails expkg-zone58:image.thumbnailator
Thumbs org.expkgzone58.image.Thumbs

Original Source Code

Not available