In article
<d977b2ea-152f-418e-8718-ba22976cd473@[EMAIL PROTECTED]
>,
swetha <swethakiran.korada@[EMAIL PROTECTED]
> wrote:
>Actually I am loading two bitmap files one on the other.I want to
>rotate(freely) and flip the second bitmap(which is the "aircraft.bmp")
>now.I am using VisualStudio-6.0 and operatng system is Windows-XP.
>I am not using any special libraries like OPENGL e.t.c.
How are you loading the bitmap, then? Are you using Windows
functions (e.g. GDI), or something else, like a raw fopen/fread (or
iostreams) into an array in memory? As before, *please* error on the
side of providing too much detail. You're getting better, but you're
not there yet.
For free image rotation, assuming you have a simple 2D array of
pixels, a google search for 'image rotate' finds links like this:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/rotate.htm
. It has a nice
formula on the page. Implement that.
Alternatively, I've found that the OpenIL libraries, freely
available from http://openil.sourceforge.net/
, have a nice set of
functions that make it really easy to read in bitmaps, and do all
sorts of manipulations, including rotating bitmaps. Full source
included, so you can make it do any new things you want.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A.
Heinlein


|