| 
Rank: Member
 Groups: Guest
Joined: 2/6/2007(UTC)
 Posts: 2
 
 | 
            
	      
                I am trying to use the GDIGraphics object to combine two JPEG's into one image, and add a border around the images.  I want the border to be a hard edge, where the pixel color of the border does not affect the images.  Everytime i do this, however, the edges "blend" with the images and depending on the color of the border, it creates an ugly gray line. Here's the code i'm trying to use: Code:   Dim canvas As New Aurigma.GraphicsMill.Drawing.GdiGraphics(bgBmp)
                canvas.DrawImage(profileImg, New PointF(picX, picY), Aurigma.GraphicsMill.Transforms.CombineMode.Copy, 1)
                canvas.DrawImage(pantsImg, New PointF(pantsX, pantsY), Aurigma.GraphicsMill.Transforms.CombineMode.Copy, 1)
                canvas.DrawString(imgStyle.TextValue, New Drawing.Font("Arial", 18, Drawing.FontStyle.Bold, GraphicsUnit.Pixel), _
                                New SolidBrush(Drawing.ColorTranslator.FromHtml(imgStyle.TextHex)), _
                                New Drawing.Point(DUBorderSize + 20, _
                                combHeight - DUBottomHeight - Math.Ceiling(Convert.ToDouble(DUBorderSize) / 2)))
                canvas.DrawRectangle(New Pen(Drawing.ColorTranslator.FromHtml(imgStyle.BorderColorHex), DUBorderSize), _
                                1, 1, DUWidth - DUBorderSize, profileImg.Height + (DUBorderSize))
                canvas.DrawRectangle(New Pen(Drawing.ColorTranslator.FromHtml(imgStyle.BorderColorHex), DUBorderSize), _
                                1, 1, DUWidth - DUBorderSize, profileImg.Height + (DUBorderSize))
 
                bgBmp.Save(sampleSavePath, New Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(100, False))
                bgBmp.Dispose()
 Any suggestions on accomplishing this task without losing the hard edges? Thanks, Brian Edited by user Tuesday, December 18, 2007 5:09:55 PM(UTC)
 | Reason: Not specified |