# Rotate Image

Hi.

I want to create a compass that should rotate. Does
anyone know how to make a Timage or TBitmap to rotate?
Is thera another way of rotating an image on a From?

//me

• : Hi.
:
: I want to create a compass that should rotate. Does
: anyone know how to make a Timage or TBitmap to rotate?
: Is there another way of rotating an image on a From?
:
: //me

To the best of my knowledge (and I am already searching for some years) it is not possible to rotate an image (except for 90,180 and 270 degrees). I have been working on a function that enables me to do this, but I only have it 90% finished.

But simple objects can be rotated by drawing them manually, like the needle of a compass:

[code]
const double midX = /* something */;
const double midY = /* something */;
const double needleRay = /* something */
double needleAngle = /* something */;
const double needleX = midX - (std::cos(needleAngle) * needleRay);
const double needleY = midY + (std::cos(needleAngle) * needleRay);
//Draw the lines
[/code]

(needleAngle is in radians and goes from 0.0 to 2.0*M_PI as a clock goes from 0:00 to 12:00)

But I hope someone else can show an algorithm

See ya,
See ya,

bilderbikkel
• You have three options:

- 1. I have seen components for c++ builder that allow you to rotate images.
- 2. Do not try to rotate your Image. Draw it on real time.
- 3. You can overlay a lot of images (all rotated on different angles) and hide or show them din
• : You have three options:
:
: - 1. I have seen components for c++ builder that allow you to rotate
: images.
: - 2. Do not try to rotate your Image. Draw it on real time.
: - 3. You can overlay a lot of images (all rotated on different
: angles) and hide or show them din
• I use an [link=http://www.rasteredge.com/how-to/vb-net-imaging/imaging-processing/][color=Black]imaging sdk dll[/color][/link] found on the internet which can rotate images found on the internet . Install it and it becomes a selectable processing option.Then you can [link=http://www.rasteredge.com/how-to/vb-net-imaging/rotate-image/][color=Black]rotate images[/color][/link] in any program at all, including Adobe Acrobat . Just open the images, select rotate ,and follow the setps given in the sdk, the task will be finished in several seconds. if you haven't found a good choice , you can have a try. best wishes.