diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-23 14:51:32 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-23 14:51:32 +0400 |
commit | 898498c8008078b0c5d311b9a0a362b5a0ad23be (patch) | |
tree | e4c4592d68d785bfd3827fcdf5780433c0a930c8 /source/blender/imbuf/intern/divers.c | |
parent | cbdedc169dd948d308dcdb1fc2e74b1fdd25880c (diff) |
Fix for IMB_(un)premultiply_rect_float() not doing right business
- Made them receive number of channels rather than number of planes.
This matches to how ImBuf structure stored planes and channels.
- IMB_premultiply_rect_float() was called with channels passed instead
of planes already :S.
Diffstat (limited to 'source/blender/imbuf/intern/divers.c')
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index e147b810cfd..6f6169b6a92 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -552,8 +552,7 @@ void IMB_rect_from_float(ImBuf *ibuf) IMB_colormanagement_transform(buffer, ibuf->x, ibuf->y, ibuf->channels, from_colorspace, ibuf->rect_colorspace->name, true); /* convert from float's premul alpha to byte's straight alpha */ - if (ibuf->channels == 4) - IMB_unpremultiply_rect_float(buffer, ibuf->planes, ibuf->x, ibuf->y); + IMB_unpremultiply_rect_float(buffer, ibuf->channels, ibuf->x, ibuf->y); /* convert float to byte */ IMB_buffer_byte_from_float((unsigned char *) ibuf->rect, buffer, ibuf->channels, ibuf->dither, IB_PROFILE_SRGB, IB_PROFILE_SRGB, @@ -647,7 +646,6 @@ void IMB_float_from_rect(ImBuf *ibuf) /* byte buffer is straight alpha, float should always be premul */ IMB_premultiply_rect_float(rect_float, ibuf->channels, ibuf->x, ibuf->y); - if (ibuf->rect_float == NULL) { ibuf->rect_float = rect_float; ibuf->mall |= IB_rectfloat; |