Chapter Contents |
Previous |
Next |
CONVERT |
Syntax | |
Details | |
Example |
Syntax |
rc=IMGOP(task-id, 'CONVERT', type); |
'GRAY'
'CMAP'
'RGBA'
Type: Character
Details |
CONVERT performs dithering, quantizing, and other operations in order to reduce an image to a simpler form. It can also create a two-color (black and white) RGB image by converting a monochrome image to an RGBA image. Images that are originally gray-scale or black and white cannot be colorized. CONVERT acts on the currently selected image.
Example |
Convert an RGB image to a dithered monochrome image:
rc=imgop(task-id,'READ','rgb.tif'); rc=imgop(task-id,'CONVERT','GRAY'); rc=imgop(task-id,'WRITE','gray.tif');
Convert the GRAY image back to RGB. Because all color information is lost, the final RGB image has only two colors:
rc=imgop(task-id,'READ','gray.tif'); rc=imgop(task-id,'CONVERT','RGBA'); rc=imgop(task-id,'WRITE','rgb.tif');
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.