Dither Test: Testing the undocumented #dither property for copypixels. The image on the left is the original. The image on the right is created using copypixels. Select different source images using the popup at the top.
- Select the image called "Blend", select 16bit as the output format and create a new image. Notice the banding in the output image. Now try again, but use #dither: 1969.
- Select the image called "ducky", select 8bit grayscale as the output format and create a new image using no dither. Compare the result with using #dither:1215. Try again, but with the "Pastel" palette and compare to results to what is achieved using #dither: 1969 this time.
How to use
Just include the #Dither property in the optional property list parameter when using the copypixels command. For example:
outputImage.copyPixels(anImage, aDestRect, aSrcRect, [#Dither: 1215])
There is some more undocumented lingo listed here.
First published 15/06/2005