
Contents |
Alpha Blend
Blend two images into a combined image
This feature is for OriginPro only.
1. imgBlend img:=[Mbook1]1!mat(1) imgb:=[Mbook2]1!mat(1) opacity:=120;
2. imgBlend img:=[Mbook1]1!mat(1) imgb:=[Mbook2]1!mat(1) x:=50 y:=10;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input Matrix | img |
Input Image | |
Specifies the input image to be manipulated. The default input is the active image. |
| Image to Blend | imgb |
Input Image | |
Specifies an image used to blend the input image. |
| Opacity | opacity |
Input int | |
Specifies the opacity of the Image to Blend. This value should be between 0 and 255. |
| Output Image | oimg |
Output Image | |
Specifies the output image. By default, a new image will be created and used as output. See the syntax here. |
| Offset X | x |
Input int | |
Specifies the vertical offset to change the relative position of the Image to Blend. |
| Offset Y | y |
Input int | |
Specifies the horizontal offset to change the relative position of the Image to Blend. |
| Crop to Common Area | crop |
Input int | |
Specifies whether to crop the output image to the common area of Input Image and Image to Blend. |
This X-Function combines two images with alpha blending. The Image to Blend is made transparent and put on top of the Input Image, allowing user to see through the image on top to the image below.
In this example, we use the imgBlend function to combine two images (one in Mbook3 and the other in Mbook2):
Input Image
Image to Blend
Output Image
The computation uses L_AlphaBlendBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_AlphaBlendBitmap topic.
LEADTOOLS Main API Help file, Version 14