Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rotating a bitmap (fastest possibility)

343 views
Skip to first unread message

Frank Moritz

unread,
Aug 7, 1998, 3:00:00 AM8/7/98
to
I want to rotate a bitmap as fast as possible.

I have a source and a destination image. My algorithm modifies each
pixel seperate by accessing the pixels property of TCanvas; it works but
it is to slow.

What can I do, to make it faster?
Perhaps using the SetWorldTransform?

Please help!


Earl F. Glynn

unread,
Aug 9, 1998, 3:00:00 AM8/9/98
to
Frank Moritz wrote in message <35CB7436...@t-online.de>...

>I want to rotate a bitmap as fast as possible.
>
>I have a source and a destination image. My algorithm modifies each
>pixel seperate by accessing the pixels property of TCanvas; it works but
>it is to slow.


If you have Delphi 3 or 4, use Scanline for quick access to pixel data.

For an example of how to rotate a 24-bits/pixel BMP multiples of 90 degrees, including a "Flip" or "Reverse", take a look at the
FlipReverseRotate Lab Report on the Image Processing page of my Computer Lab.

To rotate a 24-bits/pixel BMP any angle, take a look at the RotateScanline Lab Report..

You will need to modify these examples if you wish to use a PixelFormat other than pf24bit.

efg
_________________________________________
efg's Computer Lab: http://infomaster.net/external/efg

Earl F. Glynn E-Mail: Earl...@att.net
MedTech Research Corporation, Lenexa, KS USA


Dean Hutchison

unread,
Aug 11, 1998, 3:00:00 AM8/11/98
to
Frank,

I was also looking for a fast bitmap rotation routine. The best that I could
find was a routine on the UDDF (Unofficial Delphi Developer web page,
http://www.gnomehome.demon.nl/uddf/ ) in the graphics section.

If you find anything better than this then I would appreciate it if you
could send me a copy.

Regards,
Dean Hutchison.


Frank Moritz wrote in message <35CB7436...@t-online.de>...
>I want to rotate a bitmap as fast as possible.
>
>I have a source and a destination image. My algorithm modifies each
>pixel seperate by accessing the pixels property of TCanvas; it works but
>it is to slow.
>

Perry

unread,
Aug 14, 1998, 3:00:00 AM8/14/98
to
What I think I might do is make my Bitmap a series of Bitmaps. Then CopyRect
each one in
sequence. This will give a rotating effect with out the calculation
overhead.

Perry


Dean Hutchison wrote in message <6quna7$juk$1...@plug.news.pipex.net>...

0 new messages