Copy Portion of Bitmap
-
I am just wondering if I'm headed in the right direction for this. Could I use the Bitmap.Clone() to specify the area to grab out of an existing image? i.e. Point point = new Point(0 , 0); Size size = new Size( 100, 50 ); Rectangle rect = new Rectangle( point, size ); Bitmap bitmap = new Bitmap.Clone( rect, System.Drawing.Imaging.PixelFormat.DontCare ); Will this get me the portion of the image that starts at 0,0 and has a width of 100 and a height of 50? Any feedback will be greatly appreciated.
No comment, Mr. Senator
-
I am just wondering if I'm headed in the right direction for this. Could I use the Bitmap.Clone() to specify the area to grab out of an existing image? i.e. Point point = new Point(0 , 0); Size size = new Size( 100, 50 ); Rectangle rect = new Rectangle( point, size ); Bitmap bitmap = new Bitmap.Clone( rect, System.Drawing.Imaging.PixelFormat.DontCare ); Will this get me the portion of the image that starts at 0,0 and has a width of 100 and a height of 50? Any feedback will be greatly appreciated.
No comment, Mr. Senator
Well, that's what the documentation says. In most cases, I'd trust the documentation. :rolleyes:
Microsoft MVP, Visual C# My Articles
-
I am just wondering if I'm headed in the right direction for this. Could I use the Bitmap.Clone() to specify the area to grab out of an existing image? i.e. Point point = new Point(0 , 0); Size size = new Size( 100, 50 ); Rectangle rect = new Rectangle( point, size ); Bitmap bitmap = new Bitmap.Clone( rect, System.Drawing.Imaging.PixelFormat.DontCare ); Will this get me the portion of the image that starts at 0,0 and has a width of 100 and a height of 50? Any feedback will be greatly appreciated.
No comment, Mr. Senator
I'd go with Heath on this. As a little tip, if there is anything in the documentation that I don't quite understand I build myself a little demonstrator application (5 minutes work) to test my interpretation of the documentation. That way I can see if it works the way I think it does or not, and if not I now have a test platform to work from to see exactly how it is working. I hope this helps.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar Coming soon: The Second EuroCPian Event