旋转位图文件 [英] Rotating bitmap file
本文介绍了旋转位图文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是的,我已经搜索过,但找不到我能理解的合适信息.请让我知道一些与旋转位图有关的源代码.
Yes, i''ve searched and i couldn''t find suitable info that i can understand. Let me know some piece of source code connected to rotating bitmap, please.
推荐答案
您是否曾经在这里搜索过Google?我看到许多结果正在排队.让我知道您是否需要lmgtfy链接.
Have you searched Google before asking it here? I see many results lining up. Let me know if you need a lmgtfy link.
这对您有用吗? :)
Would it be something for you ? :)
#include <windows.h>
// Gdiplus
#pragma comment(lib, "gdiplus.lib")
#include <gdiplus.h>
static const wchar_t* filename= L"C:\\WINDOWS\\Web\\Wallpaper\\Autumn.BMP";
int main(void)
{
// Start Gdiplus
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
Gdiplus::GdiplusStartup(&gdiplusToken,
&gdiplusStartupInput, NULL);
// Load the image
Gdiplus::Image* image = Gdiplus::Image::FromFile(filename);
// Now it will be rotated:
image->RotateFlip(Gdiplus::Rotate90FlipY);
// Delete the image
delete image; image = 0;
// Shutdown Gdiplus
Gdiplus::GdiplusShutdown(gdiplusToken);
return 0;
}
这篇关于旋转位图文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文