How do I rotate a 2-D bitmap image using GDI or DirectX ?

How do I rotate a 2-D bitmap image using GDI or DirectX ?

Post by Vince C » Sun, 13 May 2001 22:34:47


Hi all,

I'd like to rotate a piece of image that I display in a simple window. I
didn't
find any API that can rotate images in GDI and I don't know if there are in
DirectX. All I wish is to rotate image by 90 degree steps either under NT
or W2K as well (98 is not that important).

Can someone give me a hint ?

Thanks in advance.
Vince C.

 
 
 

How do I rotate a 2-D bitmap image using GDI or DirectX ?

Post by Feng Yua » Mon, 14 May 2001 03:08:04


For Windows NT/2K/XP, you can easily rotate anything with PlgBlt or world
transformation.

GDI+ image rotation works on all Win32 OS.

www.fengyuan.com

 
 
 

How do I rotate a 2-D bitmap image using GDI or DirectX ?

Post by Vince C » Mon, 14 May 2001 06:58:38


Thanks a lot, Feng. I presume I can also flip an image using that API ?

Vince C.

------



Quote:> For Windows NT/2K/XP, you can easily rotate anything with PlgBlt or world
> transformation.

> GDI+ image rotation works on all Win32 OS.

> www.fengyuan.com

 
 
 

How do I rotate a 2-D bitmap image using GDI or DirectX ?

Post by Feng Yua » Tue, 15 May 2001 03:34:17


Sure. You can even flip an image use BitBlt/StretchBlt/StretchDIBits.

Check http://www.fengyuan.com/sample/samplech10.html

www.fengyuan.com

 
 
 

How do I rotate a 2-D bitmap image using GDI or DirectX ?

Post by Vince C » Tue, 15 May 2001 05:37:56


Thank you very much again :-)

Vince C.

------



Sure. You can even flip an image use BitBlt/StretchBlt/StretchDIBits.

Check http://www.fengyuan.com/sample/samplech10.html

www.fengyuan.com

 
 
 

How do I rotate a 2-D bitmap image using GDI or DirectX ?

Post by Georg » Sun, 27 May 2001 09:44:50



> For Windows NT/2K/XP, you can easily rotate anything with PlgBlt or world
> transformation.

> GDI+ image rotation works on all Win32 OS.

> www.fengyuan.com

Used world transformation before, the quality isn't good enough.
 
 
 

1. Need some help on memory image conversion using GDI Image class.

I have a jpeg image loaded into a C++ memory pointer.  I would like to be
able to attach this memory pointer to an Image class and perform a
conversion to another memory pointer using the Image::Save method.

Since the Image class manipulates data through IStreams, I need to assign an
IStream to my memory pointers.  This is where I am confused.  The only way
that I can figure out how to attach an IStream to a memory pointer is via
CreateStreamOnHGlobal() function.  However, I am not sure that I can just
obtain an HGLOBAL from any memory pointer using GlobalHandle() function if
it did not originate from a GlobalAlloc().

I do not want to have to create an additional global memory block just so
that I can attach a stream to it.  I would rather use my existing memory
blocks.

So basically, I am asking if someone can please tell me the proper way to
attach an IStream to a standard C++ pointer?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

-----------------------------------

2. Shutdown Hang on Win98 SE Client

3. Is there a way to rotate bitmaps in gdi?

4. XP Pro and it's Machine accout.

5. Rotating small bitmaps in GDI

6. access win2k from win 98

7. Rotating 2D bitmaps in DirectX

8. Printing using GDI (rotating text, possible?)

9. Help Required - Directx Newbie - GDI & DirectX

10. Rotate windowed image using DirectDraw?????

11. Loading Bitmap images in Dos

12. Bitmap image in a DOS game