<h2>Image cache attributes</h2> |
|
<attr name='format' value='gif|jpeg|png|avs|gmp|bd|hrz|ilbm|psx|pnm|ps|pvr|tga|tiff|wbf|xbm|xpm' default='gif'><p> |
The format to encode the image to. The formats available are:</p> |
<xtable> |
<row><h>Acronym</h><h>Acronym interpretation</h></row> |
<row><c><p>gif</p></c><c><p>Graphics Interchange Format (might be missing in your roxen)</p></c></row> |
<row><c><p>jpeg</p></c><c><p>Joint Photography Expert Group image compression</p></c></row> |
<row><c><p>png</p></c><c><p>Portable Networks Graphics</p></c></row> |
<row><c><p>avs</p></c><c><p>Advanced Visual Systems Inc. image format</p></c></row> |
<row><c><p>bmp</p></c><c><p>Windows BitMaP file</p></c></row> |
<row><c><p>gd</p></c><c><p>Internal format used by libgd</p></c></row> |
<row><c><p>hrz</p></c><c><p>HRZ is (was?) used for amatuer radio slow-scan TV.</p></c></row> |
<row><c><p>ilbm</p></c><c><p>Interchangeable File Format: interleaved bitmap</p></c></row> |
<row><c><p>pcx</p></c><c><p>Zsoft PCX file format (PC / DOS)</p></c></row> |
<row><c><p>pnm</p></c><c><p>Portable AnyMap</p></c></row> |
<row><c><p>ps</p></c><c><p>Adobe PostScript file</p></c></row> |
<row><c><p>pvr</p></c><c><p>Pover VR (dreamcast image)</p></c></row> |
<row><c><p>tga</p></c><c><p>TrueVision Targa (PC / DOS)</p></c></row> |
<row><c><p>tiff</p></c><c><p>Tag Image File Format</p></c></row> |
<row><c><p>wbf</p></c><c><p>WAP Bitmap File</p></c></row> |
<row><c><p>xbm</p></c><c><p>XWindows Bitmap File</p></c></row> |
<row><c><p>xpm</p></c><c><p>XWindows Pixmap File</p></c></row> |
</xtable> |
<ex type='vert'> |
<### format='png'/> |
</ex> |
<ex type='vert'> |
<### format='gif'/> |
</ex> |
</attr> |
|
|
<attr name='quant' value='number' default='format dependant'><p> |
The number of colors to quantizize the image to.</p> |
<p> |
Default for gif is 32(+1 transparent), for most other formats |
(except black and white) is it unlimited.</p> |
|
<ex type='vert'> |
<### quant='2'/> |
</ex> |
|
</attr> |
|
<h3>Color/alpha attributes</h3> |
|
<attr name='dither' value='none|random|floyd-steinberg' default='none'><p> |
Choose the dithering method.</p> |
<xtable> |
<row><h>Method</h><h>Meaning</h></row> |
<row><c><p>none</p></c><c><p>No dithering is performed at all.</p></c></row> |
<row><c><p>random</p></c><c><p>Random scatter dither. Not visually pleasing, but it is useful for very high resolution printing.</p></c></row> |
<row><c><p>floyd-steinberg</p></c><c><p>Error diffusion dithering. Usually the best dithering method.</p></c></row> |
</xtable> |
|
<ex type='vert'> |
<### dither='random' quant='10'/> |
</ex> |
<ex type='vert'> |
<### dither='floyd-steinberg' quant='10'/> |
</ex> |
</attr> |
|
<attr name='true-alpha'><p> |
If present, render a real alpha channel instead of on/off alpha. If |
the file format only supports on/off alpha, the alpha channel is |
dithered using a floyd-steinberg dither.</p> |
|
<ex type='vert'> |
<### opaque-value='20'/> |
</ex> |
<ex type='vert'> |
<### opaque-value='20' true-alpha='1'/> |
</ex> |
</attr> |
|
<attr name='background-color' value='color' default='taken from the page'><p> |
The color to render the image against.</p> |
<ex type='vert'> |
<### background-color='red' opaque-value='50'/> |
</ex> |
</attr> |
|
<attr name='opaque-value' value='percentage' default='100'><p> |
The transparency value to use, 100 is fully opaque, and 0 is fully |
transparent.</p> |
</attr> |
|
<attr name='cs-rgb-hsv' value='0|1' default='0'><p> |
Perform rgb to hsv colorspace conversion.</p> |
<ex type='vert'> |
<### cs-rgb-hsv='1'/> |
</ex> |
</attr> |
|
<attr name='gamma' value='number' default='1.0'><p> |
Perform gamma adjustment.</p> |
<ex type='vert'> |
<### gamma='0.5'/> |
</ex> |
<ex type='vert'> |
<### gamma='1.5'/> |
</ex> |
</attr> |
|
<attr name='cs-grey' value='0|1' default='0'><p> |
Perform rgb to greyscale colorspace conversion.</p> |
<ex type='vert'> |
<### cs-grey='1'/> |
</ex> |
</attr> |
|
<attr name='cs-invert' value='0|1' default='0'><p> |
Invert all colors</p> |
<ex type='vert'> |
<### cs-invert='1'/> |
</ex> |
</attr> |
|
<attr name='cs-hsv-rgb' value='0|1' default='0'><p> |
Perform hsv to rgb colorspace conversion.</p> |
<ex type='vert'> |
<### cs-hsv-rgb='1'/> |
</ex> |
</attr> |
|
<h3>Transform attributes</h3> |
|
<attr name='rotate-cw' value='degree' default='0'><p> |
Rotate the image clock-wise.</p> |
<ex type='vert'> |
<### rotate-cw='20'/> |
</ex> |
</attr> |
|
<attr name='rotate-ccw' value='degree' default='0'><p> |
Rotate the image counter clock-wise.</p> |
</attr> |
|
<attr name='rotate-unit' value='rad|deg|ndeg|part' default='deg'><p> |
Select the unit to use while rotating.</p> |
|
<xtable> |
<row><h>Unit</h><h>Meaning</h></row> |
<row><c><p>rad</p></c><c><p>Radians</p></c></row> |
<row><c><p>deg</p></c><c><p>Degrees</p></c></row> |
<row><c><p>ndeg</p></c><c><p>'New' degrees (400 for each full rotation)</p></c></row> |
<row><c><p>part</p></c><c><p>0 - 1.0 (1.0 == full rotation)</p></c></row> |
</xtable> |
</attr> |
|
<attr name='mirror-x' value='0|1' default='0'><p> |
Mirror the image around the X-axis.</p> |
</attr> |
|
<attr name='mirror-y' value='0|1' default='0'><p> |
Mirror the image around the Y-axis.</p> |
</attr> |
|
<attr name='scale' value='fact' default='1.0'><p> |
Scale fact times. (0.5 -> half size, 2.0 -> double size)</p> |
<ex> |
<### scale='0.5'/> |
</ex> |
</attr> |
|
<attr name='scale' value='x,y'><p> |
Scale to the exact size x,y. If either of X or Y is zero, the image |
is scaled to the specified width or hight, and the value that is zero |
is scaled in proportion to the other value.</p> |
<ex> |
<### scale='20,50'/> |
</ex> |
</attr> |
|
<attr name='max-width' value='xsize'><p> |
If width is larger than 'xsize', scale width to 'xsize' while |
keeping aspect.</p> |
</attr> |
|
<attr name='max-height' value='ysize'><p> |
If height is larger than 'ysize', scale height to 'ysize' while |
keeping aspect.</p> |
</attr> |
|
<attr name='span-width' value='xsize'><p> |
If width is larger than 'xsize', scale width to 'xsize' while |
keeping aspect. If width is smaller than 'xsize', extend width |
to 'xsize' by filling the new space with current background color.</p> |
<ex> |
<### span-width="350" background-color='white'/> |
</ex> |
</attr> |
|
<attr name='span-height' value='ysize'><p> |
If height is larger than 'ysize', scale height to 'ysize' while |
keeping aspect. If height is smaller than 'ysize', extend height |
to 'ysize' by filling the new space with current background color.</p> |
<ex> |
<### span-height="350" background-color='white'/> |
</ex> |
</attr> |
|
<attr name='x-offset' value='pixels' default='0'><p> |
Cut n pixels from the beginning of the X scale.</p> |
<ex type='vert'> |
<### x-offset='100'/> |
</ex> |
</attr> |
|
<attr name='y-offset' value='pixels' default='0'><p> |
Cut n pixels from the beginning of the Y scale.</p> |
</attr> |
|
<attr name='x-size' value='pixels' default='whole image'><p> |
Keep n pixels from the beginning of the X scale.</p> |
<ex> |
<### x-size='100'/> |
</ex> |
</attr> |
|
<attr name='y-size' value='pixels' default='whole image'><p> |
Keep n pixels from the beginning of the Y scale.</p> |
</attr> |
|
<attr name='crop' value='x1,y1-x2,y2|auto|guides-cross|guides-region'><p> |
Crops the image by using several differen methods. The simplest is to only |
specify the area to be cropped with x,y-x,y coordinates. By instead |
selecting "auto" the image will be cropped so that as many pixels as possible |
with the same color is removed from around the image.</p> |
|
<p>A more advanced cropping method can be used by giving the crop argument |
"guides-cross". The image will then be cropped around the intersection of |
two guides inside the image. Guides can be added to e.g. Photoshop and |
GIMP images. If several guides are present, which ones to use can be |
selected with the guides-index=x,y attribute, where x and y is the number |
of the guides. Guides cross cropping is usefull together with max-width |
and max-height attributes when creating thumb nails.</p> |
|
<p>A combination of guides cross cropping can be used by giving the crop |
argument "guides-region". In this cropping mode the area enclosed by |
two horizontal and two vertical guides are saved. Which guides to use |
is given by the guides-index=x1,y1-x2,y2 attribute, where the x and y |
parameters are the number of the guides. Guides can also be specified as |
guides-index=x,y. Then the saved area will be the one enclosed by the |
buides x,y and x+1,y+1, counting from left and top. Again, combine max-width |
and max-height makes a good effect, since scaling is performed after cropping.</p> |
|
<ex type='vert'> |
<### crop='50,28-150,92'/> |
</ex> |
|
</attr> |
|
<h3>Format specific attributes</h3> |
|
<attr name='jpeg-quality' value='percentage' default='75'><p> |
Set the quality on the output jpeg image.</p> |
<ex type='vert'> |
<### format='jpeg' jpeg-quality='30'/> |
</ex> |
<ex type='vert'> |
<### format='jpeg' jpeg-quality='1'/> |
</ex> |
</attr> |
|
<attr name='jpeg-optimize' value='0|1' default='1'><p> |
If 0, do not generate optimal tables. Somewhat faster, but produces |
bigger files.</p> |
</attr> |
|
<attr name='jpeg-progressive=' value='0|1' default='0'><p> |
Generate progressive jpeg images.</p> |
</attr> |
|
<attr name='jpeg-smooth' value='0-100' default='0'><p> |
Smooth the image while compressing it. This produces smaller files, |
but might undo the effects of dithering.</p> |
</attr> |
|
<attr name='bmp-bpp' value='1,4,8,24' default='24'><p> |
Force this number of bits per pixel for bmp images.</p> |
</attr> |
|
<attr name='bmp-windows' value='0|1' default='1'><p> |
Windows or OS/2 mode, default is 1. (windows mode)</p> |
</attr> |
|
<attr name='bmp-rle' value='0|1' default='0'><p> |
RLE 'compress' the BMP image.</p> |
</attr> |
|
<attr name='gd-alpha_index' value='color' default='0'><p> |
Color in the colormap to make transparent for GD-images with alpha |
channel.</p> |
</attr> |
|
<attr name='pcx-raw' value='1|0' default='0'><p> |
If 1, do not RLE encode the PCX image.</p> |
</attr> |
|
<attr name='pcx-dpy' value='0-10000000.0' default='75.0'><p> |
Resolution, in pixels per inch.</p> |
</attr> |
|
<attr name='pcx-xdpy' value='0-10000000.0' default='75.0'><p> |
Resolution, in pixels per inch.</p> |
</attr> |
|
<attr name='pcx-ydpy' value='0-10000000.0' default='75.0'><p> |
Resolution, in pixels per inch.</p> |
</attr> |
|
<attr name='pcx-xoffset' value='0-imagexsize-2' default='0'><p> |
Offset from start of image data to image content for PCX images. |
Unused by most programs.</p> |
</attr> |
|
<attr name='pcx-yoffset' value='0-imageysize-2' default='0'><p> |
Offset from start of image data to image content for PCX images. |
Unused by most programs.</p> |
</attr> |
|
<attr name='tga-raw' value='1|0' default='0'><p> |
If 1, do not RLE encode the Targa image.</p> |
</attr> |
|
<attr name='ps-dpi' value='0-10000000.0' default='75.0'><p> |
Dots per inch for the resulting postscript file.</p> |
</attr> |
|