Atkinson dither algorithm
hh
hh at hyperhh.de
Tue Oct 17 07:36:47 EDT 2017
@Alejandro and Alex.
All that limit checking is not needed here. It is much faster,
especially for fast images,to do a few unneeded additions than
to do all these checks for each pixel.
I translated my js-function into LC Script, using Alejandro's
variable names and (inline) Alex's array creation method. See
http://forums.livecode.com/viewtopic.php?p=159244#p159244
You certainly can improve this LCS script even more. In javascript
this is so fast that even for large images there is no gain by
'optimization'.
p.s. Al, you don't need a "try". Just use (where 3 = step-1)
repeat with i = 1 to the number of bytes in tempVar - 3 step 4
More information about the use-livecode
mailing list