7.5

Table Of Contents
ShowBitmap (procedure)
Displays a bitmap resource.
Syntax
showbitmap( resname, resolution, width, height[, transparent[, duotone[, pagenum]]] )
Arguments
resname
String value containing either the name of the bitmap resource within the document, or the path to a bitmap file.
resolution
Integer value specifying the resolution, in pixels per inch, at which the bitmap displays. A larger number yields a smaller,
clearer image, since more pixels are squeezed into a smaller space. But the bitmap then requires more memory. Except in
some very specific applications, it is rarely desirable to use resolutions exceeding 100 ppi.
width, height
Measure values specifying the width/height, in inches, the bitmap occupies when it displays. Specifying a value of zero for one
but not both of the two dimensions scales the bitmap to fit the non-zero dimension. Specifying both a width and a height scales
the bitmap to the best fit possible with that width and height, while maintaining its aspect ratio. Specifying both a width and a
height of zero displays the bitmap at its default resolution.
transparent
Boolean value specifying whether part of the bitmap is transparent. When set to true, the bitmap image is combined with the
background; otherwise it is pasted on top.
duotone
Colour array specifying the colour to paint all non-white pixels in the bitmap.
pagenum
Integer value specifying the page number in a multi-page/multi-frame TIFFfiles. If none is specified, the first frame is always
displayed. If the resource does not contain multiple frames, this parameter is ignored. If the parameter value exceeds the
number of frames available in the TIFFfile, a black square will be output.
Code Sample Examples
Example 1
This example displays the bitmap image street_photo at a resolution of 72 pixels per inch, and a width of 1 inch, as a trans-
parent bitmap image with non-white pixels set to blue.
showbitmap('street_photo',72,1,0,true,[100,100,0,0])
Example 2
This example displays the bitmap image sunset at a resolution of 300 pixels per inch.
©2010 Objectif Lune Inc - 611 -