mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Forward port libpng16 fixes
Batched fixes from libpng16: PNG_IMAGE_PNG_SIZE_MAX macro fix, contrib/libtests exit(77) change to just do that for configure and changes to pngstest to (by default) make random backgrounds on a per-file, not per-session, basis. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
5
png.h
5
png.h
@@ -3569,8 +3569,9 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
|
||||
#define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\
|
||||
((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\
|
||||
(((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\
|
||||
12U+PNG_IMAGE_COLORMAP_SIZE(image)/*PLTE+tRNS data*/+\
|
||||
(((image).format&PNG_FORMAT_FLAG_ALPHA)?12U/*tRNS*/:0U):0U)+\
|
||||
12U+3U*(image).colormap_entries/*PLTE data*/+\
|
||||
(((image).format&PNG_FORMAT_FLAG_ALPHA)?\
|
||||
12U/*tRNS*/+(image).colormap_entries:0U):0U)+\
|
||||
12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size))
|
||||
/* A helper for the following macro; if your compiler cannot handle the
|
||||
* following macro use this one with the result of
|
||||
|
||||
Reference in New Issue
Block a user