libAfterImage/asimagexml
NAME
ascomposeis a tool to compose image(s) and display/save it based on supplied XML input file.
DESCRIPTION
ascompose reads supplied XML data, and manipulates image accordingly. It could transform images from files of any supported file format, draw gradients, render antialiased texturized text, perform superimposition of arbitrary number of images, and save images into files of any of supported output file formats. At any point, the result of any operation could be assigned a name, and later on referenced under this name. At any point during the script processing, result of any operation could be saved into a file of any supported file types. Internal image format is 32bit ARGB with 8bit per channel. Last image referenced, will be displayed in X window, unless -n option is specified. If -r option is specified, then this image will be displayed in root window of X display, effectively setting a background for a desktop. If -o option is specified, this image will also be saved into the file or requested type.
TAGS
Here is the list and description of possible XML tags to use in the script : img - load image from the file. recall - recall previously loaded/generated image by its name. text - render text string into new image. save - save an image into the file. bevel - draw solid bevel frame around the image. gradient - render multipoint gradient. mirror - create mirror copy of an image. blur - perform gaussian blur on an image. rotate - rotate/flip image in 90 degree increments. scale - scale an image to arbitrary size. slice - enlarge image to arbitrary size leaving corners unchanged. crop - crop an image to arbitrary size. tile - tile an image to arbitrary size. hsv - adjust Hue, Saturation and Value of an image. pad - pad image with solid color from either or all sides. solid - generate new image of requested size, filled with solid color. composite - superimpose arbitrary number of images using one of 15 available methods. if - conditional processing based on value of the variables set - sets value of the variable printf - formated printing of the value of the variable Each tag generates new image as the result of the transformation - existing images are never modified and could be reused as many times as needed. See below for description of each tag. Whenever numerical values are involved, the basic math ops (add, subtract, multiply, divide), unary minus, and parentheses are supported. Operator precedence is NOT supported. Percentages are allowed, and apply to either width or height of the appropriate image (usually the refid image). Also, variables of the form $image.width and $image.height are supported. $image.width is the width of the image with refid "image", and $image.height is the height of the same image. The special $xroot.width and $xroot.height values are defined by the the X root window, if there is one. This allows images to be scaled to the desktop size: <scale width="$xroot.width" height="$xroot.height">. Each tag is only allowed to return ONE image.
libAfterImage/asimagexml/text
NAME
text- render text string into new image, using specific font, size and texture.
SYNOPSIS
<text id="new_id" font="font" point="size" fgcolor="color" bgcolor="color" fgimage="image_id" bgimage="image_id" spacing="points" type="3dtype">My Text Here</text>
ATTRIBUTES
NOTES
<text> without bgcolor, fgcolor, fgimage, or bgimage will NOT produce visible output by itself. See EXAMPLES below.
libAfterImage/asimagexml/composite
NAME
composite- superimpose arbitrary number of images on top of each other.
SYNOPSIS
<composite id="new_id" op="op_desc" keep-transparency="0|1" merge="0|1">
ATTRIBUTES
NOTES
All images surrounded by this tag will be composited with the given op.
ATTRIBUTES
All tags surrounded by this tag may have some of the common attributes in addition to their normal ones. Under no circumstances is there a conflict with the normal child attributes:
SEE ALSO
libAfterImage
libAfterImage/asimagexml/img
NAME
img- load image from the file.
SYNOPSIS
<img id="new_img_id" src="filename"/>
ATTRIBUTES
NOTES
The special image src "xroot:" will import the background image of the root X window, if any. No attempt will be made to offset this image to fit the location of the resulting window, if one is displayed.
libAfterImage/asimagexml/recall
NAME
recall- recall previously generated and named image by its id.
SYNOPSIS
<recall id="new_id" srcid="image_id" default_src="filename"/>
ATTRIBUTES
libAfterImage/asimagexml/release
NAME
release- release (destroy if possible) previously generated and named image by its id.
SYNOPSIS
<release srcid="image_id"/>
ATTRIBUTES
libAfterImage/asimagexml/color
NAME
colorSYNOPSIS
<color name="sym_name" domain="var_domain" argb="colorvalue"/>
ATTRIBUTES
NOTES
In addition to defining symbolic name for the color this tag will define 7 other variables : domain.sym_name.red, domain.sym_name.green, domain.sym_name.blue, domain.sym_name.alpha, domain.sym_name.hue, domain.sym_name.saturation, domain.sym_name.value
libAfterImage/asimagexml/printf
NAME
printf- prints variable value to standard output.
SYNOPSIS
<printf format="format_string" var="variable_name" val="expression"/>
ATTRIBUTES
NOTES
libAfterImage/asimagexml/set
NAME
set- declares variable, assigning it a numeric value of expression.
SYNOPSIS
<set var="variable_name" domain="var_domain" val="expression"/>
ATTRIBUTES
libAfterImage/asimagexml/if
NAME
if- evaluates logical expression and if result evaluates to not true(or false if <unless> tag is used ), handles tags within.
SYNOPSIS
<if val1="expression" [op="gt|lt|ge|le|eq|ne" val2="expression"]/> [<then>...</then><else>...</else>] </if> <unless val1="expression" [op="gt|lt|ge|le|eq|ne" val2="expression"]/>
ATTRIBUTES
EXAMPLE
<if val1="$ascs.Base.value" val2="50" op="gt"><then>...</then><else>...</else></if>
libAfterImage/asimagexml/gradient
NAME
gradient- render multipoint gradient.
SYNOPSIS
<gradient id="new_id" angle="degrees" refid="refid" width="pixels" height="pixels" colors ="color1 color2 color3 [...]" offsets="fraction1 fraction2 fraction3 [...]"/>
ATTRIBUTES
libAfterImage/asimagexml/solid
NAME
solid- generate image of specified size and fill it with solid color.
SYNOPSIS
<solid id="new_id" color="color" opacity="opacity" width="pixels" height="pixels" refid="refid" width="pixels" height="pixels"/>
ATTRIBUTES
libAfterImage/asimagexml/save
NAME
save- write generated/loaded image into the file of one of the supported types
SYNOPSIS
<save id="new_id" dst="filename" format="format" compress="value" opacity="value" replace="0|1" delay="mlsecs">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/background
NAME
background- set image's background color.
SYNOPSIS
<background id="new_id" color="color">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/blur
NAME
blur- perform a gaussian blurr on an image.
SYNOPSIS
<blur id="new_id" horz="radius" vert="radius" channels="argb">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/bevel
NAME
bevelSYNOPSIS
<bevel id="new_id" colors="color1 color2" width="pixels" height="pixels" refid="refid" border="left top right bottom" solid=0|1 outline=0|1>
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/mirror
NAME
mirror- create new image as mirror copy of an old one.
SYNOPSIS
<mirror id="new_id" dir="direction" width="pixels" height="pixels" refid="refid">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/rotate
NAME
rotate- rotate an image in 90 degree increments (flip).
SYNOPSIS
<rotate id="new_id" angle="degrees" width="pixels" height="pixels" refid="refid"> * ATTRIBUTES id Optional. Image will be given this name for future reference. angle Required. Given in degrees. Possible values are currently "90", "180", and "270". Rotates the image through the given angle. width Optional. The result will have this width. height Optional. The result will have this height. refid Optional. An image ID defined with the "id" parameter for any previously created image. If set, percentages in "width" and "height" will be derived from the width and height of the refid image.
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/scale
NAME
scale- scale image to arbitrary size
SYNOPSIS
<scale id="new_id" refid="other_imag" src_x="pixels" src_y="pixels" src_width="pixels" src_height="pixels" width="pixels" height="pixels">
ATTRIBUTES
libAfterImage/asimagexml/slice
NAME
slice- slice image to arbitrary size leaving corners unchanged
SYNOPSIS
<slice id="new_id" ref_id="other_imag" width="pixels" height="pixels" x_start="slice_x_start" x_end="slice_x_end" y_start="slice_y_start" y_end="slice_y_end" scale="0|1">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded. Contents of the image between x_start and x_end will be tiled horizontally. Contents of the image between y_start and y_end will be tiled vertically. This is usefull to get background images to fit the size of the text or a widget, while preserving its borders undistorted, which is the usuall result of simple scaling. If you want to keep image proportions while resizing-use "proportional" instead of specific size for particular dimention.
libAfterImage/asimagexml/pixelize
NAME
pixelize- pixelize image using arbitrary pixel size
SYNOPSIS
<pixelize id="new_id" ref_id="other_imag" width="pixels" height="pixels" clip_x="clip_x" clip_y="clip_y" pixel_width="pixel_width" pixel_height="pixel_height">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded. If you want to keep image proportions while resizing-use "proportional" instead of specific size for particular dimention.
libAfterImage/asimagexml/color2alpha
NAME
color2alpha- set alpha channel based on color closeness to specified color
SYNOPSIS
<color2alpha id="new_id" ref_id="other_imag" width="pixels" height="pixels" clip_x="clip_x" clip_y="clip_y" color="color">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded. If you want to keep image proportions while resizing-use "proportional" instead of specific size for particular dimention.
libAfterImage/asimagexml/crop
NAME
crop- crop image to arbitrary area within it.
SYNOPSIS
<crop id="new_id" refid="other_image" srcx="pixels" srcy="pixels" width="pixels" height="pixels" tint="color">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/tile
NAME
tile- tile an image to specified area.
SYNOPSIS
<tile id="new_id" refid="other_image" width="pixels" height="pixels" x_origin="pixels" y_origin="pixels" tint="color" complement=0|1>
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/hsv
NAME
hsv- adjust Hue, Saturation and/or Value of an image and optionally tile an image to arbitrary area.
SYNOPSIS
<hsv id="new_id" refid="other_image" x_origin="pixels" y_origin="pixels" width="pixels" height="pixels" affected_hue="degrees|color" affected_radius="degrees" hue_offset="degrees" saturation_offset="value" value_offset="value">
ATTRIBUTES
NOTES
One of the Offsets must be not 0, in order for operation to be performed. This tag applies to the first image contained within the tag. Any further images will be discarded.
libAfterImage/asimagexml/pad
NAME
padSYNOPSIS
<pad id="new_id" left="pixels" top="pixels" right="pixels" bottom="pixels" color="color" refid="refid" width="pixels" height="pixels">
ATTRIBUTES
NOTES
This tag applies to the first image contained within the tag. Any further images will be discarded.
Preface Introduction Topic index Glossary Back to Top
AfterStep version 2.2.11