Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Mirror the image

Thread Tools

Mirror the image
Posts: n/a

I have generated an image using System.Drawing.Bitmap namespace.
How can I get the mirror image along with the original image.
I am giving my code. This code will generate half of my image(shirt
piece). Remaining half, I want to mirror it. Pls hv a look and suggest
me an idea.

thanks in advance

Dim oBmp As New Bitmap(200, 200)
Dim gr As Graphics = Graphics.FromImage(oBmp)

Dim redBr As New SolidBrush(Color.Red)
Dim bgBr As New SolidBrush(Color.Beige)
Dim grBr As New SolidBrush(Color.Green)
Dim blackPen As New Pen(Color.Black, 2)
Dim grPen As New Pen(Color.Green, 3)
Dim point1 As New Point(160, 15)
Dim point2 As New Point(160, 20)
Dim point3 As New Point(163, 35)
Dim point4 As New Point(165, 42)
Dim pt5 As New Point(170, 52)
Dim pt6 As New Point(180, 5
Dim pt7 As New Point(195, 60)
Dim curvePoints As Point() = {point1, point2, point3, point4,
pt5, pt6, pt7}
Dim arr As Point() = {New Point(100, 30), New Point(100, 175),
New Point(195, 175), New Point(195, 60), New Point(180, 5, New
Point(170, 52), New Point(165, 42), New Point(163, 35), New Point(160,
20), New Point(160, 15), New Point(130, 5)}
Dim gpth As New GraphicsPath

gr.FillRectangle(bgBr, 0, 0, 200, 200)
gr.DrawLine(blackPen, New Point(100, 30), New Point(100, 175))
gr.DrawLine(blackPen, New Point(100, 175), New Point(195, 175))
gr.DrawLine(blackPen, New Point(100, 30), New Point(130, 5))
gr.DrawLine(blackPen, New Point(130, 5), New Point(160, 15))
gr.DrawLine(blackPen, New Point(195, 175), New Point(195, 60))
gr.DrawCurve(blackPen, curvePoints)
gr.FillPath(grBr, gpth)

gr.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
Response.ContentType = "image/gif"
oBmp.Save(Response.OutputStream, ImageFormat.Gif)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to write with mirror image of letters jj206 Computer Support 1 05-24-2007 10:51 AM
Re: How to write with mirror image of letters Bhaiyyah Computer Support 2 05-21-2007 10:52 PM
mirror image of tree vim C Programming 2 05-11-2006 07:01 AM
Auto-mirror an image? Armando Digital Photography 6 10-26-2004 09:37 PM
corel mirror image probs sunny Computer Support 17 02-21-2004 06:59 PM