logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

asimagexml - XML schema to be used for scripting image manipulation by AfterStep and ascompose

Attributes

       id     Optional. Image will be given this name for future reference.

       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.

       left   Optional. Size to add to the left of the image.

       top    Optional. Size to add to the top of the image.

       right  Optional. Size to add to the right of the image.

       bottom Optional. Size to add to the bottom of the image.

       color  Optional.  Color  value  to  fill  added areas with. It could be transparent of course. Default is
              #FF000000 - totally black.

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.

Example

       <if val1="$ascs.Base.value" val2="50" op="gt"><then>...</then><else>...</else></if>
       libAfterImage/asimagexml/gradient

Name

asimagexml -  XML  schema  to  be  used  for  scripting  image  manipulation  by  AfterStep and ascompose
       libAfterImage/asimagexml

Nameascompose

       is a tool to compose image(s) and display/save it based on supplied XML input file.

Namebackground

       - set image's background color.

Namebevel

       - draws solid bevel frame around the image.

Nameblur

       - perform a gaussian blurr on an image.

Namecolor

       - defines symbolic name for a color and set of variables.

Namecolor2Alpha

       - set alpha channel based on color closeness to specified color

Namecomposite

       - superimpose arbitrary number of images on top of each other.

Namecrop

       - crop image to arbitrary area within it.

Namegradient

       - render multipoint gradient.

Namehsv

       - adjust Hue, Saturation and/or Value of an image and optionally tile an image to arbitrary area.

Nameif

       -  evaluates  logical  expression and if result evaluates to not true(or false if <unless> tag is used ),
       handles tags within.

Nameimg

       - load image from the file.

Namemirror

       - create new image as mirror copy of an old one.

Namepad

       - pad an image with solid color rectangles.

Namepixelize

       - pixelize image using arbitrary pixel size

Nameprintf

       - prints variable value to standard output.

Namerecall

       - recall previously generated and named image by its id.

Namerelease

       - release (destroy if possible) previously generated and named image by its id.

Namerotate

       - rotate an image in 90 degree increments (flip).

Namesave

       - write generated/loaded image into the file of one of the supported types

Namescale

       - scale image to arbitrary size

Nameset

       - declares variable, assigning it a numeric value of expression.

Nameslice

       - slice image to arbitrary size leaving corners unchanged

Namesolid

       - generate image of specified size and fill it with solid color.

Nametext

       - render text string into new image, using specific font, size and texture.

Nametile

       - tile an image to specified area.

Notes

       This tag applies to the first image contained within the tag.  Any further images will be discarded.

3rd Berkeley Distribution                      AfterStep v.2.2.12                                 asimagexml(1x)

Noteslibafterimage/Asimagexml/Set

See Also

       libAfterImage
       libAfterImage/asimagexml/img

Synopsis

       <pad id="new_id" left="pixels" top="pixels"
            right="pixels" bottom="pixels" color="color"
               refid="refid" width="pixels" height="pixels">

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    - formatted 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

See Also