W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2014

Re: Image dimensions?

From: Norman Walsh <ndw@nwalsh.com>
Date: Tue, 29 Apr 2014 16:24:30 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <87ppjzg775.fsf@nwalsh.com>
Erik Siegel <erik@xatapult.nl> writes:
> Is there any way to find the dimensions of an image file from inside an XProc
> pipeline?

There's a metadata-extractor step that does this:

<p:declare-step type="cx:metadata-extractor">
   <p:output port="result"/>
   <p:option name="href" cx:type="xsd:anyURI"/>

Unfortunately, it's a little fiddly to setup because the underlying
library is transitioning from one API to another.

There's also a Saxon extension function you can run from XSLT that
will do it. It's part of the DocBook stylesheets.

                                        Be seeing you,

Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676

Received on Tuesday, 29 April 2014 21:25:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:19 UTC