Name

ext:image-properties — Return intrinsic properties of an image.

Function:
{http://docbook.org/extensions/xslt}image-properties#1

Synopsis

ext:image-properties($filename as xs:string) as map(*)

Description

This extension function returns the intrinsic size of an image: its width and height in pixels. If the size can be determined, the map returned will have a “width” key whose value is the width of the image and a “height” key whose value is the height of the image. Both sizes will be integral numbers of pixels.

The ext:image-metadata() function provides better results. It should be preferred unless the metadata-extractor libraries are unavailable.