How to rotate Bitmap in windows GDI?

H4cKL0rD picture H4cKL0rD · Feb 16, 2010 · Viewed 12.5k times · Source

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

Answer

Hans Passant picture Hans Passant · Feb 16, 2010

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.