[BugReport] Bitmap.SetPixel()

L

Lloyd Dupont

if I call myBitmap.SetPixel(x, y)
where x, y is outside bitmap boundary, there is

- no exception is thrown
- the application crash

I guess it's not an acceptable behavior for a .NET CF method....
 
M

Mark Johnson

I will try this tomorrow morning (in 6 hours or so) and see if I get any
exceptions.
Can you show some code showing how x,y are being set?

Mark Johnson, Berlin Germany
(e-mail address removed)
 
M

Mark Johnson

try

{

bmp_New.SetPixel(bmp.Width,bmp.Height,bmp.GetPixel(bmp.Width-1,bmp.Height-1)
);

}

catch (Exception e)

{

System.Windows.Forms.MessageBox.Show(e.Message);

}

Result : ArgumentException

As you pointed out, it looks as if your problems is caused someware else.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top