[Image-SIG] How to improve rotation quality?

Alec Bennett wrybread at gmail.com
Sat Feb 20 04:39:42 CET 2010


> Ideally, you should use whatever color is going to be in the background
when you show the image.

Agreed, but the problem is I'm making a collage of pictures where the new
pictures are placed above previous pictures, so there's no one consistent
background color.

> Even better would be if you could blend it with a transparent background,
and show it that way,
> but that would require an alpha channel, and I don't think jpeg supports
that.

I'm converting to BMP and assigning an alpha channel so this is indeed a
possibility. Another thought I had was making a drop shadow effect, which
the thin gray edge outside of my white border already approximates.

Interestingly, when I've tried making a transparent canvas in PIL (which I'd
have to do to add an alpha border) in the past, I consistently got weird
artifacts in the transparent areas. The workaround I used was to make a
small blank PNG that was pure alpha and resize it as necessary.

If I test out the alpha border I'll post back to this thread.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100219/c9cd414d/attachment.html>


More information about the Image-SIG mailing list