LEADTOOLS (Leadtools assembly)

SetAlphaImage Method

Show in webframe







Source RasterImage which references the image that is used to create or replace the alpha channel data.
Replaces existing alpha channel data or creates new alpha channel data.
Syntax
public void SetAlphaImage( 
   RasterImage alphaImage
)
'Declaration
 
Public Sub SetAlphaImage( _
   ByVal alphaImage As RasterImage _
) 
'Usage
 
Dim instance As RasterImage
Dim alphaImage As RasterImage
 
instance.SetAlphaImage(alphaImage)
public void SetAlphaImage( 
   RasterImage alphaImage
)
-(BOOL)setAlphaImage:(LTRasterImage*)alphaImage error:(NSError**)outError;
public void setAlphaImage(RasterImage alphaImage)
 function Leadtools.RasterImage.SetAlphaImage( 
   alphaImage 
)
public:
void SetAlphaImage( 
   RasterImage^ alphaImage
) 

Parameters

alphaImage
Source RasterImage which references the image that is used to create or replace the alpha channel data.
Remarks

Typically, an alpha channel contains a mask that is used for transparency. This method, together with CreateAlphaImage and the LEADTOOLS region processing methods, lets you use the alpha channel to implement transparency.

Only 16-, 32- and 64-bit images can have an alpha channel. If the image is of any other color resolution, this method converts the image to 32-bit before it replaces the alpha channel. (If you want 16-bit, you should change it using Leadtools.ImageProcessing.ColorResolutionCommand, if necessary, before calling this method.)

For 64-bit images, the alphaImage parameter is converted to 16 bit grayscale before replacing the alpha channel. If the image is 48-bit, it will be converted to 64-bit and then have the alpha information added to it.

The alphaImage parameter does not have to be grayscale. This method converts the data from the alphaImage parameter to the necessary grayscale or 1-bit format as it replaces the alpha channel in the image. (The alphaImage, itself, remains unchanged.)

This method does not support signed images.

For more information, refer to Implementing Transparency.

For more information, refer to Saving A Region.

Example
For an example, refer to CreateAlphaImage.
Requirements

Target Platforms

See Also

Reference

RasterImage Class
RasterImage Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.