diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-11 13:26:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-11 13:26:29 +0300 |
commit | 527302bc0b0693b2f5d1ccb567fb532923cd393a (patch) | |
tree | da01a2e5571b9df3e4513e427ac6c54cd7e262be /source/blender/imbuf/intern | |
parent | cf385caf926f06ce54131dac387be39c8665d680 (diff) |
Fix 8bit BMP palette reading
part of D1173 by @rdb, load BGR -> RGB
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/bmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index f8cf1164e4f..bc1ca47d090 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -186,9 +186,10 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags, char co } for (j = x; j > 0; j--) { const char *pcol = palette[bmp[0]]; - rect[0] = pcol[0]; + /* intentionally BGR -> RGB */ + rect[0] = pcol[2]; rect[1] = pcol[1]; - rect[2] = pcol[2]; + rect[2] = pcol[0]; rect[3] = 255; rect += 4; bmp += 1; |