File library for Bitmap images (*.bmp, *.dib). Currently supports only Windows V3 format with 24-bit-per-pixel color depth.
Diff: BMPFile.cpp
- Revision:
- 2:89b273c12b0a
- Parent:
- 1:8cf4beca9695
- Child:
- 3:be3e831a86c1
--- a/BMPFile.cpp Wed Mar 04 20:56:34 2015 +0000 +++ b/BMPFile.cpp Thu Mar 05 01:56:29 2015 +0000 @@ -272,9 +272,9 @@ case 16: // BGR565 (bbbbbggg:gggrrrrr) return data[stride * y + 2 * x + 1] & 0x1f; case 24: // BGR888 - return data[stride * y + 3 * x + 1]; + return data[stride * y + 3 * x + 2]; case 32: // BGRX8888 - return data[stride * y + 4 * x + 1]; + return data[stride * y + 4 * x + 2]; default: return -1; }