I write a piece of code to clone a part of an image by C#,
and I did
it. But what I used is a bi_level image, but the outcome is
not a
bi_level image. Is there some errors on my code or someone
could give
me some tips or solutions to solve this problem. I will
appreciate your
kindness, thank you.
------------------------------------------------------------
------------------------------------------------------------
-
Here is the code I write
------------------------------------------------------------
-----------------------------------------------------------
if (OpenImage_Dg.ShowDialog() == DialogResult.OK)
{
if (OpenImage_Dg.FileName != null)
{
OpenPhotoLocation = OpenImage_Dg.FileName;
OriginPhoto.Image =
Image.FromFile(OpenPhotoLocation);
Rectangle RID = new Rectangle(193, 151, 95, 15);
Bitmap IDImage = new Bitmap(95, 15);
Graphics Personal_g = Graphics.FromImage(IDImage);
Personal_g.DrawImage(OriginPhoto.Image, 0, 0, RID,
GraphicsUnit.Pixel);
Personal_g.Dispose();
IDImage.Save("C:\\Clone_Image.bmp",
ImageFormat.Bmp);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|