Hi Hermann, Hermann Hoch wrote: > So all considerations to improve the LCS script are, > TMHO, of rather theoretical value. Here are some more: > The Atkinson algorithm uses multiples of 1/8 = 0.125 for > the diffusion-error, the Floyd-Steinberg algorithm uses > multiples of 1/16 = 0.0625. > And have this in mind: > Whenever you use numToChar(Number) in your script you > are wrong by Number - round(Number) of the accumulated > pixel value ...
This is correct, for this reason, in the most recent version of this handler, I am using 2 chars to store the new pixel value. first char is a whole number from 0 to 255 and the second char represent a decimal part from 0 to 99. I will test if using 5 chars for storing the new pixel value. In this way, the new pixel could store values of 0000.000000 that should be enough for this task... After reading Mark's answer, I learned that using a numerical ordered array to store pixel values could be really fast too. This is another path to explore. Al _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode