[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Image size with XSL?

Subject: Re: Image size with XSL?
From: "Mark Wilson mark@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Dec 2016 20:15:07 -0000
Re:  Image size with XSL?
Thanks Graydon,
I will look into what you have said and not post further here as apparently XSLT is not going to come to my rescue.
Mark


On 12/18/2016 1:03 PM, Graydon graydon@xxxxxxxxx wrote:
On Sun, Dec 18, 2016 at 07:54:10PM -0000, Mark Wilson mark@xxxxxxxxxxxx scripsit:
[snip]
I would like to add the placement-index to the XML data source
programmatically. Is there a way to obtain the height or width of a jpeg
image from the file itself (image.jpg, for instance) using XSLT? Or, can
someone suggest another way to do this programmatically?
You can't do that directly with XSLT. (Well... Turing-complete
programming language.  You can't do that easily and absent considerable
suffering with XSLT.)  The usual way is to use something
like http://www.graphicsmagick.org/ and a scripting language to extract
the information you want and to stick it in meta-data XML files
associated with the image.  (So you'd have image.jpg and
image_meta.xml.)  Then XSLT can read the image_meta.xml file to get the
necessary information.

This has problems because when you have lots of little files file-IO
tends to dominate your run time, but it's also hard to avoid, and at
least this way you have the prospect of stuffing all the imagine meta
into a single collection at the start.

-- Graydon

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.