Draws a GdPicture image into another GdPicture image applying a transparency effect.
public GdPictureStatus DrawGdPictureImageTransparency( int SrcImage, int DstImage, int Transparency, int DstLeft, int DstTop, int DstWidth, int DstHeight, InterpolationMode InterpolationMode );
Public Function DrawGdPictureImageTransparency( ByVal SrcImage As Integer, ByVal DstImage As Integer, ByVal Transparency As Integer, ByVal DstLeft As Integer, ByVal DstTop As Integer, ByVal DstWidth As Integer, ByVal DstHeight As Integer, ByVal InterpolationMode As InterpolationMode ) As GdPictureStatus
|
Parameters |
Description |
|
SrcImage |
GdPicture Image Identifier. Specifies the image to be drawn. |
|
DstImage |
GdPicture Image Identifier. specifies the image to draw. |
|
Transparency |
Transparency to apply to the drawn image [0 ; 255]. 0 means full opacity and 255 full transparency. |
|
DstLeft |
Specifies the x-coordinate in pixel of the upper-left corner of the destination rectangle at which to draw the image. |
|
DstTop |
Specifies the y-coordinate in pixel of the upper-left corner of the destination rectangle at which to draw the image. |
|
DstWidth |
Specifies the width in pixel of the destination rectangle at which to draw the image. |
|
DstHeight |
Specifies the height in pixel of the destination rectangle at which to draw the image. |
|
InterpolationMode |
A member of the Drawing2D.InterPolationMode enumeration. |
A member of the GdPictureStatus enumeration.
Watermark an image to another image
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oGdPictureImaging As New GdPicture.GdPictureImaging Imaging1.SetLicenseNumber("XXXX") 'Please, replace XXXX by a valid demo or commercial license key. 'Go to http://evaluation-gdpicture.com to get a 1 month trial key unlocking all features of the toolkit. Dim ImageBackID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("c:image1.jpg") Dim ImageWatermarkID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("c:image2.jpg") 'Drawing ImageBackID to the top left corner of ImageBackID. oGdPictureImaging.DrawGdPictureImageTransparency(ImageWatermarkID, ImageBackID, 150, 0, 0, 200, 200, Drawing2D.InterpolationMode.HighQualityBicubic) oGdPictureImaging.SaveAsJPEG(ImageBackID, "c:image3.jpg", 75) oGdPictureImaging.ReleaseGdPictureImage(ImageBackID) oGdPictureImaging.ReleaseGdPictureImage(ImageWatermarkID) End Sub
|
What do you think about this topic? Send feedback!
|
|
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.
|