PNG compression buggy or badly implemented?

I noticed today after sending a job to render with 2.57b that PNG compression is painful. I didn´t notice it before though.
Tried on two machines, same result.

Rendering 1080p with alpha, 5 seconds for a frame, rather simple stuff.
Then ~15 seconds pause, console output tells me file is written, starts next frame on a Phenom2 x4
On my C2Q9550, it takes around 10 seconds.

Took me actually some time to figure out it was the PNG compression. Either it was always set to 0% in 2.49 or it didn´t happen there.

That seems rather unatural. Sure I can store them uncompressed, but I don´t need to waste space just because I have it.
I also often need to send frames via ftp to clients.

However, rendering the image uncompressed (~8MB)
Compressing it in blender to 100% (best compression) -> 15 seconds, 915k
Compressing it in IrfanView to 9 (best compression) -> 0-1 second, 535k (seems instant)

Yes, I can batchcompress all the frames with IrfanView after rendering uncompressed, but thats an unnesessary extra step in the workflow IMO.

Anyone else experiencing it or are just my two systems oddly slow compressing PNG?
Blender seem not to just compress slow, it compresses also bad.

If others experience that as well I´ll check the bugtracker :slight_smile:

Forgot to mention, JPG as compressed image also stores pretty much instant.
And uncompressed image formats like TGA anyways.

Intresting. Also the batch conversion of IrfanView is slow now.
If I open a file and save it compressed it´s fast - almost insant.
If I batchconvert them, it´s slow, not as slow as in Blender but slow.

Any insights on that?

Well, i noticed recently that saving to png is quite slow, in fact slower than jpg. The same is true in GIMP. But i always assumed it had something to do with the “weight” of the file itself…

Blender uses libpng, maybe it’s a version problem. On Windows all seem to be 1.2.4 in many builds including Cycles.

Current version appears to be 1.5.2 according to libpng site and advise that versions after 1.2.5 are used for performance reasons.

Hmm. Sounds like a reasonable explaination.
Sigh. So all I have to do is build my own blender with libpng 1.5.2.

Why´s Blender using such an ancient version anyways?