Bitmaps, or graphic planes, are a form of one bit deep image primarily used to serve as masks for regions where operations are to take place and may be specified in a manner very similar to image channels. All the rules previously indicated for image channels also apply to bitmap layers, except that the variables are prefixed with two percent characters instead of one. Also, the index number is the segment number (or graphic plane) of the bitmap layer to be used.
%%n [(x_expr, y_expr)]
%%{ n } [(x_expr, y_expr)] (see Note, below)
%%{ file_spec, n } [(x_expr, y_expr)] (see Note, below)
Bitmap variables will only assume values of zero or one. Any non-zero value assigned to a bitmap layer will be treated as one.
Create a bitmap mask (segment 2) which is true (1) everywhere channels 1 and 2 are less than 25. Then this mask and the mask in segment 3 are used to determine a region that should be zeroed in image channels 1 and 2.
if( %1 < 25 and %2 < 25 )then %%2 = 1 else %%2 = 0 endif if( %%2 = 1 and %%3 = 0 )then %1 = 0 %2 = 0 endif
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.