![]() Chapter Contents |
![]() Previous |
![]() Next |
| Image Data Model: _getTransparentColor |
| Syntax | |
| Details | |
| Example |
Syntax |
| CALL SEND (object-id, '_getTransparentColor', index|red, green, blue); |
| Argument | Type | Description |
|---|---|---|
| index |
N | a value that is the index of the transparent color being returned; only used with an image of type CMAP |
| red, green, blue |
N | the red, green, and blue values ofthe transparent color being returned; only used with an image of type RGBA |
| Details |
If the return code for the _getTransparentColor method is not 0, a transparent color value has not been set for the image object.
Note: You can use the _getTranparentColor method to determine if a default GIF transparency
color value is set after reading the image. ![[cautionend]](../common/images/cautend.gif)
| Example |
This example turns on the transparent settings if the image that is read in contains transparent values by default.
/* Read a CMAP image */
call send (image_obj, '_read',
'/usr/images/icon.gif');
/* Turn on error handling */
call send (image_obj,
'_getOnErrorOptions',
prevoptions);
call send (image_obj, '_onError',
'NOMESSAGE NOABORT');
/* See if the image contains a default
transparent color */
call send (image_obj,
'_getTransparentColor', index);
rc = sysrc();
call send (image_obj, '_OnError',
prevoptions);
if (rc ne 0) then
do;
/* The GIF image contained a transparent
setting by default */
/* Now call _setTransparentCOLOR to
turn on transparency */
call send (image_obj,
'_setTransparentColor' index);
end;
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.