You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The simple PNG writer sets all of the rows to unfiltered '0'
I've made a low-profile change to the method in miniz.c in my own code to
accept a pre-filtered input image. It simply passes an array of filter types to
the function, and places them in the image data to be compressed.
tdefl_write_image_to_png_file_in_memory_ex()
line 2802 : Add parameter "mz_uint8* filters"
line 2813 : Replace second parameter of the first call to
tdefl_compress_buffer() [&z]
with (filters == NULL ? &t : filters+(flip ? (h - 1 - y) : y))
tdefl_write_image_to_png_file_in_memory()
line 2831 : Add parameter "mz_uint8* filters"
line 2834 : Pass filters to tdefl_write_image_to_png_file_in_memory_ex()
Alternatively, set the parameter to NULL on line 2834 to reduce the impact on
the API
I'm using t (mz_uint8) instead of z (int), because the function is passing a
byte of data. In face, z should probably also be mz_uint8 for its use in
writing the header.
Original issue reported on code.google.com by [email protected] on 25 Jan 2014 at 6:35
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 25 Jan 2014 at 6:35The text was updated successfully, but these errors were encountered: