Simplified API: write-to-memory, overflow handling

This implements an API and provides a number of assist macros to allow an
application which uses the simplified API write to bypass stdio and write
directly to memory.

It also includes some warnings (png.h) and some check code to detect *possible*
overflow in the ROW_STRIDE and simplified image SIZE macros.  This disallows
image width/height/format that *might* overflow.  A quiet API change that limits
in-memory image size (uncompressed) to less that 4GByte and image row size
(stride) to less than 2GByte.

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2016-01-18 09:53:38 -08:00
parent 777dbf46dc
commit 175a126a1a
7 changed files with 391 additions and 63 deletions

View File

@@ -249,3 +249,4 @@ EXPORTS
png_set_check_for_invalid_index @242
png_get_palette_max @243
png_set_option @244
png_image_write_to_memory @245