diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-01 16:22:52 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-01 16:22:52 +0400 |
commit | 689f3aa174ff795044a4dab719edf60b7b1f5bd3 (patch) | |
tree | 092462df94b1cb441076f328c39d731eb7d3447e /source/blender/imbuf/intern | |
parent | daa1e5bff20d7b750daaf34cddf845943518797f (diff) |
Fix for recent changes in IMB_display_buffer_acquire
Do early out when ibuf has 4 channels only, allocate
4-channels display buffer.
So now we could always assume byte buffer is always
in RGBA format.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 200dcd3d1a7..95f67b9b21d 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1895,7 +1895,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet /* early out: no float buffer and byte buffer is already in display space, * let's just use if */ - if (ibuf->rect_float == NULL && ibuf->rect_colorspace) { + if (ibuf->rect_float == NULL && ibuf->rect_colorspace && ibuf->channels == 4) { if (is_ibuf_rect_in_display_space(ibuf, applied_view_settings, display_settings)) return (unsigned char *) ibuf->rect; } |