Fix format determination - if there is a tRNS chunk, make sure to use an alpha-enabled format.
Some of the file handling was extremely dubious - it looks like what we wanted to do was actually to set the logging functions in the error/warning handlers, so just do that.
Also use row operations to avoid allocating the row pointers arrays.
Fix format determination - if there is a tRNS chunk, make sure to use an alpha-enabled format.
Some of the file handling was extremely dubious - it looks like what we wanted to do was actually to set the logging functions in the error/warning handlers, so just do that.
Also use row operations to avoid allocating the row pointers arrays.
Fixes #2257