internally supported:
- XCF
- XPM
- PPM/PNM
- BMP
- ICO
- GIF - write support only for uncompressed gif
- XML Images
AfterStep's graphics engine - libAfterImage includes a processor for XML
scripts that specify transformation of images. Such XML script may
include any function supported by libAfterImage, which includes
loading/saving files, scaling, tiling, cropping, Hue-Saturation-Value
adjustment, image blending, Text rendering, gradients rendering,
tinting, solid fill, etc.
- example:
solid blank background 1x1 pixel:
<solid width=1 height=1 color=#FF000000/>
- example:set color alias:
<color domain="ascs" name="Active" argb="#FF665646"/>
- Here is another script :
<composite merge="clip">
<tile height="308">
<scale width="24" height="24">
<img src="AfterStep3"/>
</scale>
</tile>
<tile height="308" width="24" tint="#557f7f7f">
<img src="main_back.jpg"/>
</tile>
</composite>
This one renders border image as could be seen at the top of this page.
- Shortcuts:
Great advantage of such scripting capabilities is that numerous
images could be produced from the single clipart image. For example
most modern systems assign different icons to different file types. When
two different file types should have similar icons - the icon is simply
duplicated. The result of this is a huge waste of HDD space and large
number of identical files. XML scripts solve that problem by allowing to
create shortcuts to image files.
For examle xml file with :
<img src="logos/AfterStep5"/>
is a simply a shortcut to clipart image.
- Minipixmaps:
Also it allows to create minipixmaps, or reduced size versions of icons.
For example :
<scale width="16" height="16">
<img src="logos/GNUStep">
</scale>
Will create 16x16 version of GNUStep icon, which could be used as
minipixmap for application.
- color schemes:
Colorschemes are a very powerfull feature of AfterStep. That means
that at each moment AfterStep defines 31 additional color names, exact
color values which will depend on the choosen colorscheme. Now XML
scripts may include HSV conversion commands. As the result it is
possible to have images change their colors depending on the colorscheme
choosen.
For example :
<hsv
hue_offset="$ascs.Active.hue"
saturation_offset="$ascs.Active.saturation-30"
value_offset="$ascs.Active.value-72">
<img src="bars/title_tile_glass_red_a50"/>
</hsv>
The above image will produce a focused titlebar background that changes
colors according to the colorscheme choosen.
- Tiling:
<img id="tile" src="niceTile.png"/>
<composite id="left_tile" width="$tile.width" height="$tile.height">
<recall srcid="tile"/>
<mirror x="0" y="$tile.height" dir="vertical">
<recall srcid="tile"/>
</mirror>
</composite>
<composite width="$tile.width" height="$tile.height">
<recall srcid="left_tile"/>
<mirror x="$tile.width" y="0" dir="horizontal">
<recall srcid="left_tile"/>
</mirror>
</composite>
<scale id="tile" width="$xroot.width/2" height="$xroot.height/2">
<img src="niceTile.png"/>
</scale>
<composite id="left_tile" width="$xroot.width/2" height="$xroot.height">
<recall srcid="tile"/>
<mirror x=0 y="$xroot.height/2" dir="vertical">
<recall srcid="tile"/>
</mirror>
</composite>
<composite width="$xroot.width" height="$xroot.height">
<recall srcid="left_tile"/>
<mirror x="$xroot.width/2" y=0 dir="horizontal">
<recall srcid="left_tile"/>
</mirror>
</composite>