[Kde-imaging] [PATCH] HTML Export: allow download of full-size original image

Colin McMillen mcmillen at cs.cmu.edu
Sat Apr 28 17:23:10 CEST 2007


Hi all,

This patch adds new functionality to the HTML export plugin.  The idea
is that the user may want to show a scaled-down (e.g. 1024x768) image
on their web site, but still allow visitors to download the full-size
original image.

The "Image Settings" dialog of the HTML export plugin now contains a
new checkbox: "Include full-size original images for download".  If
this is checked, full-size images with names like "original_*.jpeg"
will be copied to the output directory.  Data about the original image
is also added to the gallery.xml file, like:

<original fileName="original_*.jpeg" height="1704" width="2272"/>

This allows themes to support a "download original image" link by
adding a snippet like the following:

            <xsl:if test="original/@fileName != ''">
                <p>
                <a href="{original/@fileName}">Download original image</a>
                </p>
            </xsl:if>

This means that no HTML will be generated if the "Include full-size
original images for download" wasn't clicked.  In this case, the
behavior and output of the plugin is exactly the same as before.

The patch also includes the EXIF rotation fix that I posted earlier,
since I don't believe that's been applied to SVN yet.

I haven't yet changed the default themes to take advantage of this new
functionality -- that will come in a later patch.

Cheers,
Colin

-- 
Colin McMillen - http://www.colinm.org - PGP: E2A793A0
Computer Science Ph.D. Candidate, Carnegie Mellon University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: original-image-download.patch
Type: text/x-patch
Size: 3829 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-imaging/attachments/20070428/2b8f9501/attachment.bin 


More information about the Kde-imaging mailing list