docs.roxen.comBack to normal mode
DocsRoxen2.1Web Site Creator ManualGraphics Tags
Copyright © 2001, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

<cimg-url/>

Provided by module: Image converter

This tag generates an URI to the manipulated picture. <cimg-url> takes the same attributes as <cimg>, including the image cache attributes. The use for the tag is to insert image-URI's into various places, e.g. a submit-box.


Attributes

src="uri"

The path to the indata file.


<cimg-url src='/internal-roxen-testimage'/>
/_internal/cimg!0/c8c.png

data="imagedata"

Insert images from other sources, e.g. databases through entities or variables.



<emit source='sql' query='select imagedata from images where id=37'>
<cimg-url data='&sql.imagedata;'/>
</emit>

format="{gif, jpeg, png, avs, gmp, bd, hrz, ilbm, psx, pnm, ps, pvr, tga, tiff, wbf, wbmp, xbm, xpm}" (gif)

The format to encode the image to. The formats available are:

AcronymAcronym interpretation

gif

Graphics Interchange Format (might be missing in your roxen)

jpeg

Joint Photography Expert Group image compression

png

Portable Networks Graphics

avs

Advanced Visual Systems Inc. image format

bmp

Windows BitMaP file

gd

Internal format used by libgd

hrz

HRZ is (was?) used for amatuer radio slow-scan TV.

ilbm

Interchangeable File Format: interleaved bitmap

pcx

Zsoft PCX file format (PC / DOS)

pnm

Portable AnyMap

ps

Adobe PostScript file

pvr

Pover VR (dreamcast image)

tga

TrueVision Targa (PC / DOS)

tiff

Tag Image File Format

wbf

WAP Bitmap File (WAP 1.0)

wbmp

Wireless Bitmap Format (WAP 1.1-)

xbm

XWindows Bitmap File

xpm

XWindows Pixmap File



<cimg-url src='/internal-roxen-testimage' format='png'/>
/_internal/cimg!0/c8c.png


<cimg-url src='/internal-roxen-testimage' format='gif'/>
/_internal/cimg!0/a43.gif

quant="number" (format dependant)

The number of colors to quantizize the image to.

Default for gif is 32(+1 transparent), for most other formats (except black and white) is it unlimited.



<cimg-url src='/internal-roxen-testimage' quant='2'/>
/_internal/cimg!0/31e.png

dither="{none, random, floyd-steinberg}" (none)

Choose the dithering method.

MethodMeaning

none

No dithering is performed at all.

random

Random scatter dither. Not visually pleasing, but it is useful for very high resolution printing.

floyd-steinberg

Error diffusion dithering. Usually the best dithering method.



<cimg-url src='/internal-roxen-testimage' dither='random' quant='10'/>
/_internal/cimg!0/eef.png


<cimg-url src='/internal-roxen-testimage' dither='floyd-steinberg' quant='10'/>
/_internal/cimg!0/3bf4.png

true-alpha

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.



<cimg-url src='/internal-roxen-testimage' opaque-value='20'/>
/_internal/cimg!0/d21.png


<cimg-url src='/internal-roxen-testimage' opaque-value='20' true-alpha='1'/>
/_internal/cimg!0/fb0.png

background-color="color" (taken from the page)

The color to render the image against.



<cimg-url src='/internal-roxen-testimage' background-color='red' opaque-value='50'/>
/_internal/cimg!0/54b3.png

opaque-value="percentage" (100)

The transparency value to use, 100 is fully opaque, and 0 is fully transparent.


cs-rgb-hsv="{0, 1}" (0)

Perform rgb to hsv colorspace conversion.



<cimg-url src='/internal-roxen-testimage' cs-rgb-hsv='1'/>
/_internal/cimg!0/5a4a.png

gamma="number" (1.0)

Perform gamma adjustment.



<cimg-url src='/internal-roxen-testimage' gamma='0.5'/>
/_internal/cimg!0/488.png


<cimg-url src='/internal-roxen-testimage' gamma='1.5'/>
/_internal/cimg!0/8fb.png

cs-grey="{0, 1}" (0)

Perform rgb to greyscale colorspace conversion.



<cimg-url src='/internal-roxen-testimage' cs-grey='1'/>
/_internal/cimg!0/741.png

cs-invert="{0, 1}" (0)

Invert all colors



<cimg-url src='/internal-roxen-testimage' cs-invert='1'/>
/_internal/cimg!0/a6a8.png

cs-hsv-rgb="{0, 1}" (0)

Perform hsv to rgb colorspace conversion.



<cimg-url src='/internal-roxen-testimage' cs-hsv-rgb='1'/>
/_internal/cimg!0/2b9.png

rotate-cw="degree" (0)

Rotate the image clock-wise.



<cimg-url src='/internal-roxen-testimage' rotate-cw='20'/>
/_internal/cimg!0/192.png

rotate-ccw="degree" (0)

Rotate the image counter clock-wise.


rotate-unit="{rad, deg, ndeg, part}" (deg)

Select the unit to use while rotating.

UnitMeaning

rad

Radians

deg

Degrees

ndeg

'New' degrees (400 for each full rotation)

part

0 - 1.0 (1.0 == full rotation)


mirror-x="{0, 1}" (0)

Mirror the image around the X-axis.


mirror-y="{0, 1}" (0)

Mirror the image around the Y-axis.


scale="fact" (1.0)

Scale fact times. (0.5 -> half size, 2.0 -> double size)



<cimg-url src='/internal-roxen-testimage' scale='0.5'/>
/_internal/cimg!0/ca.png

scale="x,y"

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.



<cimg-url src='/internal-roxen-testimage' scale='20,50'/>
/_internal/cimg!0/867.png

max-width="xsize"

If width is larger than 'xsize', scale width to 'xsize' while keeping aspect.


max-height="ysize"

If height is larger than 'ysize', scale height to 'ysize' while keeping aspect.


span-width="xsize"

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.



<cimg-url src='/internal-roxen-testimage' span-width="350" background-color='white'/>
/_internal/cimg!0/1e12.png

span-height="ysize"

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.



<cimg-url src='/internal-roxen-testimage' span-height="350" background-color='white'/>
/_internal/cimg!0/b76.png

x-offset="pixels" (0)

Cut n pixels from the beginning of the X scale.



<cimg-url src='/internal-roxen-testimage' x-offset='100'/>
/_internal/cimg!0/44a.png

y-offset="pixels" (0)

Cut n pixels from the beginning of the Y scale.


x-size="pixels" (whole image)

Keep n pixels from the beginning of the X scale.



<cimg-url src='/internal-roxen-testimage' x-size='100'/>
/_internal/cimg!0/cd48.png

y-size="pixels" (whole image)

Keep n pixels from the beginning of the Y scale.


crop="x0,y0-x1,y1" (whole image)

Crop the image by specifying the pixel coordinates.



<cimg-url src='/internal-roxen-testimage' crop='50,28-150,92'/>
/_internal/cimg!0/3ba.png

jpeg-quality="percentage" (75)

Set the quality on the output jpeg image.



<cimg-url src='/internal-roxen-testimage' format='jpeg' jpeg-quality='30'/>
/_internal/cimg!0/d2b.jpeg


<cimg-url src='/internal-roxen-testimage' format='jpeg' jpeg-quality='1'/>
/_internal/cimg!0/6287.jpeg

jpeg-optimize="{0, 1}" (1)

If 0, do not generate optimal tables. Somewhat faster, but produces bigger files.


jpeg-progressive=="{0, 1}" (0)

Generate progressive jpeg images.


jpeg-smooth="0-100" (0)

Smooth the image while compressing it. This produces smaller files, but might undo the effects of dithering.


bmp-bpp="1,4,8,24" (24)

Force this number of bits per pixel for bmp images.


bmp-windows="{0, 1}" (1)

Windows or OS/2 mode, default is 1. (windows mode)


bmp-rle="{0, 1}" (0)

RLE 'compress' the BMP image.


gd-alpha_index="color" (0)

Color in the colormap to make transparent for GD-images with alpha channel.


pcx-raw="{1, 0}" (0)

If 1, do not RLE encode the PCX image.


pcx-dpy="0-10000000.0" (75.0)

Resolution, in pixels per inch.


pcx-xdpy="0-10000000.0" (75.0)

Resolution, in pixels per inch.