docs.roxen.com
main | demo | docs
download | community | pike
2000 Roxen Internet Software
Suggestions, Comments or Complaints
manuals@roxen.com

DocsRoxen2.0Web Site Creator ManualGraphics tags

RXML run error: This is not a sitebuilder page.
 | <if variable="page.title != Docs">


  • <cimg>
  • <configimage>
  • <diagram>
  • <gbutton>
  • <gbutton-url>
  • <gtext>
  • <gtext-id>
  • <gtext-url>
  • <imgs>
  • <tablist>
  • <cimg/>

    Convert and manuipulate images between different image formats. The <cimg> makes it is possible to convert, alter size, and transform images between many formats.

    Attributes

    src
    src=uri
    The path to the indata file.
    <cimg src='internal-roxen-robodog'/>

    data
    data=imagedata
    Insert images from other sources, e.g. databases through entities or variables.
    &lt;emit source='sql' query='select imagedata from images where id=37'&gt;
    &lt;cimg data='
    RXML parse error: Unknown scope "sql".
     | &sql.imagedata;
    
    '/&gt; &lt/emit&gt;

    format
    format={gif, jpeg, png, avs, gmp, bd, hrz, ilbm, psx, pnm, ps, pvr, tga, tiff, wbf, xbm, xpm}(gif)
    The format to encode the image to. The formats available are:
    gif Graphics Interchange Format (might be missing in your roxen)
    jpeg Joint Photography Expert Group image compression
    png Portable Networks Graphics
    avs
    bmp Windows BitMaP file
    gd
    hrz HRZ is (was?) used for amatuer radio slow-scan TV.
    ilbm
    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
    xbm XWindows Bitmap File
    xpm XWindows Pixmap File

    <cimg src='internal-roxen-robodog' format='png'/>
    

    <cimg src='internal-roxen-robodog' format='gif'/>
    

    quant
    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 src='internal-roxen-robodog' quant='2'/>
    

    dither
    dither={none, random, floyd-steinberg}(none)
    Choose the dithering method.
    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 src='internal-roxen-robodog' dither='random' quant='10'/>
    

    <cimg src='internal-roxen-robodog' dither='floyd-steinberg' quant='10'/>
    

    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 src='internal-roxen-robodog' opaque-value='20'/>
    

    <cimg src='internal-roxen-robodog' opaque-value='20' true-alpha='1'/>
    

    background-color
    background-color=color(taken from the page)
    The color to render the image against.
    <cimg src='internal-roxen-robodog' background-color='red' opaque-value='50'/>
    

    opaque-value
    opaque-value=percentage(100)
    The transparency value to use, 100 is fully opaque, and 0 is fully transparent.
    cs-rgb-hsv
    cs-rgb-hsv={0, 1}(0)
    Perform rgb to hsv colorspace conversion.
    <cimg src='internal-roxen-robodog' cs-rgb-hsv='1'/>
    

    gamma
    gamma=number(1.0)
    Perform gamma adjustment.
    <cimg src='internal-roxen-robodog' gamma='0.5'/>
    

    <cimg src='internal-roxen-robodog' gamma='1.5'/>
    

    cs-grey
    cs-grey={0, 1}(0)
    Perform rgb to greyscale colorspace conversion.
    <cimg src='internal-roxen-robodog' cs-grey='1'/>
    

    cs-invert
    cs-invert={0, 1}(0)
    Invert all colors
    <cimg src='internal-roxen-robodog' cs-invert='1'/>
    

    cs-hsv-rgb
    cs-hsv-rgb={0, 1}(0)
    Perform hsv to rgb colorspace conversion.
    <cimg src='internal-roxen-robodog' cs-hsv-rgb='1'/>
    

    rotate-cw
    rotate-cw=degree(0)
    Rotate the image clock-wise.
    <cimg src='internal-roxen-robodog' rotate-cw='20'/>
    

    rotate-ccw
    rotate-ccw=degree(0)
    Rotate the image counter clock-wise.
    rotate-unit
    rotate-unit={rad, deg, ndeg, part}(deg)
    Select the unit to use while rotating.
    rad Radians
    deg Degrees
    ndeg 'New' degrees (400 for each full rotation)
    part 0 - 1.0 (1.0 == full rotation)

    mirror-x
    mirror-x={0, 1}(0)
    Mirror the image around the X-axis.
    mirror-y
    mirror-y={0, 1}(0)
    Mirror the image around the Y-axis.
    scale
    scale=fact(1.0)
    Scale fact times. (0.5 -> half size, 2.0 -> double size)
    <cimg src='internal-roxen-robodog' scale='0.5'/>
    

    scale
    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 src='internal-roxen-robodog' scale='20,50'/>
    

    max-width
    max-width=xsize
    If width is larger than 'xsize', scale width to 'xsize' while keeping aspect.
    max-height
    max-height=ysize
    If width is larger than 'ysize', scale width to 'ysize' while keeping aspect.
    x-offset
    x-offset=pixels(0)
    Cut n pixels from the beginning of the X scale.
    <cimg src='internal-roxen-robodog' x-offset='100'/>
    

    y-offset
    y-offset=pixels(0)
    Cut n pixels from the beginning of the Y scale.
    x-size
    x-size=pixels(whole image)
    Keep n pixels from the beginning of the X scale.
    <cimg src='internal-roxen-robodog' x-size='100'/>
    

    y-size
    y-size=pixels(whole image)
    Keep n pixels from the beginning of the Y scale.
    crop
    crop=x0,y0-x1,y1(whole image)
    Crop the image by specifying the pixel coordinates.
    <cimg src='internal-roxen-robodog' crop='50,28-150,92'/>
    

    jpeg-quality
    jpeg-quality=percentage(75)
    Set the quality on the output jpeg image.
    <cimg src='internal-roxen-robodog' format='jpeg' jpeg-quality='30'/>
    

    <cimg src='internal-roxen-robodog' format='jpeg' jpeg-quality='1'/>
    

    jpeg-optimize
    jpeg-optimize={0, 1}(1)
    If 0, do not generate optimal tables. Somewhat faster, but produces bigger files.
    jpeg-progressive=
    jpeg-progressive=={0, 1}(0)
    Generate progressive jpeg images.
    jpeg-smooth
    jpeg-smooth=0-100(0)
    Smooth the image while compressing it. This produces smaller files, but might undo the effects of dithering.
    bmp-bpp
    bmp-bpp=1,4,8,24(24)
    Force this number of bits per pixel for bmp images.
    bmp-windows
    bmp-windows={0, 1}(1)
    Windows or OS/2 mode, default is 1. (windows mode)
    bmp-rle
    bmp-rle={0, 1}(0)
    RLE 'compress' the BMP image.
    gd-alpha_index
    gd-alpha_index=color(0)
    Color in the colormap to make transparent for GD-images with alpha channel.
    pcx-raw
    pcx-raw={1, 0}(0)
    If 1, do not RLE encode the PCX image.
    pcx-dpy
    pcx-dpy=0-10000000.0(75.0)
    Resolution, in pixels per inch.
    pcx-xdpy
    pcx-xdpy=0-10000000.0(75.0)
    Resolution, in pixels per inch.
    pcx-ydpy
    pcx-ydpy=0-10000000.0(75. Resolution, in pixels per inch. Offset from start of image data to image content for PCX images. Unused by most programs. Offset from start of image data to image content for PCX images. Unused by most programs. If 1, do not RLE encode the Targa image. Dots per inch for the resulting postscript file. )

    All examples are made for the <cimg> tag.