Rank: Member
Groups: Guest
Joined: 8/1/2006(UTC) Posts: 33
|
Dear Alex, Is this possible to display two iamge in single bitmap viewer. and i m also unable to set the back color property to Transparent. Is it possible or this is not possible in this version. still my problem is not solved to combine two image into a single template , for ref. PLease take a template iage having two area to insert the two image and two diff image and try to merge this two image into the Template, PLZ Reply 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)
|
Hello San, No, it is not possible to display two images at the same time in BitmapViewer or set background color of the control to transparent color. Following code sample shows how to merge two photos into one background using mask. See attached files for source and result images. Code:'Source images
Dim photo0 As New Aurigma.GraphicsMill.Bitmap("Y:\FramesSample\photo0.jpg")
Dim photo1 As New Aurigma.GraphicsMill.Bitmap("Y:\FramesSample\photo1.jpg")
Dim mask As New Aurigma.GraphicsMill.Bitmap("Y:\FramesSample\mask.jpg")
Dim background As New Aurigma.GraphicsMill.Bitmap("Y:\FramesSample\background.jpg")
'Placeholder coordinates
Dim point0, point1 As System.Drawing.Point
point0 = New System.Drawing.Point(170, 140)
point1 = New System.Drawing.Point(600, 400)
'Combine with first image
Dim combiner As New Aurigma.GraphicsMill.Transforms.Combiner
combiner.CombineMode = Aurigma.GraphicsMill.Transforms.CombineMode.Copy
combiner.SourceBitmap = photo0
combiner.SourceRectangle = New System.Drawing.RectangleF(0, 0, photo0.Width, photo0.Height)
combiner.DestinationRectangle = New System.Drawing.RectangleF(point0.X - photo0.Width / 2, point0.Y - photo0.Height / 2, photo0.Width, photo0.Height)
combiner.ApplyMaskTransform(background, mask)
'Combine with second image
combiner.SourceBitmap = photo1
combiner.SourceRectangle = New System.Drawing.RectangleF(0, 0, photo1.Width, photo1.Height)
combiner.DestinationRectangle = New System.Drawing.RectangleF(point1.X - photo1.Width / 2, point1.Y - photo1.Height / 2, photo1.Width, photo1.Height)
combiner.ApplyMaskTransform(background, mask)
background.Save("Y:\FramesSample\Result.jpg")
Edited by user Wednesday, December 19, 2007 2:48:19 PM(UTC)
| Reason: Not specified Alex Kon attached the following image(s): |
|
|
|
|
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.