manual/Tasks/image.html [542:581]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You can define filename transformations by using a
nested mapper element. The default mapper used
by <image>
is the identity
mapper.
You can also use a filenamemapper
type in place of the mapper
element.
Create thumbnails of my images and make sure they all fit within the 160×160 pixel size whether the image is portrait or landscape.
<image destdir="samples/low" overwrite="yes"> <fileset dir="samples/full"> <include name="**/*.jpg"/> </fileset> <scale width="160" height="160" proportions="fit"/> </image>
Create a thumbnail for all PNG files in src of the size of 40 pixels keeping the proportions and store the src.
<image srcdir="src" includes="*.png"> <scale proportions="width" width="40"/> </image>
Same as above but store the result in dest.
<image srcdir="src" destdir="dest" includes="*.png"> <scale proportions="width" width="40"/> </image>
Same as above but store the result to files with original names prefixed by scaled-.
<image srcdir="src" destdir="dest" includes="*.png"> <scale proportions="width" width="40"/> <globmapper from="*" to="scaled-*"/> </image>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - manual/Tasks/imageio.html [656:695]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You can define filename transformations by using a
nested mapper element. The default mapper used
by <image>
is the identity
mapper.
You can also use a filenamemapper
type in place of the mapper
element.
Create thumbnails of my images and make sure they all fit within the 160×160 pixel size whether the image is portrait or landscape.
<image destdir="samples/low" overwrite="yes"> <fileset dir="samples/full"> <include name="**/*.jpg"/> </fileset> <scale width="160" height="160" proportions="fit"/> </image>
Create a thumbnail for all PNG files in src of the size of 40 pixels keeping the proportions and store the src.
<image srcdir="src" includes="*.png"> <scale proportions="width" width="40"/> </image>
Same as above but store the result in dest.
<image srcdir="src" destdir="dest" includes="*.png"> <scale proportions="width" width="40"/> </image>
Same as above but store the result to files with original names prefixed by scaled-.
<image srcdir="src" destdir="dest" includes="*.png"> <scale proportions="width" width="40"/> <globmapper from="*" to="scaled-*"/> </image>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -