[Image-SIG] How to improve rotation quality?

Christopher Barker Chris.Barker at noaa.gov
Fri Feb 19 23:42:57 CET 2010

Alec Bennett wrote:
>  > So I tried adding a black background to the image first, then 
> rotating it -- much better.
>  > See the enclosed version of your test code, and a rotated image.
> Wow, what a difference! Even if the border is a single pixel, much 
> better results. I set the border color to grey, which seems to work as 
> well as black, and am now a happy slideshow maker.

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

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.

Glad it worked for you,


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Image-SIG mailing list