How would I load a PNG image using Win32/GDI (no GDI+ if possible)?

前端 未结 4 521
轮回少年
轮回少年 2020-11-28 10:32

Is it possible to load a PNG from a file into an HBITMAP using Win32 GDI functions? If not, what would be the lightest solution without using external libraries (like libpn

4条回答
  •  借酒劲吻你
    2020-11-28 10:56

    You can use the Windows Imaging Component to load PNG files (on Windows XP SP2 and later). See MSDN Magazine for an introduction on how to use the API and my blog post for a code sample that loads a PNG from an IStream and converts it to an HBITMAP.

提交回复
热议问题