Image Rotation ?

closed account (Shp21hU5)
Hi Guy's I'm only a Novice but can you help Please

I'm drawing a basic shape on a Image in Borland C++ Builder which is fine but I want to rotate the shape at any given angle I choose. I tried using xForm functions but all that does is either produce a empty image or hide the image completely.

If I draw the shape on the main form using xForm it works fine but not if I associate it to the TImage i've drawn.

Am I barking up the wrong tree trying to xForm with a TImage ?
Last edited on
I'm not sure. Could you show the code you are using please.
closed account (Shp21hU5)
Thank you for replying Chervil

I will forward you a copy of my code the next time I'm at home.

thank you.
Thanks. Also, maybe this page is relevant here (uses TBitmap ).

http://www.leunen.com/cbuilder/rotbmp.html

That page touches the basics, but it is a very crude method for rotating the images -- you will not be happy with the way the image rasterizes at non-right angles.

You need a library that can perform proper resampling.
Two libraries that come to mind:
http://www.boost.org/doc/libs/release/libs/gil/doc/index.html
http://www.imagemagick.org

Good luck!
closed account (Shp21hU5)
Thank you guy's ever so much.

Sorry for the late response but had a death in the family.

Once again thank you for your help.
My greatest condolences.
Topic archived. No new replies allowed.