Convert bitmap to PNG in-memory in C++ (win32)

后端 未结 8 1617
长情又很酷
长情又很酷 2020-12-03 08:02

Can I convert a bitmap to PNG in memory (i.e. without writing to a file) using only the Platform SDK? (i.e. no libpng, etc.).

I also want to be able to define a tran

8条回答
  •  囚心锁ツ
    2020-12-03 08:20

    I've used GDI+ for saving a bitmap as a PNG to a file. You should probably check out the MSDN info about GDI+ here and in particular this function GdipSaveImageToStream.

    This tutorial here will probably provide some help as well.

提交回复
热议问题