Rank: Member
Groups: Guest
Joined: 8/1/2006(UTC) Posts: 33
|
Dear Alex or merging the two image with mask effect i want to use combiner class. PLZ , provide me a code sample for this as Soon as possible . THANX san
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hi San, Here is small code sample which illustrates how to use masks with combiner transform: Code:Dim combiner As New Aurigma.GraphicsMill.Transforms.Combiner
Dim srcImage As New Aurigma.GraphicsMill.Bitmap
Dim dstImage As New Aurigma.GraphicsMill.Bitmap
srcImage.Load("y:\Test\smallcat.jpg")
dstImage.Load("y:\Test\birthday6.jpg")
Dim mask As New Aurigma.GraphicsMill.Bitmap(dstImage.Width, dstImage.Height, Aurigma.GraphicsMill.PixelFormat.Format24bppRgb)
Dim g As System.Drawing.Graphics = mask.GetGdiplusGraphics()
Try
g.FillEllipse(System.Drawing.Brushes.White, 40, 40, 120, 120)
Finally
g.Dispose()
End Try
mask.ColorManagement.ConvertToContinuous(ColorSpace.GrayScale, False, False)
combiner.CombineMode = Aurigma.GraphicsMill.Transforms.CombineMode.Alpha
combiner.SourceBitmap = srcImage
combiner.SourceRectangle = New System.Drawing.RectangleF(0, 0, srcImage.Width, srcImage.Height)
combiner.DestinationRectangle = New System.Drawing.RectangleF(40, 40, 120, 120)
combiner.ApplyMaskTransform(dstImage, mask)
dstImage.Save("y:\Test\maskedCombineTest.jpg")
Edited by user Wednesday, December 19, 2007 2:54:53 PM(UTC)
| Reason: Not specified |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.