Which is faster, GDI + or libpng?

I have HBITMAPone and I would like to convert it to png format (in memory, I have malloc'd) as quickly as possible, so I have to ask a question with GDI+or libpng?

I tried to use GDI+, but it is not as fast as we would like. I also tried FreeImage, and it was too slow.

+3
source share
1 answer

In my tests, starting libpng with default settings is about 2 to 3 times slower than GDI +, but tends to create more compressed png files.

. , 1680x1050, libpng 1,23 1531k png; GDI + 0,35 , png 2391k. ( ) libpng 294k png 0.305 , GDI + 318k png 0.097 .

pngcheck GDI + png , zlib. Libpng " zlib", , -, . , png_set_compression_level(), libpng /, , GDI +.

- PNG_INTERLACE_NONE png. PNG_INTERLACE_ADAM7, -, png, , .

+1

Source: https://habr.com/ru/post/1758453/


All Articles