d246d82000-06-01Martin Nilsson <h2>Image cache attributes</h2>
70d0782000-11-19Kenneth Johansson <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><c>gif</c><c>Graphics Interchange Format (might be missing in your roxen)</c></row> <row><c>jpeg</c><c>Joint Photography Expert Group image compression</c></row> <row><c>png</c><c>Portable Networks Graphics</c></row> <row><c>avs</c><c></c></row> <row><c>bmp</c><c>Windows BitMaP file</c></row> <row><c>gd</c><c></c></row> <row><c>hrz</c><c>HRZ is (was?) used for amatuer radio slow-scan TV.</c></row> <row><c>ilbm</c><c></c></row> <row><c>pcx</c><c>Zsoft PCX file format (PC / DOS)</c></row> <row><c>pnm</c><c>Portable AnyMap</c></row> <row><c>ps</c><c>Adobe PostScript file</c></row> <row><c>pvr</c><c>Pover VR (dreamcast image)</c></row> <row><c>tga</c><c>TrueVision Targa (PC / DOS)</c></row> <row><c>tiff</c><c>Tag Image File Format</c></row> <row><c>wbf</c><c>WAP Bitmap File</c></row> <row><c>xbm</c><c>XWindows Bitmap File</c></row> <row><c>xpm</c><c>XWindows Pixmap File</c></row> </xtable>
d246d82000-06-01Martin Nilsson <ex> <### format='png'/> </ex> <ex> <### format='gif'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='quant' value='number' default='format dependant'><p> The number of colors to quantizize the image to.</p>
d246d82000-06-01Martin Nilsson <p> Default for gif is 32(+1 transparent), for most other formats (except black and white) is it unlimited.</p> <ex> <### quant='2'/> </ex> </attr> <h3>Color/alpha attributes</h3>
70d0782000-11-19Kenneth Johansson <attr name='dither' value='none|random|floyd-steinberg' default='none'><p> Choose the dithering method.</p> <xtable> <row><c>none</c><c>No dithering is performed at all.</c></row> <row><c>random</c><c>Random scatter dither. Not visually pleasing, but it is useful for very high resolution printing.</c></row> <row><c>floyd-steinberg</c><c>Error diffusion dithering. Usually the best dithering method.</c></row> </xtable>
d246d82000-06-01Martin Nilsson  <ex> <### dither='random' quant='10'/> </ex> <ex> <### dither='floyd-steinberg' quant='10'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='true-alpha'><p>
d246d82000-06-01Martin Nilsson  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
70d0782000-11-19Kenneth Johansson  dithered using a floyd-steinberg dither.</p>
d246d82000-06-01Martin Nilsson  <ex> <### opaque-value='20'/> </ex> <ex> <### opaque-value='20' true-alpha='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='background-color' value='color' default='taken from the page'><p> The color to render the image against.</p>
d246d82000-06-01Martin Nilsson <ex> <### background-color='red' opaque-value='50'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='opaque-value' value='percentage' default='100'><p>
d246d82000-06-01Martin Nilsson  The transparency value to use, 100 is fully opaque, and 0 is fully
70d0782000-11-19Kenneth Johansson  transparent.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='cs-rgb-hsv' value='0|1' default='0'><p> Perform rgb to hsv colorspace conversion.</p>
d246d82000-06-01Martin Nilsson <ex> <### cs-rgb-hsv='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='gamma' value='number' default='1.0'><p> Perform gamma adjustment.</p>
d246d82000-06-01Martin Nilsson <ex> <### gamma='0.5'/> </ex> <ex> <### gamma='1.5'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='cs-grey' value='0|1' default='0'><p> Perform rgb to greyscale colorspace conversion.</p>
d246d82000-06-01Martin Nilsson <ex> <### cs-grey='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='cs-invert' value='0|1' default='0'><p> Invert all colors</p>
d246d82000-06-01Martin Nilsson <ex> <### cs-invert='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='cs-hsv-rgb' value='0|1' default='0'><p> Perform hsv to rgb colorspace conversion.</p>
d246d82000-06-01Martin Nilsson <ex> <### cs-hsv-rgb='1'/> </ex> </attr> <h3>Transform attributes</h3>
70d0782000-11-19Kenneth Johansson <attr name='rotate-cw' value='degree' default='0'><p> Rotate the image clock-wise.</p>
d246d82000-06-01Martin Nilsson <ex> <### rotate-cw='20'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='rotate-ccw' value='degree' default='0'><p> Rotate the image counter clock-wise.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='rotate-unit' value='rad|deg|ndeg|part' default='deg'><p> Select the unit to use while rotating.</p>
d246d82000-06-01Martin Nilsson 
70d0782000-11-19Kenneth Johansson <xtable> <row><c>rad</c><c>Radians</c></row> <row><c>deg</c><c>Degrees</c></row> <row><c>ndeg</c><c>'New' degrees (400 for each full rotation)</c></row> <row><c>part</c><c>0 - 1.0 (1.0 == full rotation)</c></row> </xtable>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='mirror-x' value='0|1' default='0'><p> Mirror the image around the X-axis.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='mirror-y' value='0|1' default='0'><p> Mirror the image around the Y-axis.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='scale' value='fact' default='1.0'><p> Scale fact times. (0.5 -> half size, 2.0 -> double size)</p>
d246d82000-06-01Martin Nilsson <ex> <### scale='0.5'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='scale' value='x,y'><p>
d246d82000-06-01Martin Nilsson  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
70d0782000-11-19Kenneth Johansson  is scaled in proportion to the other value.</p>
d246d82000-06-01Martin Nilsson <ex> <### scale='20,50'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='max-width' value='xsize'><p>
d246d82000-06-01Martin Nilsson  If width is larger than 'xsize', scale width to 'xsize' while
70d0782000-11-19Kenneth Johansson  keeping aspect.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='max-height' value='ysize'><p>
d246d82000-06-01Martin Nilsson  If width is larger than 'ysize', scale width to 'ysize' while
70d0782000-11-19Kenneth Johansson  keeping aspect.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='x-offset' value='pixels' default='0'><p> Cut n pixels from the beginning of the X scale.</p>
d246d82000-06-01Martin Nilsson <ex> <### x-offset='100'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='y-offset' value='pixels' default='0'><p> Cut n pixels from the beginning of the Y scale.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='x-size' value='pixels' default='whole image'><p> Keep n pixels from the beginning of the X scale.</p>
d246d82000-06-01Martin Nilsson <ex> <### x-size='100'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='y-size' value='pixels' default='whole image'><p> Keep n pixels from the beginning of the Y scale.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name=crop value='x0,y0-x1,y1' default='whole image'><p> Crop the image by specifying the pixel coordinates.</p>
d246d82000-06-01Martin Nilsson <ex> <### crop='50,28-150,92'/> </ex> </attr> <h3>Format specific attributes</h3>
70d0782000-11-19Kenneth Johansson <attr name='jpeg-quality' value='percentage' default='75'><p> Set the quality on the output jpeg image.</p>
d246d82000-06-01Martin Nilsson <ex> <### format='jpeg' jpeg-quality='30'/> </ex> <ex> <### format='jpeg' jpeg-quality='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='jpeg-optimize' value='0|1' default='1'><p>
d246d82000-06-01Martin Nilsson  If 0, do not generate optimal tables. Somewhat faster, but produces
70d0782000-11-19Kenneth Johansson  bigger files.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='jpeg-progressive=' value='0|1' default='0'><p> Generate progressive jpeg images.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='jpeg-smooth' value='0-100' default='0'><p>
d246d82000-06-01Martin Nilsson  Smooth the image while compressing it. This produces smaller files,
70d0782000-11-19Kenneth Johansson  but might undo the effects of dithering.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='bmp-bpp' value='1,4,8,24' default='24'><p> Force this number of bits per pixel for bmp images.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='bmp-windows' value='0|1' default='1'><p> Windows or OS/2 mode, default is 1. (windows mode)</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='bmp-rle' value='0|1' default='0'><p> RLE 'compress' the BMP image.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='gd-alpha_index' value='color' default='0'><p>
d246d82000-06-01Martin Nilsson  Color in the colormap to make transparent for GD-images with alpha
70d0782000-11-19Kenneth Johansson  channel.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='pcx-raw' value='1|0' default='0'><p> If 1, do not RLE encode the PCX image.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='pcx-dpy' value='0-10000000.0' default='75.0'><p> Resolution, in pixels per inch.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='pcx-xdpy' value='0-10000000.0' default='75.0'><p> Resolution, in pixels per inch.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='pcx-ydpy' value='0-10000000.0' default='75.><p> Resolution, in pixels per inch.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='pcx-xoffset' value='0-imagexsize-2' default='0'><p>
d246d82000-06-01Martin Nilsson  Offset from start of image data to image content for PCX images.
70d0782000-11-19Kenneth Johansson  Unused by most programs.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='pcx-yoffset' value='0-imageysize-2' default='0'><p>
d246d82000-06-01Martin Nilsson  Offset from start of image data to image content for PCX images.
70d0782000-11-19Kenneth Johansson  Unused by most programs.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='tga-raw' value='1|0' default='0'><p> If 1, do not RLE encode the Targa image.</p>
d246d82000-06-01Martin Nilsson </attr>
70d0782000-11-19Kenneth Johansson <attr name='ps-dpi' value='0-10000000.0' default='75.0'><p> Dots per inch for the resulting postscript file.</p>
612ed22000-08-29Kenneth Johansson </attr>>