Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/openexr/openexr_api.cpp')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp4
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);