Calling img.filter(ImageFilter.SMOOTH) destroys partially-transparent alpha?
James <[email protected]> Sat, 1 Oct 2011 12:30:37 -0400
| Newsgroups | gmane.comp.python.image |
|---|---|
| Message-ID | <CA+YJUJENw8o9Dps4NoOQSxfj33WC7YwV60CAEhCOv4=m0tOnxQ@mail.gmail.com> |
Sorry if this has been covered, I couldn't seem to find anything on it. I have a transparent PNG file. I want to render nicely-smoothed, transparent antialiased text on top of it. This will be pasted onto other images, so I can't have the typical background-blended antialias edges PIL normally does. I used Ned Batchelder's method (http://nedbatchelder.com/blog/200801/truly_transparent_text_with_pil.html) for rendering antialiased text, and that works. But when I try to run "img.filter(ImageFilter.SMOOTH)", the filter replaces all semi-transparent values with the background color blended ones instead. How can I run a smoothing filter on an image with per-pixel alpha without destroying it? Thanks! -James _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig