- /* *img = CreateCompatibleBitmap(*d, width, height); */
- img->bitmap = CreateBitmap(width, height, 1 /* plane */ ,
- depth /* bits per pixel */ , NULL);
+ /*JW: This is what it should be, but the picture comes out
+ just black!? It appears to be doing monochrome reduction,
+ but I've got no clue why. Using CreateBitmap() is supposed
+ to be slower, but otherwise ok
+ if ( depth == GetDeviceCaps(*d, BITSPIXEL) ) {
+ img->bitmap = CreateCompatibleBitmap(*d, width, height);
+ } else*/ {
+#ifdef __OS2__
+ img->bitmap = GpiCreateBitmap(*d, &bmih, 0L, NULL, NULL);
+ WinReleasePS(*d);
+#else
+ img->bitmap = CreateBitmap(width, height, 1 /* plane */ ,
+ depth /* bits per pixel */ , NULL);
+#endif
+ }