Re: PIL Convert Alpha-transparent image to non-transparent?

donn <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
I'm no PIL expert, but some thoughts:

> - Iterate over the pixels and find those that are more than 50%
> transparent and convert them to white (ends up with a dithered image)
Why not choose a range of gray values white to black, say in steps of 10%?

> - Use Paste onto a white background that has no transparency, and then
> convert to RGB (no luck there)
That's a good plan. Did you display (img.show() )the image to see the 
effect of the paste? Perhaps there is some mistake in the operation.

> - Use Image.blend to attempt to blend with a white background (at
> various levels), no luck there.
Ah, ok, good plan again. Still, check that image out visually.

I don't know tesseract, but perhaps closer reading of the docs will 
reveal something you are missing in re the RGB format.

Another idea would be to try using Gimp automation, employing Gimp as 
your muscle.

\d
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.