Metaspace
December 1st, 2006, 08:10 AM
It seems that bitmaps of the GDI+ Bitmap class are limited to a size of 32767 pixels in either direction (width, height).
I use Visual C++ 6.0 with latest patch, plus Platform SDK.
This limit is not documented, and I have not found anything on the topic on the net; all I did find was that GDI+ is supposed to overcome any previous short-int limitations (e.g., GDI display surface).
In the attached demo application (see CTest_bmpView::OnDraw), if 32768 or a larger value is used for the width or height of the GDI+ bitmap, although creation of the bitmap and operations on it (e.g., FillRectangle) are successful, display (using Graphics::DrawImage) or saving (Bitmap::Save) fail, with status code InvalidParameter and Win32Error, respectively.
Additional error information obtained using ::GetLastError is useless ("Operation Successful").
Has anyone encountered this problem, or even better, knows how to overcome it? Would also appreciate the odd report of reproducibility.
I use Visual C++ 6.0 with latest patch, plus Platform SDK.
This limit is not documented, and I have not found anything on the topic on the net; all I did find was that GDI+ is supposed to overcome any previous short-int limitations (e.g., GDI display surface).
In the attached demo application (see CTest_bmpView::OnDraw), if 32768 or a larger value is used for the width or height of the GDI+ bitmap, although creation of the bitmap and operations on it (e.g., FillRectangle) are successful, display (using Graphics::DrawImage) or saving (Bitmap::Save) fail, with status code InvalidParameter and Win32Error, respectively.
Additional error information obtained using ::GetLastError is useless ("Operation Successful").
Has anyone encountered this problem, or even better, knows how to overcome it? Would also appreciate the odd report of reproducibility.