Re: [xep-support] Dynamically rotating images

From: Adam F. Rogoyski (rogoyski@math.utexas.edu)
Date: Tue Nov 11 2003 - 18:26:12 PST

  • Next message: Fusti, Steve: "RE: [xep-support] fo:float alignment"

    On Tue, 11 Nov 2003, Ryan Graham wrote:

    > I was wondering if it is possible to check the dimensions of an image while
    > processing (example dimensions: 900wide x 300 tall), and if it is too wide
    > for my page, rotate it 90 degrees on the page to simulate the way
    > traditional books deal with these types of images (and to avoid "no space
    > for an element, trying to recover" errors). Has anyone attempted anything
    > similar, or can you point me in the right direction??

       Perhaps you could create an xml file with tags

    <images>
            <image>
                    <name>a.jpg</name>
                    <width>640</width>
                    <height>480</height>
            </image>
                    .
                    .
                    .
    </images>

    or something. You could automatically compute this with a script using
    imagemagick's identify or the file command in linux. Then in your xsl
    file you could just declare a variable like

    <xsl:variable name="width"
    select="document('images.xml')/images/image[name='a.jpg']/width"/>

    and use the width and height variables to decide how to rotate the image.

       Adam Rogoyski
    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Tue Nov 11 2003 - 18:29:01 PST