Image Rotation ?

Sep 6, 2017 at 10:47am
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 Sep 6, 2017 at 11:43am
Sep 6, 2017 at 11:29am
I'm not sure. Could you show the code you are using please.
Sep 6, 2017 at 11:52am
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.
Sep 6, 2017 at 12:10pm
Thanks. Also, maybe this page is relevant here (uses TBitmap ).

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

Sep 6, 2017 at 6:31pm
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!
Sep 21, 2017 at 7:48am
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.
Sep 21, 2017 at 5:13pm
My greatest condolences.
Topic archived. No new replies allowed.