| src/PImage.hh | |
| 112 | @@ -112,12 +112,16 @@ |
| 112 | // 5 R, 5 G, 5 B (15 bit display) |
| 113 | if ((ximage->red_mask == 0x7c00) |
| 114 | && (ximage->green_mask == 0x3e0) && (ximage->blue_mask == 0x1f)) { |
| 115 | r = g = b = 0; |
| 116 | r = (pixel >> 7) & 0x7c; |
| 117 | g = (pixel >> 2) & 0x3e; |
| 118 | b = (pixel << 3) & 0x1f; |
| 119 | // 5 R, 6 G, 5 B (16 bit display) |
| 120 | } else if ((ximage->red_mask == 0xf800) |
| 121 | && (ximage->green_mask == 0x07e0) |
| 122 | && (ximage->blue_mask == 0x001f)) { |
| 123 | r = g = b = 0; |
| 124 | r = (pixel >> 8) & 0xf8; |
| 125 | g = (pixel >> 3) & 0x7e; |
| 126 | b = (pixel << 3) & 0x1f; |
| 127 | // 8 R, 8 G, 8 B (24/32 bit display) |
| 128 | } else if ((ximage->red_mask == 0xff0000) |
| 129 | && (ximage->green_mask == 0xff00) |
| ... | |