|
Draw the overlay image on image, You can adjust the resolution of image, interpolation mode, transparent color, alpha value. Make sure set the ShowImage property = true.
Public Function DrawImageEx( _ ByVal iXPos As Integer, _ ByVal iYPos As Integer, _ ByVal iWidth As Integer, _ ByVal iHeight As Integer, _ ByVal strImageFile As String, _ ByVal clrTran As Color, _ ByVal iAlphaValue As Integer, _ ByVal iInterpolationMode As Integer )
|
Parameter
iXPos Specifies the logical x-coordinate of the starting point of the image.
iYPos Specifies the logical y-coordinate of the starting point of the image.
iWidth Specifies the width in pixel of the drawn image.
iHeight Specifies the height in pixel of the drawn image.
strImageFile the image file of overlay image. It support bmp, jpg, tif, png, gif image.
clrTran the transparent color of overlay image.
iAlphaValue the alpha value of overlay image, range from 0-255. 255 = fully visble.
iInterpolationMode the interpolation mode of image. The interpolation mode determines the algorithm that is used when images are scaled or rotated.
0 - Specifies the default interpolation mode. 1 - Specifies a low-quality mode. 2 - Specifies a high-quality mode. 3 - Specifies bilinear interpolation. No prefiltering is done. This mode is not suitable for shrinking an image below 50 percent of its original size. 4 - Specifies bicubic interpolation. No prefiltering is done. This mode is not suitable for shrinking an image below 25 percent of its original size. 5 - Specifies nearest-neighbor interpolation. 6 - Specifies high-quality, bilinear interpolation. Prefiltering is performed to ensure high-quality shrinking. 7 - Specifies high-quality, bicubic interpolation. Prefiltering is performed to ensure high-quality shrinking. This mode produces the highest quality transformed images.
Return Value
No return value.
Example
|
Visual Basic Syntax ImageViewer1.FileName="c:\test1.jpg" ImageViewer1.ShowImage=True ImageViewer1.DrawImageEx 0, 0, c:\image.jpg, RGB(0,0,0), 255, 0
|
|
|