X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=pngpriv.h;h=0757ecc476e95ae27b0adccc01e0b0d3bbfcf6b1;hb=refs%2Fheads%2Faccepted%2Ftizen_unified_riscv;hp=b8a73b685df4c62cd01f842007d25c6b38b44219;hpb=f125affdc66153880ba8dc33d8369e5a0dc9a6a7;p=platform%2Fupstream%2Flibpng.git diff --git a/pngpriv.h b/pngpriv.h index b8a73b6..0757ecc 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -1,7 +1,7 @@ /* pngpriv.h - private declarations for use inside libpng * - * Copyright (c) 2018-2022 Cosmin Truta + * Copyright (c) 2018-2023 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson * Copyright (c) 1996-1997 Andreas Dilger * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. @@ -626,8 +626,12 @@ #define PNG_BACKGROUND_IS_GRAY 0x800U #define PNG_HAVE_PNG_SIGNATURE 0x1000U #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U /* Have another chunk after IDAT */ - /* 0x4000U (unused) */ +#define PNG_WROTE_eXIf 0x4000U #define PNG_IS_READ_STRUCT 0x8000U /* Else is a write struct */ +#ifdef PNG_APNG_SUPPORTED +#define PNG_HAVE_acTL 0x10000U +#define PNG_HAVE_fcTL 0x20000U +#endif /* Flags for the transformations the PNG library does on the image data */ #define PNG_BGR 0x0001U @@ -864,6 +868,16 @@ #define png_tRNS PNG_U32(116, 82, 78, 83) #define png_zTXt PNG_U32(122, 84, 88, 116) +#ifdef PNG_APNG_SUPPORTED +#define png_acTL PNG_U32( 97, 99, 84, 76) +#define png_fcTL PNG_U32(102, 99, 84, 76) +#define png_fdAT PNG_U32(102, 100, 65, 84) + +/* For png_struct.apng_flags: */ +#define PNG_FIRST_FRAME_HIDDEN 0x0001U +#define PNG_APNG_APP 0x0002U +#endif + /* The following will work on (signed char*) strings, whereas the get_uint_32 * macro will fail on top-bit-set values because of the sign extension. */ @@ -1635,6 +1649,47 @@ PNG_INTERNAL_FUNCTION(void,png_colorspace_sync,(png_const_structrp png_ptr, */ #endif +#ifdef PNG_APNG_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_ensure_fcTL_is_valid,(png_structp png_ptr, + png_uint_32 width, png_uint_32 height, + png_uint_32 x_offset, png_uint_32 y_offset, + png_uint_16 delay_num, png_uint_16 delay_den, + png_byte dispose_op, png_byte blend_op), PNG_EMPTY); + +#ifdef PNG_READ_APNG_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_acTL,(png_structp png_ptr, png_infop info_ptr, + png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_handle_fcTL,(png_structp png_ptr, png_infop info_ptr, + png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_handle_fdAT,(png_structp png_ptr, png_infop info_ptr, + png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_have_info,(png_structp png_ptr, png_infop info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_ensure_sequence_number,(png_structp png_ptr, + png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_reset,(png_structp png_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_reinit,(png_structp png_ptr, + png_infop info_ptr),PNG_EMPTY); +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_progressive_read_reset,(png_structp png_ptr),PNG_EMPTY); +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ +#endif /* PNG_READ_APNG_SUPPORTED */ + +#ifdef PNG_WRITE_APNG_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_acTL,(png_structp png_ptr, + png_uint_32 num_frames, png_uint_32 num_plays),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_write_fcTL,(png_structp png_ptr, + png_uint_32 width, png_uint_32 height, + png_uint_32 x_offset, png_uint_32 y_offset, + png_uint_16 delay_num, png_uint_16 delay_den, + png_byte dispose_op, png_byte blend_op),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_write_fdAT,(png_structp png_ptr, + png_const_bytep data, png_size_t length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_write_reset,(png_structp png_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_write_reinit,(png_structp png_ptr, + png_infop info_ptr, png_uint_32 width, png_uint_32 height),PNG_EMPTY); +#endif /* PNG_WRITE_APNG_SUPPORTED */ +#endif /* PNG_APNG_SUPPORTED */ + /* Added at libpng version 1.4.0 */ #ifdef PNG_COLORSPACE_SUPPORTED /* These internal functions are for maintaining the colorspace structure within @@ -1910,7 +1965,7 @@ PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr, */ #define PNG_FP_INVALID 512 /* Available for callers as a distinct value */ -/* Result codes for the parser (boolean - true meants ok, false means +/* Result codes for the parser (boolean - true means ok, false means * not ok yet.) */ #define PNG_FP_MAYBE 0 /* The number may be valid in the future */