Title: Re: [Image-SIG] Dithering
If I were to build a 32 gray level palette, still composed of 256 colors, just having duplicates, 000011111111222222222 etc. What would the code look like - general example is fine, I am pretty adept. I am just looking for the recommended method to use.
 
Please include how to build and apply the palette.
 
Thanks!
 


From: [EMAIL PROTECTED] on behalf of Fredrik Lundh
Sent: Sun 8/28/2005 1:27 PM
To: [email protected]
Subject: Re: [Image-SIG] Dithering

Christian M. Jensen wrote:

> I need to take a 256 level gray image down to 32 levels with nice
> dithering. What is the best process for doing that?

unless I'm missing something, I don't think you can do that in 1.1.5
(unless you want to do the dithering by hand).

the core library can do dithering both to fixed palettes and optimal
palettes, but PIL's convert method only exposes the "dither to web
palette" and "map to nearest N color" variants.

(if you want to do manual dithering, use quantize(32) on the source
image to get a reference image, take the difference between them,
and propagate the errors in some suitable way)

</F>



_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to