Image, multimedia, and archive parsing are notoriously prone to security bugs. In fact, so are most other types of complex parsing. There are months of researcher work and decades of CPU time that went into auditing and fuzzing libraries such as libpng or libjpeg-turbo, identifying and fixing lots of vulnerabilities. The same isn't true for libraries with much smaller following, especially if their documentation doesn't contain any discussion of security risks and countermeasures taken.
its a very good cross platform bit of code. even though it has some annoying compiler warnings, i've managed to get this to work just fine on Windows, Mac, Linux (ubuntu, CentOS, RHEL at least...), Android (even the obscure mips configs), iOS, Windows Phone 8, Windows 8 Store and other platforms that must remain nameless.
jpeg writing & loading: https://code.google.com/p/jpeg-compressor/
jpeg loading: https://code.google.com/p/picojpeg/
jpeg loading: https://code.google.com/p/jpgd/
OpenEXR writing: https://github.com/aras-p/miniexr/blob/master/miniexr.cpp
PNG writing (and zlib + ZIP file handling): https://code.google.com/p/miniz/
Newest version of miniz reads and writes zip64 archives and is part of vogl project: https://github.com/ValveSoftware/vogl/tree/master/src/voglco...
And of course already mentioned stb_image: https://github.com/nothings/stb/blob/master/stb_image.h
It doesn't deflate, but it's useful if you need to take a screenshot where space is at a premium.
I've been so frustrated today by trying to get libpng to work, but landed on this library one hour ago and now everything just works sweet! :-)
As is mentioned elsewhere in the thread: this does not seem to be secure software. As such, think twice about using this: do you really want anyone within NFC range to be able to exploit your app?
Of course using a secure library is preferred. Though it's really hard to use something that isn't very well documented and I just have a few months of experience working with C. Which is also a potential dangerous combination.
I found another library that wraps libpng https://github.com/nilx/io_png
Maybe I could be more successful with that library.
It might be worth putting a bit more details there.
> LodePNG is a PNG image decoder and encoder, all in one, no dependency or linkage to zlib or libpng required.
It's made for C (ISO C90), and has a C++ wrapper with a more convenient interface on top.
Or you mean the title here in HN? That's an unfortunate consequence of the "keep titles verbatim" rule.
I fear that you're misunderstanding the rule a little. There's nothing wrong with including an explanatory phrase from a subtitle, or from the introductory sentence of the page, which is often a de facto subtitle. (We added that when we saw this title earlier today). What we're strict about avoiding is submitters rewriting titles to make their own point about the content, rather than preserving what the author wrote.
Show HN: tool
Show HN: tool (fancy cross-platform XYZ processor)
With that many number of tools being released and advertised I really think that second one is way more informative, while still being verbatim.