Ploticus > Scripts >
proc image

proc image integrates an external PNG/GIF/JPG image file (containing a logo for example) into the ploticus result. This proc was formerly called proc import, and the old name will continue to map to this proc.

If you are producing PNG/GIF/JPG output, the image is imported by ploticus and integrated into the output result as it is generated. Ploticus does not convert image types... the import image type must be the same as your result image type (ploticus does not check image file types of file name extensions to enforce this).

If you are producing SVG, ploticus simply adds an <image> tag to the svg output (which contains an xlink to the filename), and the image will be loaded when the SVG is viewed. Presumably, images of any type (PNG/GIF/JPG) can be viewed this way. The width and height of the image should be specified so that alignment can be executed correctly.

If you're producing other output formats, a gray placeholder box will be drawn to show the image placement location, but the image will not be displayed.


The file and location attributes must be supplied. The width and height attributes should always be specified.

file     pathname

    The pathname of the image to import. With PNG/GIF/JPG this filename should be specified relative to the working directory that ploticus is running in. With SVG, the image file will be loaded when the svg is viewed and should be relative to the .svg file.

location     x y

    Determines where the imported image should be placed (see also align below).

align     topcenter | center | topleft | bottomleft

    Alignment of image relative to location. Default is topleft.
    topleft positions the image with its top left at x, y;
    topcenter positions the imported image with its top-center at x, y
    center centers the image around x, y horizontally and vertically;
    bottomleft positions the image with its bottom left at x, y.

width     npixels
height     npixels

    The imported image will be rendered at this width and height. These values are in PNG/GIF/JPG pixels, which are 100 per inch. Best practice is to always specify (but does not need to be specified when rendering PNG/GIF/JPG and clickmap is not being done).

clickmapurl url

    If generating a clickmap, this specifies the url that users will go to when they click on the image.

clickmaplabel label

    If generating a client-side clickmap, this specifies a mouseover text labels that the user will see when they hover their mouse over the image.


Ploticus 2.42 ... May 2013 Terms of use /