SiteStudio Online Documentation

For more information contact us

Image Maker XML Reference

 
  • <images> ... </images>
  • <image> ... </image>
  • <offset> ... </offset>
  • <imgop> ... </imgop> :
  • <line ... />
  • <circle ... />
  • <rectangle ... />
  • <oval ... />
  • <label> ... </label>
  • <font ... />
  • <text> ... </text>
  • <images> ... </images> :

    Root tag for the XML file. Contains many <image> tags.
    no parameters

    <image> ... </image> :

    A tag defining a single image template. Contains ONE <imgop>, <offset>, <labe> or a primitive tag.
    params:

    name—the name of the image template. Must be unique.
    bgcolor—(optional) HTML color of background
    format—(optional) Image file format. "gif" or "jpg". Default is "gif"
    transparency—(optional) if "true" gif transparency is used. bgcolor is set to transparent.
    x—(optional) X size of the image. If absent image will be sized to fit components.
    y—(optional) Y size of the image. If absent image will be sized to fit components.
    arguments—(optional, but highly recommended) listing of the names of arguments that need to be passed to this image. usually defined as a <param> tag, not inside the <image ...> tag.

    <offset> ... </offset> :

    Offset operation. Used to move graphical components over by a set amount of pixels. The top-left corner of the new area will have coordinates (0,0) for all the nodes this tag contains. It may contain any number of graphical nodes, subject to restrictions of its context.
    params:

    x—amount of pixels to shift to the right.
    y—amount of pixels to shift to the left.

    <imgop> ... </imgop> :

    An image operation. The result is a graphical representation of some sort. Depending on it's type parameter can include anywhere from no to unlimited amount of other <imgop>'s, <offset>'s, <label>'s and primitives.
    Common parameter:

    type—Defines what type of operation this <imgop> performs (each individual operation type is listed below)

    <imgop type="file">... </imgop>

    Loads an image from a file. The file can be specified using a local path, or through either an http:// or ftp:// URL. This operation can not contain any other nodes.
    params:

    src—The path of the local file, or the URL of a remote file to retrieve.
    base—(optional) if present will be pre-pended to the src parameter before trying to retrieve the file. Use "$img_path" to set the base to the mask path.
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <imgop type="overlay"> ... </imgop>

    A simple overlay operation. Can contain any number of graphical nodes. Each one will be drawn on top of the others, in the "bottom-first" order. Takes no additional parameters.

    <imgop type="add"> ... </imgop>

    A simple addition operation. Can contain any number of graphical nodes. Each one will be arithmetically added to the others. Takes no additional parameters.

    <imgop type="shadow"> ... </imgop>

    A shadow operation. Contains one graphical node, of which a shadow is cast based on its Alpha channel.
    params:

    color—(optional) the HTML color to draw the shadow in
    blur—(optional) amount of times to blur image. usually 0-5. default is 0
    dx—(optional, but recommended) x offset of the shadow. default is 0
    dy—(optional, but recommended) y offset of the shadow. default is 0
    opacity—(optional) (optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <imgop type="shadow"> ... </imgop>
    A shadow operation. Contains one graphical node, of which a shadow is cast based on its Alpha channel.
    params:

    color—(optional) HTML color in which to draw the outline
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <imgop type="greymask"> ... </imgop>

    An operation to place a greyscale mask on top of a graphical node. The mask is used as a gamma adjustmanent layer, darkening some pixcels while making others lighter. This tag can contain two nodes. The first is a mask and is required. The second is optional and is the image node that the mask will be applied to. If it is missing, the image maker will look for a color parameter, and if this is found, will use a rectangle of tha color to apply the mask to.
    params:

    color—(optional) the HTML color to apply the mask to if the second child node is missing.
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <imgop type="maskedfill"> ... </imgop>

    An operation to place a grayscale mask on top of a graphical node, using the mask as an alpha adjustment layer. Areas that are white on the mask will be opaque on the result, and areas that are black will become transparent. Grey values will be translated into alpha values based on their intensity. This operation can contain two child nodes. The first is the mask, and the second is the image source. if the mask is absent, the color parameter is used, and a rectangle of that color is substituted for the image source. If both the second parameter and the image source are present, the image is converted to a monotone palette of the specified color.
    params:

    color—(optional) the HTML color to apply the mask to if the second child node is missing, or to colorize the image source if both are given.
    resize—(optional) if equal to "true" the image source will be resized to the dimensions of the mask.
    aspect—(optional) indicates whether or not to maintain aspect ratio. can be "none" (don't maintain), "fit" (resize so all of the image fits) or "fill" (resize so that all of the mask is filled) Default is "none".
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <line ... />

    Draws a straight line between two points. Contains no other nodes.
    params:

    x1—X coordinate of Point 1
    y1—Y coordinate of Point 1
    x2—X coordinate of Point 2
    y2—Y coordinate of Point 2
    width—(optional) the line width to use (default is 1)
    color—(optional) the color to draw/fill in
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <circle ... />

    Draws or fills a circle. Contains nothing.
    params:

    x—The circle's center X coordinate
    y—The circle's center Y coordinate
    radius—The circle's Radius
    width—(optional) the line width to use (default is 1)
    fill—(optional) if "true" the circle will be filled
    color—(optional) the color to draw/fill in
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <rectangle ... />

    Draws or fills a rectangle. Contains nothing.
    params:

    x—X coordinate of the upper-left corner
    y—Y coordinate of the upper-left corner
    w—Width of the rectangle
    h—Height of the rectangle
    width—(optional) the line width to use (default is 1)
    fill—(optional) if "true" the circle will be filled
    color—(optional) the color to draw/fill in
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <oval ... />

    Draws/fills an oval. Contains nothing.
    params:

    x—X coordinate of the oval's center
    y—Y coordinate of the oval's center
    radiusX—oval's horizontal radius
    radiusY—oval's vertical radius
    width—(optional) the line width to use (default is 1)
    fill—(optional) if "true" the circle will be filled
    color—(optional) the color to draw/fill in
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <label> ... </label>

    A node for drawing a text label. This node MUST contain a tag, and should contain a <font> tag though this is optional.
    params:

    color—(optional) HTML color to use when drawing the text
    w—(optional) limit the text to some width
    h—(optional) limit the text to some height
    center—(optional) if "true" the text will be centered inside the bounding box specified by h and w (or only one of them if the other is not supplied)
    fit—(optional) (optional) if "true", and if any bounds are given (h, w or both) the text will be sized so that it fits inside these bounds. Otherwise, if it goes outside hte bounds it is cut off
    opacity—(optional) specifies the alpha value with which to draw the image. (0.0 to 1.0) Default is 1.0

    <font ... />

    Specifies the font for use in the
    params:

    face—The face of the font (i.e. "Times new Roman")
    size—The size of the font in points
    bold—(optional) if "true" the font will be bolded
    italic—(optional) if "true" the font will be italicized

    <text> ... </text>

    Specifies the text that is to be drawn by the
    no parameters

    Running the Test application for image maker: java psoft.image.Tester xmlfile ["gif"] where xmlfile is the full path to the xml file containing image template definitions. Supply the optional "gif" parameter to have the images generated as a gif file, not Jpeg which is the default. (note that for debug purposes the image maker Tester application ignores the format parameter of the image as defined in the xml code)

    See also

    Product Page
    Online Demo
    FAQ
    SS Doc Home



    Copyright 1998-2007. Positive Software Corporation.
    All rights reserved.