Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pls need help for rotation and flipping the bitmap

1 view
Skip to first unread message

swetha

unread,
Jan 23, 2008, 6:46:27 AM1/23/08
to

Hi can any one tell me how to rotate and flipping the bitmap image.
Hope will give reply

Regards,
swetha.

Luc The Perverse

unread,
Jan 23, 2008, 11:16:41 AM1/23/08
to

Are you talking about 90 degrees? Or free rotation?

Since this is a gaming newsgroup - maybe you should mention what your
engine is, what you are trying to do . . etc :)

--
LTP

:)

Nathan Mates

unread,
Jan 23, 2008, 12:22:11 PM1/23/08
to
In article <2b1838d5-0788-479c...@x69g2000hsx.googlegroups.com>,

swetha <swethakir...@gmail.com> wrote:
>Hi can any one tell me how to rotate and flipping the bitmap image.

For us to provide effective help, you're going to have to provide a
*LOT* more detail. I'd really suggest that you answer the following
questions -- we're not mindreaders. (1) What operating system(s) are
you working with? (2) What programming language(s) are you using? (3)
With many programming languages, there are 'libraries' that can be
used that are not part of the core language -- e.g. DirectX, OpenGL,
SDL, OpenIL, etc. What library/libraries are you using?

There's just *way* too much variety in possible answers to the
above questions. I'm not going to guess and tell you an answer that
has nothing to do with your situation. In general, this is part of
learning how to communicate effectively online -- until you know your
audience, it's better to error on the side of providing too much
information.

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

Miss Elaine Eos

unread,
Jan 23, 2008, 11:30:58 PM1/23/08
to
In article <13petu3...@corp.supernews.com>,
nat...@visi.com (Nathan Mates) wrote:

> In article
> <2b1838d5-0788-479c...@x69g2000hsx.googlegroups.com>,
> swetha <swethakir...@gmail.com> wrote:
> >Hi can any one tell me how to rotate and flipping the bitmap image.

> For us to provide effective help, you're going to have to provide a
> *LOT* more detail. I'd really suggest that you answer the following
> questions -- we're not mindreaders. (1) What operating system(s) are
> you working with? (2) What programming language(s) are you using? (3)
> With many programming languages, there are 'libraries' that can be
> used that are not part of the core language -- e.g. DirectX, OpenGL,
> SDL, OpenIL, etc. What library/libraries are you using?
>
> There's just *way* too much variety in possible answers to the
> above questions. I'm not going to guess and tell you an answer that
> has nothing to do with your situation. In general, this is part of
> learning how to communicate effectively online -- until you know your
> audience, it's better to error on the side of providing too much
> information.

At a more abstract level, think about how you'd write a function to
reverse a string in place (that is, using only the original string
buffer, without allocating a new one.) Flipping a bitmap is similar, in
concept. Rotating is only slightly more complicated.

--
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which sends
unsolicited commercial e-mail or that advertises in discussion newsgroups.

swetha

unread,
Jan 24, 2008, 4:51:16 AM1/24/08
to

Sorry,Now I will explain my problem.

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.

So,I want to rotate the bitmapwith any angle.

Hope will give reply.

Thanks in advance,
swetha.

Nathan Mates

unread,
Jan 24, 2008, 4:41:39 PM1/24/08
to
In article <d977b2ea-152f-418e...@s19g2000prg.googlegroups.com>,

swetha <swethakir...@gmail.com> 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.

Jim Langston

unread,
Jan 24, 2008, 7:41:36 PM1/24/08
to

Still need more information.

You are loading two bitmaps. Okay. You want to rotate one. And do what
with it? Display it on the screen? Save it to a file? Merge it with the
other file?

--
Jim Langston
tazm...@rocketmail.com


swetha

unread,
Jan 24, 2008, 10:59:52 PM1/24/08
to
I want to display that rotated image.Not to merge or save the file.
One more thing is that I am using Windows GDI.So,what shall I can do
to achieve this.

Thankyou for sending some links.
Regards,
swetha.

Nathan Mates

unread,
Jan 25, 2008, 1:15:16 AM1/25/08
to
In article <9027d8eb-d295-4c84...@e6g2000prf.googlegroups.com>,

swetha <swethakir...@gmail.com> wrote:
>I want to display that rotated image.Not to merge or save the file.
>One more thing is that I am using Windows GDI.So,what shall I can do
>to achieve this.

Since you are using GDI, the best thing to do is ask on a newsgroup
that is dedicated to that API. Posting your questions in one of these
groups--
microsoft.public.platformsdk.gdi
microsoft.public.win32.programmer.gdi
-- will probably get you the best answers. If your local news server
doesn't carry those newsgroups, drop by http://groups.google.com/ .
Game developers in general use GDI far less than other APIs.

0 new messages