If I attempt to bring up the rotate layer dialog, I get an OverflowException if the canvas size is large enough. The error seems to happen when the total memory usage exceeds the 31 bit address space limit:
23170x23170 @ 4 bytes/pixel = 2^31 bytes = no crash
23171x23171 @ 4 bytes/pixel = 2^31 + 8 bytes = crash
Thanks!
Exception details:
System.OverflowException: Overflow error.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawImage(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit)
at PaintDotNet.Controls.PanControl.DrawToGraphics(Graphics g) in d:\src\pdn\paintdotnet\src\PaintDotNet\Controls\PanControl.cs:line 368
at PaintDotNet.Controls.PanControl.CheckRenderSurface() in d:\src\pdn\paintdotnet\src\PaintDotNet\Controls\PanControl.cs:line 258
at PaintDotNet.Controls.PanControl.DoPaint(Graphics g) in d:\src\pdn\paintdotnet\src\PaintDotNet\Controls\PanControl.cs:line 266
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)