c++ GDI 图片画好后保存图片问题 10
Bitmapbmp(L"C:\\1.bmp");Graphicsmygraphics(&bmp);SolidBrushbrush(Color(100,0,0,255));...
Bitmap bmp(L"C:\\1.bmp");
Graphics mygraphics(&bmp);
SolidBrush brush( Color(100,0,0,255) );
FontFamily fontFamily(L"宋体"); //选择一种字体
Font font( &fontFamily, 1, FontStyleRegular,UnitInch );
PointF pointF(5,5);
mygraphics.DrawImage(&bmp,0,0);
mygraphics.DrawString( L"Hello Word!", -1, &font, pointF, &brush );
bmp.Save(L"C:\\2.bmp",&Gdiplus::ImageFormatBMP, NULL);
保存后图片为什么为空啊 展开
Graphics mygraphics(&bmp);
SolidBrush brush( Color(100,0,0,255) );
FontFamily fontFamily(L"宋体"); //选择一种字体
Font font( &fontFamily, 1, FontStyleRegular,UnitInch );
PointF pointF(5,5);
mygraphics.DrawImage(&bmp,0,0);
mygraphics.DrawString( L"Hello Word!", -1, &font, pointF, &brush );
bmp.Save(L"C:\\2.bmp",&Gdiplus::ImageFormatBMP, NULL);
保存后图片为什么为空啊 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询