mzd_to/from_png are limited by libpng user limits

Issue #39 resolved
smunaut created an issue

By default libpng limits the size of the images to 1Mx1M ... which can be annoying when you're dealing with huge matrices (in my case 2M rows)

Calling : {{{ png_set_user_limits(png_ptr, 0x7fffffffL, 0x7fffffffL); }}}

on the png object just after creating it will solve the issue.

The cost is that if you now try to load an "evil" png it could eat up all your RAM ... but I would say it's not as much a problem in this case as it would be in a web browser or such.

Comments (1)

  1. Log in to comment