LuaJIT and MultiProcessPixels

User avatar
Chad
Fusionator
Posts: 1409
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 14 times

LuaJIT and MultiProcessPixels

#1

Post by Chad » Thu Jul 23, 2015 2:48 pm

Ok, so something seems to be screwy with LuaJIT and MultiProcessPixels and float/int casting for Numbers.

Code: Select all

		out:MultiProcessPixels(nil, {}, 0,0, img.Width, img.Height, img, function (x,y,p)
				p.R = p.R - 0.5 + 0.5
				p.G = p.G - 0.5
				p.B = p.B * 5.0
				return p
			end)
			
So in older version of Fusion, I think p would be float all the time, but in 7.x, it's based on the image it is running on. So for integer images, p is int. In the example above this causes p.G and p.B to overflow. p.R is fine.

I'm going to try the other pixel iteration methods, but I though I should mention this one now.