CRasterImage::LoadAlphaChannel![]()
bool LoadAlphaChannel( const CRasterImage & src, int resizeMethod = RI_RESIZE_PICK_GRID_PIXELS );
Parameters
| src | source CRasterImage object which data will be converted into object's alpha channel |
| resizeMethod | if src image has different dimensions than image dimensions of the object then src image will be resized to object's dimensions before converting it's values to alpha channel. The resizeMethod parameter specifies alhoritm used when resizing the src image. Information about possible values of this parameter can be found in documantation for the Resize mothod. If dimensions of both images are the same then resizing won't take place. |
Return Value
true if function succeed. false in case of failure. Additional error inromation acn be retrieved by calling GetLasteErrorMessage() function.
Remarks
The LoadAlphaChannel function loads image's alpha values by converting color values of provided src CRasterImage object into alpha channel values. Color values are converted to grayscale and then grayscale values are copied to alpha channel. The black color values are converted to transparent alpha values and white colors are converted to opaque alpha values.
See Also
![]()
| © 2003 Solid Graphics, All rights reserved. |
| To view this site, we require use of either Netscape Navigator 4.0 or higher or Internet Explorer 4.0 or higher. |