CImage:Blend
The Blend method blends the pixel values with those of another image. The result replaces the current image.
bResult = CImage:Blend( CImage, nBlend )
TheCImage argument refers to another CImage.
The value nBlend is a percentage.
On success, this method returns true.
On failure, this method returns false.
Each pixel value of the CImage is replaced by the result of an interpolation with the corresponding pixel of the second image. This dilutes the image with the other image, or expressed another way, it fades one image into the other. The value nBlend measures the interpolation distance between the two images. For each image pixels, the result is as follows:
A value nBlend = 0 reproduces the present image exactly.
A value nBlend = 100 reproduces the other image exactly.
Similarly a value x = 50 produces a result midway between thetwo images. Values outside the range [0,100] extrapolate by effectively removing one pixel value from the other.
The following script loads two images from files sPath1 and sPath2, blends them equally usingnBlend = 50, and saves the result of the first image back to its file:
|
-- create a new CImage |
|
-- create a new CImage |
|
-- load the first image from a file named sPath1 |
|
-- load the second image from a file named sPath2 |
|
-- perform the operation on image I |
|
|
|
|
|
|
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.