ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
Re: [Image-SIG] Dithering
by Fredrik Lundh other posts by this author
Aug 28 2005 1:49PM messages near this date
[Image-SIG] Dithering | 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  -  Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:
Christian M. Jensen
Fredrik Lundh
Christian M. Jensen

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved