mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
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:
@@ -873,9 +873,12 @@ option SIMPLIFIED_READ_BGR enables FORMAT_BGR,
|
||||
|
||||
# Write:
|
||||
option SIMPLIFIED_WRITE,
|
||||
requires WRITE STDIO, SETJMP, WRITE_SWAP, WRITE_PACK,
|
||||
requires WRITE, SETJMP, WRITE_SWAP, WRITE_PACK,
|
||||
WRITE_tRNS, WRITE_gAMA, WRITE_sRGB, WRITE_cHRM
|
||||
|
||||
# 1.6.22: allow simplified write without stdio support:
|
||||
option SIMPLIFIED_WRITE_STDIO requires SIMPLIFIED_WRITE STDIO
|
||||
|
||||
option SIMPLIFIED_WRITE_AFIRST enables FORMAT_AFIRST,
|
||||
requires SIMPLIFIED_WRITE WRITE_SWAP_ALPHA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user