Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rotate Bitmap in windows GDI?

Tags:

c++

gdi

How would I go about rotating a Bitmap in Windows GDI,C++?

like image 442
H4cKL0rD Avatar asked Feb 16 '10 01:02

H4cKL0rD


1 Answers

You can do it with GDI+ (#include <gdiplus.h>). The Graphics class has the RotateTransform method. That allows arbitrary rotations. Use Image::RotateFlip() if you only need to rotate by 90 degree increments, that's a lot more efficient.

like image 134
Hans Passant Avatar answered Sep 20 '22 19:09

Hans Passant