473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Mirror the image

Hello,

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, 58)
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, 58), 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
gpth.AddLines(arr)

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)
gr.Dispose()
oBmp.Dispose()

Jul 3 '06 #1
0 883

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CJeans | last post by:
how to get its mirro image, any function? I created an image by imagecreateturecolor, then a serial processes, at last return its mirror image. Thanks.
2
by: vim | last post by:
Hi guys and gals I want a program to find mirror image of given tree. plz regs vim
3
by: Eduard Witteveen | last post by:
Hello list, I have code the draw MyDrawingObject information on a System.Drawing.Graphics object. The code is more/less the following: I now want to rotate / mirror the object i draw. I've...
0
by: virtualadepts | last post by:
In Ancient time mirrors were held to be sacred, but they only had pools of water and pieces of metal available to observe their own reflection. The only way to get a clear image of what you looked...
0
by: CoreyWhite | last post by:
In Ancient times mirrors were held to be sacred, but they only had pools of water and pieces of metal available to observe their own reflection. The only way to get a clear image of what you looked...
0
by: JNPSANTHOSH | last post by:
HI, In my monthly attendance report,the months are displayed at the top in veritical manner.But at the time of taking the printout,it prints the month as a mirror image.lettertosanthosh@gmail.com
4
by: binchaud | last post by:
Is there a way to create a dynamic mirror effect that will create a reflection regardless of what is placed above a set line? Meaning, we should not have to duplicate symbols, flip them and...
4
by: Mark A | last post by:
I would like to make a split mirror copy of a HADR standby database. Please note that I do not want to create a standby with a split mirror of the primary, but I want to make a split mirror of the...
1
tlhintoq
by: tlhintoq | last post by:
I'm pretty sure this is language independent and is going to be the same whether it's VC or C# - but my project is C# WIndows Forms just in case. Does anyone have a good handle on the sequence of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.