Board index » delphi » Rotating images

Rotating images

Could someone please brief me in the basics of anti-alias rotation of
images ? I've already tried rotating every pixel x degrees, but the
result is...well...unsatisfying. Any help?
P Holtzhausen

 

Re:Rotating images


JP Holtzhausen <jpho...@iafrica.com> wrote in article
<34443FE2.2...@iafrica.com>...

Quote
> Could someone please brief me in the basics of anti-alias rotation of
> images ? I've already tried rotating every pixel x degrees, but the
> result is...well...unsatisfying. Any help?
> P Holtzhausen

Have you tried the reverse rotation?  That is for every pixel, determine
where it was before the rotation and use that value?

I've had pretty good results rotating 24-bit color image this way.
I have a Delphi example, if you'd like to see it.

efg
_____________________________________
Earl F. Glynn          EarlGl...@WorldNet.att.net
MedTech Research Corporation
Lenexa, KS  66219  USA                    

Re:Rotating images


In article <6215ut$...@bgtnsc02.worldnet.att.net> of Wed, 15 Oct 1997
01:23:41 in comp.lang.pascal.misc, "Earl F. Glynn"

Quote
<EarlGl...@worldnet.att.net> wrote:
>JP Holtzhausen <jpho...@iafrica.com> wrote in article
><34443FE2.2...@iafrica.com>...
>> Could someone please brief me in the basics of anti-alias rotation of
>> images ? I've already tried rotating every pixel x degrees, but the
>> result is...well...unsatisfying. Any help?
>> P Holtzhausen

>Have you tried the reverse rotation?  That is for every pixel, determine
>where it was before the rotation and use that value?

>I've had pretty good results rotating 24-bit color image this way.
>I have a Delphi example, if you'd like to see it.

>efg
>_____________________________________
>Earl F. Glynn          EarlGl...@WorldNet.att.net
>MedTech Research Corporation
>Lenexa, KS  66219  USA                    

Duff SigSep - see below.

Sounds good - but add : If you are rotating more than once, compute each
image from the original one, and not from the previous; otherwise,
errors will ISTM accumulate.

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web URL: http://www.merlyn.demon.co.uk/ - FAQqish topics, acronyms and links.
  Correct 4-line sig separator is as above, a line comprising "-- " (SoRFC1036)
  Before a reply, quote with ">" / "> ", known to good news readers (SoRFC1036)

Re:Rotating images


Quote
JP Holtzhausen wrote:

> Could someone please brief me in the basics of anti-alias rotation of
> images ? I've already tried rotating every pixel x degrees, but the
> result is...well...unsatisfying. Any help?
> P Holtzhausen

You could compute the coordinates of the new corners of the image to
determine the region the new image will occupy.  Then go through every
coordinate in that region, apply the reverse rotation to it, and take
the color from the pixel in the original image at that location.  This
way, all pixels in the new image will be filled in.  This isn't
exactly anti-aliasing, but it should work better than what you're
doing now.  BTW, I've never tried this, so I have no idea if it will
work.

Good Luck!

Jared Showalter
Remove the REMOVETHIS in my address to reply.

Other Threads