Chapter Contents

Previous

Next
Image Data Model: _convert

Image Data Model: _convert



Converts an image to another image type


Syntax
Details
Example

Syntax

CALL SEND (object-id, '_convert', image-type);

Argument Type Description
image-type C the target image type:
'TYPE=GRAY'
converts the image to black and white

'TYPE=CMAP'
converts the image to a color-mapped image containing no more than 256 colors

'TYPE=RGBA'
converts the image to RGB colors



Details

Images that are originally gray-scale or black and white cannot be colorized.


Example

This example reads an 8-bit color-mapped GIF image, converts it to a 1-bit gray-scale image, and saves it as an XBM file:

call send(imgdat_id, '_read',
         '/usr/images/stamp.gif');
call send(imgdat_id, '_convert',
         'type=gray');
call send(imgdat_id, '_write', 'stamp.xbm',
         'format=xbm');


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.