I can’t figure out how to get more information in one run.
For example, I would like to do some basic math for later operations (typically, scaling).
This:
import module namespace image = "http://exist-db.org/xquery/image";
let $img := util:binary-doc('/db/apps/tested-bunny/data/deepspace.jpg')
let $img-width := image:get-width($img)
let $img-height := image:get-height($img)
return
($img-width, $img-height)
… returns only the width.
This:
import module namespace image = "http://exist-db.org/xquery/image";
let $img := util:binary-doc('/db/apps/tested-bunny/data/deepspace.jpg')
let $img-width := image:get-width($img)
return
($img-width, image:get-metadata($img, true()))
… returns only the width.
This:
import module namespace image = "http://exist-db.org/xquery/image";
let $img := util:binary-doc('/db/apps/tested-bunny/data/deepspace.jpg')
return
(image:get-width($img) * image:get-height($img))
… returns nothing.
Is the function somehow limited in getting more information at once?