d246d82000-06-01Martin Nilsson <h2>Image cache attributes</h2>
976c4d2001-04-09Kenneth Johansson <attr name='format' value='gif|jpeg|png|avs|gmp|bd|hrz|ilbm|psx|pnm|ps|pvr|tga|tiff|wbf|wbmp|xbm|xpm' default='gif'><p>
70d0782000-11-19Kenneth Johansson  The format to encode the image to. The formats available are:</p> <xtable>
976c4d2001-04-09Kenneth Johansson <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></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></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 (WAP 1.0)</p></c></row> <row><c><p>wbmp</p></c><c><p>Wireless Bitmap Format (WAP 1.1-)</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>
70d0782000-11-19Kenneth Johansson </xtable>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### format='png'/> </ex>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
976c4d2001-04-09Kenneth Johansson <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>
70d0782000-11-19Kenneth Johansson </xtable>
d246d82000-06-01Martin Nilsson 
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### dither='random' quant='10'/> </ex>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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 
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### opaque-value='20'/> </ex>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### cs-rgb-hsv='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='gamma' value='number' default='1.0'><p> Perform gamma adjustment.</p>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### gamma='0.5'/> </ex>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### cs-grey='1'/> </ex> </attr>
70d0782000-11-19Kenneth Johansson <attr name='cs-invert' value='0|1' default='0'><p> Invert all colors</p>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
976c4d2001-04-09Kenneth Johansson <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>
70d0782000-11-19Kenneth Johansson </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>
0192bf2001-02-20Kenneth Johansson  If height is larger than 'ysize', scale height to 'ysize' while
70d0782000-11-19Kenneth Johansson  keeping aspect.</p>
d246d82000-06-01Martin Nilsson </attr>
0192bf2001-02-20Kenneth Johansson <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>
6555852001-03-12Johan Sundström <ex type='vert'>
0192bf2001-02-20Kenneth Johansson <### 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>
6555852001-03-12Johan Sundström <ex type='vert'>
0192bf2001-02-20Kenneth Johansson <### span-height="350" background-color='white'/> </ex> </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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### format='jpeg' jpeg-quality='30'/> </ex>
0192bf2001-02-20Kenneth Johansson <ex type='vert'>
d246d82000-06-01Martin Nilsson <### 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>>