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 )
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 = 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 fragment 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 |
|
|
|
|
|
|