diff options
author | Kent Mein <mein@cs.umn.edu> | 2005-03-11 16:00:31 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2005-03-11 16:00:31 +0300 |
commit | 7a0e2a012c331b651141694580a3503e15c35448 (patch) | |
tree | 108f43d752ed454b1446ffeb09ccfb91ef77f4cb /source/blender | |
parent | 3bc2ae130d36a6c4fb6dfc27e25316f638cf6018 (diff) |
Found some messed up code that assumed abgr instead of rgba
In IMB_gamwarp which is used by the blur sequence plugin.
It should be fixed now. Also fixes a warning with gcc.
Kent
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 6b46af30f8b..8c579156691 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -155,12 +155,9 @@ void IMB_gamwarp(struct ImBuf *ibuf, double gamma) gamma)) + 0.5; rect = (uchar *) ibuf->rect; - for (i = ibuf->x * ibuf->y ; i>0 ; i--){ - rect ++; - /* put a warning in gcc : operation may be undefined : */ - /* it is true it's rather convoluted even by C standards ;) */ - *rect ++ = gam[*rect]; /*FIXME*/ - *rect ++ = gam[*rect]; /*FIXME*/ - *rect ++ = gam[*rect]; /*FIXME*/ + for (i = ibuf->x * ibuf->y ; i>0 ; i--, rect+=4){ + rect[0] = gam[rect[0]]; + rect[1] = gam[rect[1]]; + rect[2] = gam[rect[2]]; } } |