Fix for [#24299] Changing Curves on rendered Pass scewes pass up seriously ;-)
authorJanne Karhu <jhkarh@gmail.com>
Tue, 19 Oct 2010 11:51:31 +0000 (11:51 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Tue, 19 Oct 2010 11:51:31 +0000 (11:51 +0000)
* The number of pass channels wasn't taken properly into account when applying curves.

source/blender/blenkernel/intern/colortools.c

index 83ed65a..2d4e0ac 100644 (file)
@@ -869,7 +869,7 @@ void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf)
        if(ibuf->channels)
                stride= ibuf->channels;
        
-       for(pixel= ibuf->x*ibuf->y; pixel>0; pixel--, pix_in+=stride, pix_out+=4) {
+       for(pixel= ibuf->x*ibuf->y; pixel>0; pixel--, pix_in+=stride, pix_out+=stride) {
                if(stride<3) {
                        col[0]= curvemap_evaluateF(cumap->cm, *pix_in);