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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-13 03:28:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-13 03:28:33 +0400
commit6324c5fed189f2f977e7571c2762f674a715a469 (patch)
treead79006da00d9d6b253f1718a480114aeed8118e /source/blender/imbuf/intern/openexr
parente297e6b64b61ace14c4010972d5164a816a5c3f0 (diff)
code cleanup: includes for imbuf, also remove double promotion.
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index f5479bce570..b66a7449781 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -256,10 +256,10 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
from = (unsigned char *)ibuf->rect + channels * i * width;
for (int j = ibuf->x; j > 0; j--) {
- to->r = (float)(from[0]) / 255.0;
- to->g = (float)(from[1]) / 255.0;
- to->b = (float)(from[2]) / 255.0;
- to->a = (float)(channels >= 4) ? from[3] / 255.0 : 1.0f;
+ to->r = (float)(from[0]) / 255.0f;
+ to->g = (float)(from[1]) / 255.0f;
+ to->b = (float)(from[2]) / 255.0f;
+ to->a = (float)(channels >= 4) ? from[3] / 255.0f : 1.0f;
to++; from += 4;
}
}
@@ -269,10 +269,10 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
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);
- to->g = srgb_to_linearrgb((float)from[1] / 255.0);
- to->b = srgb_to_linearrgb((float)from[2] / 255.0);
- to->a = channels >= 4 ? (float)from[3] / 255.0 : 1.0f;
+ to->r = srgb_to_linearrgb((float)from[0] / 255.0f);
+ to->g = srgb_to_linearrgb((float)from[1] / 255.0f);
+ to->b = srgb_to_linearrgb((float)from[2] / 255.0f);
+ to->a = channels >= 4 ? (float)from[3] / 255.0f : 1.0f;
to++; from += 4;
}
}