By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

How do I rotate an image??

P: 5
Hi

I need to rotate an image for a project and wouldnt know how to go about it. Could you please help me with the required code that is needed for the rotation.

Troy
Sep 22 '06 #1
Share this Question
Share on Google+
9 Replies


Banfa
Expert Mod 5K+
P: 8,916
Hi

I need to rotate an image for a project and wouldnt know how to go about it. Could you please help me with the required code that is needed for the rotation.

Troy
What type of image on what platform.
Sep 22 '06 #2

P: 5
its a .bmp image of a vulture that ive brought in and have to manipulate.
Sep 22 '06 #3

Banfa
Expert Mod 5K+
P: 8,916
And do you need to do this in code or can you just get a graphics package and rotate the image to the required orientation.

If you require more than 1 orientation then just create several bmp files with the vulture at different orientations the the number required is fixed.
Sep 22 '06 #4

P: 5
It needs to be in code. But im really new at this and i dont know how to write the code that i need to do the rotation.
Sep 22 '06 #5

Banfa
Expert Mod 5K+
P: 8,916
Do you need to rotate it by a multiple of 90 degrees to but an arbitary amount?
Sep 22 '06 #6

100+
P: 293
D_C
Matrix multiplication is one option, especially if you have to unpack all the bmp data into it's own matrix.
Sep 22 '06 #7

P: 5
It has to be by user input, so any anount of rotation has to be possible.
Sep 22 '06 #8

P: 5
Hi

I would appreciate any help on the code that is needed as to how to do the rotation by user input.

thanks in advance
Sep 24 '06 #9

P: 41
use GetDIBits to get the matrix bitmap data, then you can rotate image in the matrix, then pass it to image. that's the principle.
Sep 29 '06 #10

Post your reply

Sign in to post your reply or Sign up for a free account.