We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3595 - use libPNG in IMG_SavePNG_RW()
Summary: use libPNG in IMG_SavePNG_RW()
Status: RESOLVED DUPLICATE of bug 3392
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.1
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 13:55 UTC by Fabian Greffrath
Modified: 2017-09-12 07:18 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Greffrath 2017-03-01 13:55:56 UTC
Hi there,

I wonder why the IMG_SavePNG_RW() function currently uses the PNG saving routines provided in the several-hundred-kB "miniz.h" header file instead of relying on libpng. If you want to prevent libpng from becoming a hard dependency (but, why?) you could still fall back to the miniz solution if libpng is unavailable.

On the pro side, the libpng-based solution would be more flexible. For example, and most importantly in my case, libpng allows for saving of palettized images which vastly reduces the output file size.

Would you accept a patch to (a) either replace the current implementation with one solely based on libpng or (b) use a libpng-based implementation and only fall back to using miniz.h if libpng is found unavailable?

Cheers,

Fabian
Comment 1 Sam Lantinga 2017-09-12 07:18:02 UTC
This was implemented in bug 3392

*** This bug has been marked as a duplicate of bug 3392 ***