diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-15 17:32:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-15 17:32:20 +0400 |
commit | f5957e62378f1ae9fd08c9a14222b940aaab15d0 (patch) | |
tree | 2508bbd2d665e7f24bb5a89579d957be110e0f19 /source/blender/imbuf/intern/openexr | |
parent | 5daf9354d255bb40e832e7e0d48008e56158e0b4 (diff) |
own recent commit which added support for writing srgb float buffers broke writing char buffers as half EXR's.
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index a0969979817..9b68e0e45eb 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -267,6 +267,8 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags) if(ibuf->profile == IB_PROFILE_LINEAR_RGB) { for (int i = ibuf->y-1; i >= 0; i--) { + from= (unsigned char *)ibuf->rect + channels*i*width; + for (int j = ibuf->x; j > 0; j--) { to->r = (float)(from[0])/255.0; @@ -280,6 +282,8 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags) else { for (int i = ibuf->y-1; i >= 0; i--) { + from= (unsigned char *)ibuf->rect + channels*i*width; + for (int j = ibuf->x; j > 0; j--) { to->r = srgb_to_linearrgb((float)from[0] / 255.0); |