- /* *img = CreateCompatibleBitmap(*d, width, height); */
-#if !defined(__VISAGECPP__) /* fixme for OS/2 */
- 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(hps, &bmih, 0L, NULL, NULL);
+#else
+ img->bitmap = CreateBitmap(width, height, 1 /* plane */ ,
+ depth /* bits per pixel */ , NULL);