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>2011-01-08 15:22:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-08 15:22:16 +0300
commit988e5371fac894a6b35e561fc43e5e9ea6bc3c40 (patch)
treeba564d0d1389dacc8b8f11e09d86ac20194804ff /source/blender/imbuf
parent39e7848ca17eb76bf5877a063a6a72ecb8ec011c (diff)
fix for crash when converting sequencer profiles with non-float buffers.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/divers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 138212a622d..1ea11432025 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -278,9 +278,9 @@ void IMB_convert_profile(struct ImBuf *ibuf, int profile)
}
if(ibuf->rect) {
for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) {
- rctf[0]= (unsigned char)((srgb_to_linearrgb((float)rctf[0]/255.0f) * 255.0f) + 0.5f);
- rctf[1]= (unsigned char)((srgb_to_linearrgb((float)rctf[1]/255.0f) * 255.0f) + 0.5f);
- rctf[2]= (unsigned char)((srgb_to_linearrgb((float)rctf[2]/255.0f) * 255.0f) + 0.5f);
+ rct[0]= (unsigned char)((srgb_to_linearrgb((float)rct[0]/255.0f) * 255.0f) + 0.5f);
+ rct[1]= (unsigned char)((srgb_to_linearrgb((float)rct[1]/255.0f) * 255.0f) + 0.5f);
+ rct[2]= (unsigned char)((srgb_to_linearrgb((float)rct[2]/255.0f) * 255.0f) + 0.5f);
}
}
ok= TRUE;
@@ -297,9 +297,9 @@ void IMB_convert_profile(struct ImBuf *ibuf, int profile)
}
if(ibuf->rect) {
for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) {
- rctf[0]= (unsigned char)((linearrgb_to_srgb((float)rctf[0]/255.0f) * 255.0f) + 0.5f);
- rctf[1]= (unsigned char)((linearrgb_to_srgb((float)rctf[1]/255.0f) * 255.0f) + 0.5f);
- rctf[2]= (unsigned char)((linearrgb_to_srgb((float)rctf[2]/255.0f) * 255.0f) + 0.5f);
+ rct[0]= (unsigned char)((linearrgb_to_srgb((float)rct[0]/255.0f) * 255.0f) + 0.5f);
+ rct[1]= (unsigned char)((linearrgb_to_srgb((float)rct[1]/255.0f) * 255.0f) + 0.5f);
+ rct[2]= (unsigned char)((linearrgb_to_srgb((float)rct[2]/255.0f) * 255.0f) + 0.5f);
}
}
ok= TRUE;