diff options
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 3 | ||||
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 571cac41399..7e7e489a6c3 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -145,7 +145,8 @@ bool IMB_initImBuf( struct ImBuf *IMB_allocFromBuffer(const unsigned int *rect, const float *rectf, unsigned int w, - unsigned int h); + unsigned int h, + unsigned int channels); /** * diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index 7d2f51af65e..75db3fd3c73 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -428,7 +428,8 @@ bool imb_addrectImBuf(ImBuf *ibuf) struct ImBuf *IMB_allocFromBuffer(const unsigned int *rect, const float *rectf, unsigned int w, - unsigned int h) + unsigned int h, + unsigned int channels) { ImBuf *ibuf = NULL; @@ -438,6 +439,7 @@ struct ImBuf *IMB_allocFromBuffer(const unsigned int *rect, ibuf = IMB_allocImBuf(w, h, 32, 0); + ibuf->channels = channels; if (rectf) { ibuf->rect_float = MEM_dupallocN(rectf); ibuf->flags |= IB_rectfloat; |