如何使用c ++和GDI而不是GDI +在win32中加载图像文件 [英] How to load image file in win32 using c++ and GDI not GDI+

查看:65
本文介绍了如何使用c ++和GDI而不是GDI +在win32中加载图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在WIN32应用程序中使用GDI加载图像文件。我试图加载几个图像,例如。 jpg和bmp 但只显示了白色背景。我写的程序没用,所以我删除了它。所以请有人告诉我如何使用c ++在GDI
中打开图像文件。我不想要GDI +解决方案。先感谢您。



Saurav yadav

解决方案

尝试 LoadImage 。 BMP图像的下一个示例还创建了调色板:

https://support.microsoft.com/en-us/help/158898/howto-how-to-use-loadimage-to-read-a-bmp-file


How to load image files using GDI in WIN32 application. I tried to load several images eg. jpg and bmp  but only white background was shown .The program I wrote was not useful so I deleted it. So please someone tell me how to open image files in GDI using c++. I don't want GDI+ solutions. Thank you in advance.


Saurav yadav

解决方案

Try LoadImage too. The next sample for BMP images also creates the palette: https://support.microsoft.com/en-us/help/158898/howto-how-to-use-loadimage-to-read-a-bmp-file.


这篇关于如何使用c ++和GDI而不是GDI +在win32中加载图像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆