Compare commits
38 Commits
1.6.13-1ma
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f40ced117 | |||
| b0dc0b57e5 | |||
| 2507f41778 | |||
| 966ac5c35e | |||
| 7904ec14a8 | |||
| 5c8504202e | |||
| e757c28270 | |||
| 0b262753c4 | |||
| e838a3d072 | |||
| feaa947e17 | |||
| b82f289b07 | |||
| 4aed3b0680 | |||
| 6bf5e430d2 | |||
| 470d287fde | |||
| d7cd0edd81 | |||
| c3aef97fda | |||
| 8654846ca5 | |||
| efa2bbd188 | |||
| 25d40a79fd | |||
| ad9d495065 | |||
| 64af2aa5f6 | |||
| a2e55792e6 | |||
| b79ea79596 | |||
| 4903f5dd87 | |||
| 4bbbcf6c1a | |||
| 3043fb81f7 | |||
| 94aa4b4017 | |||
| dcfc443627 | |||
| b16374cb0a | |||
| 5a7f01af2b | |||
| c377005467 | |||
| 4a04a762eb | |||
| 223c41faef | |||
| f014ac8983 | |||
| 55063d4a1b | |||
| 9124aef5c6 | |||
| b980e5bc58 | |||
| 0c6b9854e9 |
@@ -1,7 +1,7 @@
|
||||
diff -Naru libpng-1.6.13.org/png.h libpng-1.6.13/png.h
|
||||
--- libpng-1.6.13.org/png.h 2014-08-22 22:59:37.076529918 +0900
|
||||
+++ libpng-1.6.13/png.h 2014-08-22 22:59:37.152532707 +0900
|
||||
@@ -467,6 +467,10 @@
|
||||
diff -Naru libpng-1.6.53.org/png.h libpng-1.6.53/png.h
|
||||
--- libpng-1.6.53.org/png.h 2025-12-06 20:13:38.189758064 +0900
|
||||
+++ libpng-1.6.53/png.h 2025-12-06 20:15:54.193899792 +0900
|
||||
@@ -328,6 +328,10 @@
|
||||
# include "pnglibconf.h"
|
||||
#endif
|
||||
|
||||
@@ -10,38 +10,27 @@ diff -Naru libpng-1.6.13.org/png.h libpng-1.6.13/png.h
|
||||
+#define PNG_WRITE_APNG_SUPPORTED
|
||||
+
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
/* Machine specific configuration. */
|
||||
/* Machine specific configuration. */
|
||||
# include "pngconf.h"
|
||||
@@ -557,6 +561,17 @@
|
||||
@@ -423,6 +427,17 @@
|
||||
* See pngconf.h for base types that vary by machine/system
|
||||
*/
|
||||
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+/* dispose_op flags from inside fcTL */
|
||||
+#define PNG_DISPOSE_OP_NONE 0x00
|
||||
+#define PNG_DISPOSE_OP_BACKGROUND 0x01
|
||||
+#define PNG_DISPOSE_OP_PREVIOUS 0x02
|
||||
+#define PNG_DISPOSE_OP_NONE 0x00U
|
||||
+#define PNG_DISPOSE_OP_BACKGROUND 0x01U
|
||||
+#define PNG_DISPOSE_OP_PREVIOUS 0x02U
|
||||
+
|
||||
+/* blend_op flags from inside fcTL */
|
||||
+#define PNG_BLEND_OP_SOURCE 0x00
|
||||
+#define PNG_BLEND_OP_OVER 0x01
|
||||
+#define PNG_BLEND_OP_SOURCE 0x00U
|
||||
+#define PNG_BLEND_OP_OVER 0x01U
|
||||
+#endif /* PNG_APNG_SUPPORTED */
|
||||
+
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
@@ -877,6 +892,10 @@
|
||||
#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
|
||||
#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
|
||||
#define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+#define PNG_INFO_acTL 0x10000
|
||||
+#define PNG_INFO_fcTL 0x20000
|
||||
+#endif
|
||||
|
||||
/* This is used for the transformation routines, as some of them
|
||||
* change these values for the row. It also should enable using
|
||||
@@ -914,6 +933,10 @@
|
||||
@@ -796,6 +811,10 @@
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
|
||||
typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
|
||||
@@ -52,97 +41,98 @@ diff -Naru libpng-1.6.13.org/png.h libpng-1.6.13/png.h
|
||||
|
||||
/* The following callback receives png_uint_32 row_number, int pass for the
|
||||
* png_bytep data of the row. When transforming an interlaced image the
|
||||
@@ -3249,6 +3272,74 @@
|
||||
/*******************************************************************************
|
||||
@@ -3357,6 +3376,75 @@
|
||||
* END OF HARDWARE AND SOFTWARE OPTIONS
|
||||
******************************************************************************/
|
||||
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+PNG_EXPORT(245, png_uint_32, png_get_acTL, (png_structp png_ptr,
|
||||
+PNG_EXPORT(260, png_uint_32, png_get_acTL, (png_structp png_ptr,
|
||||
+ png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays));
|
||||
+
|
||||
+PNG_EXPORT(246, png_uint_32, png_set_acTL, (png_structp png_ptr,
|
||||
+PNG_EXPORT(261, png_uint_32, png_set_acTL, (png_structp png_ptr,
|
||||
+ png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays));
|
||||
+
|
||||
+PNG_EXPORT(247, png_uint_32, png_get_num_frames, (png_structp png_ptr,
|
||||
+PNG_EXPORT(262, png_uint_32, png_get_num_frames, (png_structp png_ptr,
|
||||
+ png_infop info_ptr));
|
||||
+
|
||||
+PNG_EXPORT(248, png_uint_32, png_get_num_plays, (png_structp png_ptr,
|
||||
+PNG_EXPORT(263, png_uint_32, png_get_num_plays, (png_structp png_ptr,
|
||||
+ png_infop info_ptr));
|
||||
+
|
||||
+PNG_EXPORT(249, png_uint_32, png_get_next_frame_fcTL,
|
||||
+PNG_EXPORT(264, png_uint_32, png_get_next_frame_fcTL,
|
||||
+ (png_structp png_ptr, png_infop info_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_EXPORT(250, png_uint_32, png_set_next_frame_fcTL,
|
||||
+PNG_EXPORT(265, png_uint_32, png_set_next_frame_fcTL,
|
||||
+ (png_structp png_ptr, png_infop info_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_EXPORT(251, png_uint_32, png_get_next_frame_width,
|
||||
+PNG_EXPORT(266, png_uint_32, png_get_next_frame_width,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(252, png_uint_32, png_get_next_frame_height,
|
||||
+PNG_EXPORT(267, png_uint_32, png_get_next_frame_height,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(253, png_uint_32, png_get_next_frame_x_offset,
|
||||
+PNG_EXPORT(268, png_uint_32, png_get_next_frame_x_offset,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(254, png_uint_32, png_get_next_frame_y_offset,
|
||||
+PNG_EXPORT(269, png_uint_32, png_get_next_frame_y_offset,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(255, png_uint_16, png_get_next_frame_delay_num,
|
||||
+PNG_EXPORT(270, png_uint_16, png_get_next_frame_delay_num,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(256, png_uint_16, png_get_next_frame_delay_den,
|
||||
+PNG_EXPORT(271, png_uint_16, png_get_next_frame_delay_den,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(257, png_byte, png_get_next_frame_dispose_op,
|
||||
+PNG_EXPORT(272, png_byte, png_get_next_frame_dispose_op,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(258, png_byte, png_get_next_frame_blend_op,
|
||||
+PNG_EXPORT(273, png_byte, png_get_next_frame_blend_op,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(259, png_byte, png_get_first_frame_is_hidden,
|
||||
+PNG_EXPORT(274, png_byte, png_get_first_frame_is_hidden,
|
||||
+ (png_structp png_ptr, png_infop info_ptr));
|
||||
+PNG_EXPORT(260, png_uint_32, png_set_first_frame_is_hidden,
|
||||
+PNG_EXPORT(275, png_uint_32, png_set_first_frame_is_hidden,
|
||||
+ (png_structp png_ptr, png_infop info_ptr, png_byte is_hidden));
|
||||
+
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
+PNG_EXPORT(261, void, png_read_frame_head, (png_structp png_ptr,
|
||||
+PNG_EXPORT(276, void, png_read_frame_head, (png_structp png_ptr,
|
||||
+ png_infop info_ptr));
|
||||
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
+PNG_EXPORT(262, void, png_set_progressive_frame_fn, (png_structp png_ptr,
|
||||
+PNG_EXPORT(277, void, png_set_progressive_frame_fn, (png_structp png_ptr,
|
||||
+ png_progressive_frame_ptr frame_info_fn,
|
||||
+ png_progressive_frame_ptr frame_end_fn));
|
||||
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
+#endif /* PNG_READ_APNG_SUPPORTED */
|
||||
+
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+PNG_EXPORT(263, void, png_write_frame_head, (png_structp png_ptr,
|
||||
+PNG_EXPORT(278, void, png_write_frame_head, (png_structp png_ptr,
|
||||
+ png_infop info_ptr, png_bytepp row_pointers,
|
||||
+ 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_EXPORT(264, void, png_write_frame_tail, (png_structp png_ptr,
|
||||
+PNG_EXPORT(279, void, png_write_frame_tail, (png_structp png_ptr,
|
||||
+ png_infop info_ptr));
|
||||
+#endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
+#endif /* PNG_APNG_SUPPORTED */
|
||||
|
||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
||||
* defs, scripts/pnglibconf.h, and scripts/pnglibconf.h.prebuilt
|
||||
@@ -3259,7 +3350,11 @@
|
||||
* scripts/symbols.def as well.
|
||||
+
|
||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, in project
|
||||
* defs, and in scripts/symbols.def.
|
||||
*/
|
||||
@@ -3365,7 +3453,11 @@
|
||||
* one to use is one more than this.)
|
||||
*/
|
||||
#ifdef PNG_EXPORT_LAST_ORDINAL
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+ PNG_EXPORT_LAST_ORDINAL(264);
|
||||
+ PNG_EXPORT_LAST_ORDINAL(279);
|
||||
+#else
|
||||
PNG_EXPORT_LAST_ORDINAL(244);
|
||||
PNG_EXPORT_LAST_ORDINAL(259);
|
||||
+#endif /* PNG_APNG_SUPPORTED */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
diff -Naru libpng-1.6.13.org/pngget.c libpng-1.6.13/pngget.c
|
||||
--- libpng-1.6.13.org/pngget.c 2014-08-22 22:59:37.077529955 +0900
|
||||
+++ libpng-1.6.13/pngget.c 2014-08-22 22:59:37.152532707 +0900
|
||||
@@ -1195,4 +1195,166 @@
|
||||
diff -Naru libpng-1.6.53.org/pngget.c libpng-1.6.53/pngget.c
|
||||
--- libpng-1.6.53.org/pngget.c 2025-05-11 18:43:40.120980695 +0900
|
||||
+++ libpng-1.6.53/pngget.c 2025-12-06 20:15:54.193899792 +0900
|
||||
@@ -1367,4 +1367,166 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -308,14 +298,15 @@ diff -Naru libpng-1.6.13.org/pngget.c libpng-1.6.13/pngget.c
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* PNG_APNG_SUPPORTED */
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
diff -Naru libpng-1.6.13.org/pnginfo.h libpng-1.6.13/pnginfo.h
|
||||
--- libpng-1.6.13.org/pnginfo.h 2014-08-22 22:59:37.077529955 +0900
|
||||
+++ libpng-1.6.13/pnginfo.h 2014-08-22 22:59:37.153532744 +0900
|
||||
@@ -256,5 +256,18 @@
|
||||
png_bytepp row_pointers; /* the image bits */
|
||||
#endif /* READ || WRITE */
|
||||
diff -Naru libpng-1.6.53.org/pnginfo.h libpng-1.6.53/pnginfo.h
|
||||
--- libpng-1.6.53.org/pnginfo.h 2025-05-11 18:44:02.085040902 +0900
|
||||
+++ libpng-1.6.53/pnginfo.h 2025-12-06 20:15:54.193899792 +0900
|
||||
@@ -259,5 +259,18 @@
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
int rendering_intent;
|
||||
#endif
|
||||
|
||||
+
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+ png_uint_32 num_frames; /* including default image */
|
||||
+ png_uint_32 num_plays;
|
||||
@@ -328,13 +319,12 @@ diff -Naru libpng-1.6.13.org/pnginfo.h libpng-1.6.13/pnginfo.h
|
||||
+ png_byte next_frame_dispose_op;
|
||||
+ png_byte next_frame_blend_op;
|
||||
+#endif
|
||||
+
|
||||
};
|
||||
#endif /* PNGINFO_H */
|
||||
diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
--- libpng-1.6.13.org/pngpread.c 2014-08-22 22:59:37.077529955 +0900
|
||||
+++ libpng-1.6.13/pngpread.c 2014-08-22 22:59:37.153532744 +0900
|
||||
@@ -217,6 +217,109 @@
|
||||
diff -Naru libpng-1.6.53.org/pngpread.c libpng-1.6.53/pngpread.c
|
||||
--- libpng-1.6.53.org/pngpread.c 2025-07-06 11:06:43.933735454 +0900
|
||||
+++ libpng-1.6.53/pngpread.c 2025-12-06 20:15:54.193899792 +0900
|
||||
@@ -200,6 +200,106 @@
|
||||
|
||||
chunk_name = png_ptr->chunk_name;
|
||||
|
||||
@@ -354,7 +344,6 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ png_push_crc_skip(png_ptr, png_ptr->push_length);
|
||||
+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
||||
+ return;
|
||||
+ }
|
||||
@@ -380,7 +369,6 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ png_push_crc_skip(png_ptr, png_ptr->push_length);
|
||||
+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
||||
+ return;
|
||||
+ }
|
||||
@@ -432,7 +420,6 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
+ }
|
||||
+ png_warning(png_ptr, "Skipped (ignored) a chunk "
|
||||
+ "between APNG chunks");
|
||||
+ png_push_crc_skip(png_ptr, png_ptr->push_length);
|
||||
+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
||||
+ return;
|
||||
+ }
|
||||
@@ -443,8 +430,8 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
+
|
||||
if (chunk_name == png_IDAT)
|
||||
{
|
||||
if (png_ptr->mode & PNG_AFTER_IDAT)
|
||||
@@ -300,6 +403,9 @@
|
||||
if ((png_ptr->mode & PNG_AFTER_IDAT) != 0)
|
||||
@@ -268,6 +368,9 @@
|
||||
|
||||
else if (chunk_name == png_IDAT)
|
||||
{
|
||||
@@ -454,10 +441,10 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
png_ptr->idat_size = png_ptr->push_length;
|
||||
png_ptr->process_mode = PNG_READ_IDAT_MODE;
|
||||
png_push_have_info(png_ptr, info_ptr);
|
||||
@@ -530,6 +636,30 @@
|
||||
png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
@@ -278,6 +381,31 @@
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
+ else if (chunk_name == png_acTL)
|
||||
+ {
|
||||
@@ -482,22 +469,23 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
+ }
|
||||
+
|
||||
+#endif /* PNG_READ_APNG_SUPPORTED */
|
||||
|
||||
+
|
||||
else
|
||||
{
|
||||
@@ -732,7 +862,11 @@
|
||||
PNG_PUSH_SAVE_BUFFER_IF_FULL
|
||||
@@ -409,7 +537,11 @@
|
||||
png_byte chunk_tag[4];
|
||||
|
||||
/* TODO: this code can be commoned up with the same code in push_read */
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
+ if (png_ptr->buffer_size < 12)
|
||||
+ PNG_PUSH_SAVE_BUFFER_IF_LT(12)
|
||||
+#else
|
||||
if (png_ptr->buffer_size < 8)
|
||||
PNG_PUSH_SAVE_BUFFER_IF_LT(8)
|
||||
+#endif
|
||||
{
|
||||
png_push_save_buffer(png_ptr);
|
||||
return;
|
||||
@@ -745,17 +879,64 @@
|
||||
png_push_fill_buffer(png_ptr, chunk_length, 4);
|
||||
png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length);
|
||||
png_reset_crc(png_ptr);
|
||||
@@ -417,17 +549,64 @@
|
||||
png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag);
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
|
||||
|
||||
@@ -538,7 +526,7 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
{
|
||||
png_ptr->process_mode = PNG_READ_CHUNK_MODE;
|
||||
|
||||
if (!(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED))
|
||||
if ((png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) == 0)
|
||||
png_error(png_ptr, "Not enough compressed data");
|
||||
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
@@ -561,8 +549,8 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (png_ptr->idat_size && png_ptr->save_buffer_size)
|
||||
@@ -833,6 +1014,15 @@
|
||||
if (png_ptr->idat_size != 0 && png_ptr->save_buffer_size != 0)
|
||||
@@ -501,6 +680,15 @@
|
||||
if (!(buffer_length > 0) || buffer == NULL)
|
||||
png_error(png_ptr, "No IDAT data (internal error)");
|
||||
|
||||
@@ -578,7 +566,7 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
/* This routine must process all the data it has been given
|
||||
* before returning, calling the row callback as required to
|
||||
* handle the uncompressed results.
|
||||
@@ -1275,6 +1465,18 @@
|
||||
@@ -934,6 +1122,18 @@
|
||||
png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
|
||||
}
|
||||
|
||||
@@ -597,40 +585,37 @@ diff -Naru libpng-1.6.13.org/pngpread.c libpng-1.6.13/pngpread.c
|
||||
png_voidp PNGAPI
|
||||
png_get_progressive_ptr(png_const_structrp png_ptr)
|
||||
{
|
||||
diff -Naru libpng-1.6.13.org/pngpriv.h libpng-1.6.13/pngpriv.h
|
||||
--- libpng-1.6.13.org/pngpriv.h 2014-08-22 22:59:37.078529992 +0900
|
||||
+++ libpng-1.6.13/pngpriv.h 2014-08-22 22:59:37.154532781 +0900
|
||||
@@ -555,6 +555,10 @@
|
||||
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
||||
/* 0x4000 (unused) */
|
||||
#define PNG_IS_READ_STRUCT 0x8000 /* Else is a write struct */
|
||||
diff -Naru libpng-1.6.53.org/pngpriv.h libpng-1.6.53/pngpriv.h
|
||||
--- libpng-1.6.53.org/pngpriv.h 2025-12-06 20:00:54.865030731 +0900
|
||||
+++ libpng-1.6.53/pngpriv.h 2025-12-06 20:15:54.194899793 +0900
|
||||
@@ -653,6 +653,10 @@
|
||||
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U /* Have another chunk after IDAT */
|
||||
#define PNG_WROTE_eXIf 0x4000U
|
||||
#define PNG_IS_READ_STRUCT 0x8000U /* Else is a write struct */
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+#define PNG_HAVE_acTL 0x10000
|
||||
+#define PNG_HAVE_fcTL 0x20000
|
||||
+#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 0x0001
|
||||
@@ -776,6 +780,16 @@
|
||||
#define PNG_BGR 0x0001U
|
||||
@@ -917,6 +921,13 @@
|
||||
#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 0x0001
|
||||
+#define PNG_APNG_APP 0x0002
|
||||
+#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.
|
||||
*/
|
||||
@@ -1476,6 +1490,47 @@
|
||||
*/
|
||||
#endif
|
||||
@@ -1719,6 +1730,47 @@
|
||||
PNG_EMPTY);
|
||||
#endif /* PROGRESSIVE_READ */
|
||||
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+PNG_INTERNAL_FUNCTION(void,png_ensure_fcTL_is_valid,(png_structp png_ptr,
|
||||
@@ -673,13 +658,13 @@ diff -Naru libpng-1.6.13.org/pngpriv.h libpng-1.6.13/pngpriv.h
|
||||
+#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
|
||||
diff -Naru libpng-1.6.13.org/pngread.c libpng-1.6.13/pngread.c
|
||||
--- libpng-1.6.13.org/pngread.c 2014-08-22 22:59:37.079530029 +0900
|
||||
+++ libpng-1.6.13/pngread.c 2014-08-22 22:59:37.154532781 +0900
|
||||
@@ -158,6 +158,9 @@
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
/* Routines for checking parts of an ICC profile. */
|
||||
#ifdef PNG_READ_iCCP_SUPPORTED
|
||||
diff -Naru libpng-1.6.53.org/pngread.c libpng-1.6.53/pngread.c
|
||||
--- libpng-1.6.53.org/pngread.c 2025-12-06 20:13:38.189758064 +0900
|
||||
+++ libpng-1.6.53/pngread.c 2025-12-06 20:15:54.194899793 +0900
|
||||
@@ -155,16 +155,96 @@
|
||||
|
||||
else if (chunk_name == png_IDAT)
|
||||
{
|
||||
@@ -689,9 +674,6 @@ diff -Naru libpng-1.6.13.org/pngread.c libpng-1.6.13/pngread.c
|
||||
png_ptr->idat_size = length;
|
||||
break;
|
||||
}
|
||||
@@ -247,6 +250,17 @@
|
||||
png_handle_iTXt(png_ptr, info_ptr, length);
|
||||
#endif
|
||||
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
+ else if (chunk_name == png_acTL)
|
||||
@@ -705,11 +687,10 @@ diff -Naru libpng-1.6.13.org/pngread.c libpng-1.6.13/pngread.c
|
||||
+#endif
|
||||
+
|
||||
else
|
||||
png_handle_unknown(png_ptr, info_ptr, length,
|
||||
PNG_HANDLE_CHUNK_AS_DEFAULT);
|
||||
@@ -254,6 +268,72 @@
|
||||
png_handle_chunk(png_ptr, info_ptr, length);
|
||||
}
|
||||
}
|
||||
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
|
||||
#endif /* SEQUENTIAL_READ */
|
||||
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
+void PNGAPI
|
||||
@@ -780,10 +761,10 @@ diff -Naru libpng-1.6.13.org/pngread.c libpng-1.6.13/pngread.c
|
||||
/* Optional call to update the users info_ptr structure */
|
||||
void PNGAPI
|
||||
png_read_update_info(png_structrp png_ptr, png_inforp info_ptr)
|
||||
diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
--- libpng-1.6.13.org/pngrutil.c 2014-08-22 22:59:37.081530102 +0900
|
||||
+++ libpng-1.6.13/pngrutil.c 2014-08-22 22:59:37.156532854 +0900
|
||||
@@ -818,6 +818,11 @@
|
||||
diff -Naru libpng-1.6.53.org/pngrutil.c libpng-1.6.53/pngrutil.c
|
||||
--- libpng-1.6.53.org/pngrutil.c 2025-07-06 11:06:43.934735458 +0900
|
||||
+++ libpng-1.6.53/pngrutil.c 2025-12-06 20:15:54.195899794 +0900
|
||||
@@ -922,6 +922,11 @@
|
||||
filter_type = buf[11];
|
||||
interlace_type = buf[12];
|
||||
|
||||
@@ -795,8 +776,8 @@ diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
/* Set internal variables */
|
||||
png_ptr->width = width;
|
||||
png_ptr->height = height;
|
||||
@@ -2698,6 +2703,179 @@
|
||||
}
|
||||
@@ -2718,6 +2723,179 @@
|
||||
# define png_handle_iTXt NULL
|
||||
#endif
|
||||
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
@@ -975,18 +956,18 @@ diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||
/* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */
|
||||
static int
|
||||
@@ -3954,7 +4132,38 @@
|
||||
@@ -4200,7 +4378,38 @@
|
||||
{
|
||||
uInt avail_in;
|
||||
png_bytep buffer;
|
||||
+#ifdef PNG_READ_APNG_SUPPORTED
|
||||
+ png_uint_32 bytes_to_skip = 0;
|
||||
+
|
||||
|
||||
+ while (png_ptr->idat_size == 0 || bytes_to_skip != 0)
|
||||
+ {
|
||||
+ png_crc_finish(png_ptr, bytes_to_skip);
|
||||
+ bytes_to_skip = 0;
|
||||
|
||||
+
|
||||
+ png_ptr->idat_size = png_read_chunk_header(png_ptr);
|
||||
+ if (png_ptr->num_frames_read == 0)
|
||||
+ {
|
||||
@@ -1014,7 +995,7 @@ diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
while (png_ptr->idat_size == 0)
|
||||
{
|
||||
png_crc_finish(png_ptr, 0);
|
||||
@@ -3966,7 +4175,7 @@
|
||||
@@ -4212,7 +4421,7 @@
|
||||
if (png_ptr->chunk_name != png_IDAT)
|
||||
png_error(png_ptr, "Not enough image data");
|
||||
}
|
||||
@@ -1022,8 +1003,8 @@ diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
+#endif /* PNG_READ_APNG_SUPPORTED */
|
||||
avail_in = png_ptr->IDAT_read_size;
|
||||
|
||||
if (avail_in > png_ptr->idat_size)
|
||||
@@ -4029,6 +4238,9 @@
|
||||
if (avail_in > png_chunk_max(png_ptr))
|
||||
@@ -4283,6 +4492,9 @@
|
||||
|
||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
|
||||
@@ -1033,7 +1014,7 @@ diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
|
||||
if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0)
|
||||
png_chunk_benign_error(png_ptr, "Extra compressed data");
|
||||
@@ -4466,4 +4678,80 @@
|
||||
@@ -4692,4 +4904,80 @@
|
||||
|
||||
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
||||
}
|
||||
@@ -1113,11 +1094,11 @@ diff -Naru libpng-1.6.13.org/pngrutil.c libpng-1.6.13/pngrutil.c
|
||||
+}
|
||||
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
+#endif /* PNG_READ_APNG_SUPPORTED */
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
diff -Naru libpng-1.6.13.org/pngset.c libpng-1.6.13/pngset.c
|
||||
--- libpng-1.6.13.org/pngset.c 2014-08-22 22:59:37.082530138 +0900
|
||||
+++ libpng-1.6.13/pngset.c 2014-08-22 22:59:37.157532891 +0900
|
||||
@@ -239,6 +239,11 @@
|
||||
#endif /* READ */
|
||||
diff -Naru libpng-1.6.53.org/pngset.c libpng-1.6.53/pngset.c
|
||||
--- libpng-1.6.53.org/pngset.c 2025-05-11 18:44:02.087040907 +0900
|
||||
+++ libpng-1.6.53/pngset.c 2025-12-06 20:15:54.195899794 +0900
|
||||
@@ -460,6 +460,11 @@
|
||||
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
|
||||
|
||||
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
|
||||
@@ -1129,9 +1110,9 @@ diff -Naru libpng-1.6.13.org/pngset.c libpng-1.6.13/pngset.c
|
||||
}
|
||||
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
@@ -1065,6 +1070,147 @@
|
||||
@@ -1315,6 +1320,147 @@
|
||||
}
|
||||
#endif /* PNG_sPLT_SUPPORTED */
|
||||
#endif /* sPLT */
|
||||
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+png_uint_32 PNGAPI
|
||||
@@ -1228,9 +1209,9 @@ diff -Naru libpng-1.6.13.org/pngset.c libpng-1.6.13/pngset.c
|
||||
+ png_uint_16 delay_num, png_uint_16 delay_den,
|
||||
+ png_byte dispose_op, png_byte blend_op)
|
||||
+{
|
||||
+ if (width > PNG_UINT_31_MAX)
|
||||
+ if (width == 0 || width > PNG_UINT_31_MAX)
|
||||
+ png_error(png_ptr, "invalid width in fcTL (> 2^31-1)");
|
||||
+ if (height > PNG_UINT_31_MAX)
|
||||
+ if (height == 0 || height > PNG_UINT_31_MAX)
|
||||
+ png_error(png_ptr, "invalid height in fcTL (> 2^31-1)");
|
||||
+ if (x_offset > PNG_UINT_31_MAX)
|
||||
+ png_error(png_ptr, "invalid x_offset in fcTL (> 2^31-1)");
|
||||
@@ -1277,10 +1258,10 @@ diff -Naru libpng-1.6.13.org/pngset.c libpng-1.6.13/pngset.c
|
||||
#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
static png_byte
|
||||
check_location(png_const_structrp png_ptr, int location)
|
||||
diff -Naru libpng-1.6.13.org/pngstruct.h libpng-1.6.13/pngstruct.h
|
||||
--- libpng-1.6.13.org/pngstruct.h 2014-08-22 22:59:37.082530138 +0900
|
||||
+++ libpng-1.6.13/pngstruct.h 2014-08-22 22:59:37.157532891 +0900
|
||||
@@ -409,6 +409,27 @@
|
||||
diff -Naru libpng-1.6.53.org/pngstruct.h libpng-1.6.53/pngstruct.h
|
||||
--- libpng-1.6.53.org/pngstruct.h 2025-12-06 20:00:54.866030732 +0900
|
||||
+++ libpng-1.6.53/pngstruct.h 2025-12-06 20:15:54.195899794 +0900
|
||||
@@ -391,6 +391,27 @@
|
||||
png_byte filter_type;
|
||||
#endif
|
||||
|
||||
@@ -1308,13 +1289,13 @@ diff -Naru libpng-1.6.13.org/pngstruct.h libpng-1.6.13/pngstruct.h
|
||||
/* New members added in libpng-1.2.0 */
|
||||
|
||||
/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
|
||||
diff -Naru libpng-1.6.13.org/pngtest.c libpng-1.6.13/pngtest.c
|
||||
--- libpng-1.6.13.org/pngtest.c 2014-08-22 22:59:37.083530175 +0900
|
||||
+++ libpng-1.6.13/pngtest.c 2014-08-22 22:59:37.157532891 +0900
|
||||
@@ -848,6 +848,10 @@
|
||||
png_uint_32 width, height;
|
||||
int num_pass = 1, pass;
|
||||
diff -Naru libpng-1.6.53.org/pngtest.c libpng-1.6.53/pngtest.c
|
||||
--- libpng-1.6.53.org/pngtest.c 2025-12-06 20:13:38.189758064 +0900
|
||||
+++ libpng-1.6.53/pngtest.c 2025-12-06 20:15:54.195899794 +0900
|
||||
@@ -877,6 +877,10 @@
|
||||
int bit_depth, color_type;
|
||||
user_chunk_info my_user_chunk_data;
|
||||
int pass, num_passes;
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+ png_uint_32 num_frames;
|
||||
+ png_uint_32 num_plays;
|
||||
@@ -1322,10 +1303,11 @@ diff -Naru libpng-1.6.13.org/pngtest.c libpng-1.6.13/pngtest.c
|
||||
|
||||
row_buf = NULL;
|
||||
error_parameters.file_name = inname;
|
||||
@@ -1314,6 +1318,20 @@
|
||||
@@ -1437,6 +1441,22 @@
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef PNG_APNG_SUPPORTED
|
||||
+ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL))
|
||||
+ {
|
||||
@@ -1340,10 +1322,11 @@ diff -Naru libpng-1.6.13.org/pngtest.c libpng-1.6.13/pngtest.c
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
{
|
||||
png_unknown_chunkp unknowns;
|
||||
@@ -1375,6 +1393,89 @@
|
||||
@@ -1496,6 +1516,110 @@
|
||||
t_misc += (t_stop - t_start);
|
||||
t_start = t_stop;
|
||||
#endif
|
||||
@@ -1388,17 +1371,38 @@ diff -Naru libpng-1.6.13.org/pngtest.c libpng-1.6.13/pngtest.c
|
||||
+ delay_num, delay_den,
|
||||
+ dispose_op, blend_op);
|
||||
+#endif
|
||||
+ for (pass = 0; pass < num_pass; pass++)
|
||||
+ for (pass = 0; pass < num_passes; pass++)
|
||||
+ {
|
||||
+# ifdef calc_pass_height
|
||||
+ png_uint_32 pass_height;
|
||||
+
|
||||
+ if (num_passes == 7) /* interlaced */
|
||||
+ {
|
||||
+ if (PNG_PASS_COLS(frame_width, pass) > 0)
|
||||
+ pass_height = PNG_PASS_ROWS(frame_height, pass);
|
||||
+
|
||||
+ else
|
||||
+ pass_height = 0;
|
||||
+ }
|
||||
+
|
||||
+ else /* not interlaced */
|
||||
+ pass_height = frame_height;
|
||||
+# else
|
||||
+# define pass_height frame_height
|
||||
+# endif
|
||||
+
|
||||
+ pngtest_debug1("Writing row data for pass %d", pass);
|
||||
+ for (y = 0; y < frame_height; y++)
|
||||
+ for (y = 0; y < pass_height; y++)
|
||||
+ {
|
||||
+#ifndef SINGLE_ROWBUF_ALLOC
|
||||
+ pngtest_debug2("Allocating row buffer (pass %d, y = %ld)...", pass, y);
|
||||
+ pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y);
|
||||
+
|
||||
+ row_buf = (png_bytep)png_malloc(read_ptr,
|
||||
+ png_get_rowbytes(read_ptr, read_info_ptr));
|
||||
+ pngtest_debug2("0x%08lx (%ld bytes)", (unsigned long)row_buf,
|
||||
+ png_get_rowbytes(read_ptr, read_info_ptr));
|
||||
+
|
||||
+ pngtest_debug2("\t0x%08lx (%lu bytes)", (unsigned long)row_buf,
|
||||
+ (unsigned long)png_get_rowbytes(read_ptr, read_info_ptr));
|
||||
+
|
||||
+#endif /* !SINGLE_ROWBUF_ALLOC */
|
||||
+ png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1);
|
||||
+
|
||||
@@ -1417,7 +1421,7 @@ diff -Naru libpng-1.6.13.org/pngtest.c libpng-1.6.13/pngtest.c
|
||||
+#endif /* PNG_WRITE_SUPPORTED */
|
||||
+
|
||||
+#ifndef SINGLE_ROWBUF_ALLOC
|
||||
+ pngtest_debug2("Freeing row buffer (pass %d, y = %ld)", pass, y);
|
||||
+ pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y);
|
||||
+ png_free(read_ptr, row_buf);
|
||||
+ row_buf = NULL;
|
||||
+#endif /* !SINGLE_ROWBUF_ALLOC */
|
||||
@@ -1430,24 +1434,25 @@ diff -Naru libpng-1.6.13.org/pngtest.c libpng-1.6.13/pngtest.c
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
for (pass = 0; pass < num_pass; pass++)
|
||||
for (pass = 0; pass < num_passes; pass++)
|
||||
{
|
||||
pngtest_debug1("Writing row data for pass %d", pass);
|
||||
diff -Naru libpng-1.6.13.org/pngwrite.c libpng-1.6.13/pngwrite.c
|
||||
--- libpng-1.6.13.org/pngwrite.c 2014-08-22 22:59:37.084530212 +0900
|
||||
+++ libpng-1.6.13/pngwrite.c 2014-08-22 22:59:37.158532928 +0900
|
||||
@@ -127,6 +127,10 @@
|
||||
* application continues writing the PNG. So check the 'invalid' flag here
|
||||
* too.
|
||||
*/
|
||||
# ifdef calc_pass_height
|
||||
diff -Naru libpng-1.6.53.org/pngwrite.c libpng-1.6.53/pngwrite.c
|
||||
--- libpng-1.6.53.org/pngwrite.c 2025-12-06 20:00:54.866030732 +0900
|
||||
+++ libpng-1.6.53/pngwrite.c 2025-12-06 20:15:54.196899795 +0900
|
||||
@@ -127,6 +127,11 @@
|
||||
* the application continues writing the PNG. So check the 'invalid'
|
||||
* flag here too.
|
||||
*/
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ if (info_ptr->valid & PNG_INFO_acTL)
|
||||
+ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
|
||||
+ if ((info_ptr->valid & PNG_INFO_acTL) != 0)
|
||||
+ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
|
||||
+#endif
|
||||
#ifdef PNG_GAMMA_SUPPORTED
|
||||
# ifdef PNG_WRITE_gAMA_SUPPORTED
|
||||
if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) &&
|
||||
@@ -357,6 +361,11 @@
|
||||
+
|
||||
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
/* Write unknown chunks first; PNG v3 establishes a precedence order
|
||||
* for colourspace chunks. It is certain therefore that new
|
||||
@@ -405,6 +410,11 @@
|
||||
png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
|
||||
#endif
|
||||
|
||||
@@ -1459,7 +1464,7 @@ diff -Naru libpng-1.6.13.org/pngwrite.c libpng-1.6.13/pngwrite.c
|
||||
/* See if user wants us to write information chunks */
|
||||
if (info_ptr != NULL)
|
||||
{
|
||||
@@ -1662,6 +1671,43 @@
|
||||
@@ -1515,6 +1525,43 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1502,13 +1507,13 @@ diff -Naru libpng-1.6.13.org/pngwrite.c libpng-1.6.13/pngwrite.c
|
||||
+#endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
|
||||
#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
#ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */
|
||||
diff -Naru libpng-1.6.13.org/pngwutil.c libpng-1.6.13/pngwutil.c
|
||||
--- libpng-1.6.13.org/pngwutil.c 2014-08-22 22:59:37.084530212 +0900
|
||||
+++ libpng-1.6.13/pngwutil.c 2014-08-22 22:59:37.159532965 +0900
|
||||
@@ -898,6 +898,11 @@
|
||||
/* Initialize the write structure - general purpose utility. */
|
||||
diff -Naru libpng-1.6.53.org/pngwutil.c libpng-1.6.53/pngwutil.c
|
||||
--- libpng-1.6.53.org/pngwutil.c 2025-05-11 18:43:40.128980717 +0900
|
||||
+++ libpng-1.6.53/pngwutil.c 2025-12-06 20:15:54.196899795 +0900
|
||||
@@ -838,6 +838,11 @@
|
||||
/* Write the chunk */
|
||||
png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);
|
||||
png_write_complete_chunk(png_ptr, png_IHDR, buf, 13);
|
||||
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ png_ptr->first_frame_width = width;
|
||||
@@ -1518,38 +1523,45 @@ diff -Naru libpng-1.6.13.org/pngwutil.c libpng-1.6.13/pngwutil.c
|
||||
if ((png_ptr->do_filter) == PNG_NO_FILTERS)
|
||||
{
|
||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
|
||||
@@ -1076,7 +1081,14 @@
|
||||
@@ -1019,8 +1024,17 @@
|
||||
optimize_cmf(data, png_image_size(png_ptr));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+# ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ if (png_ptr->num_frames_written == 0)
|
||||
+# endif
|
||||
png_write_complete_chunk(png_ptr, png_IDAT, data, size);
|
||||
+# ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ else
|
||||
+ png_write_fdAT(png_ptr, data, size);
|
||||
+# endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
- if (size > 0)
|
||||
- png_write_complete_chunk(png_ptr, png_IDAT, data, size);
|
||||
+ if (size > 0)
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ {
|
||||
+ if (png_ptr->num_frames_written == 0)
|
||||
+#endif
|
||||
+ png_write_complete_chunk(png_ptr, png_IDAT, data, size);
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ else
|
||||
+ png_write_fdAT(png_ptr, data, size);
|
||||
+ }
|
||||
+#endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
png_ptr->mode |= PNG_HAVE_IDAT;
|
||||
|
||||
png_ptr->zstream.next_out = data;
|
||||
@@ -1122,7 +1134,15 @@
|
||||
optimize_cmf(data, png_image_size(png_ptr));
|
||||
# endif
|
||||
@@ -1067,7 +1081,17 @@
|
||||
#endif
|
||||
|
||||
+# ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
if (size > 0)
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ {
|
||||
+ if (png_ptr->num_frames_written == 0)
|
||||
+# endif
|
||||
png_write_complete_chunk(png_ptr, png_IDAT, data, size);
|
||||
+# ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+#endif
|
||||
png_write_complete_chunk(png_ptr, png_IDAT, data, size);
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
+ else
|
||||
+ png_write_fdAT(png_ptr, data, size);
|
||||
+# endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
+ }
|
||||
+#endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
+
|
||||
png_ptr->zstream.avail_out = 0;
|
||||
png_ptr->zstream.next_out = NULL;
|
||||
png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT;
|
||||
@@ -1936,6 +1956,82 @@
|
||||
@@ -1969,6 +1993,82 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1632,9 +1644,9 @@ diff -Naru libpng-1.6.13.org/pngwutil.c libpng-1.6.13/pngwutil.c
|
||||
/* Initializes the row writing capability of libpng */
|
||||
void /* PRIVATE */
|
||||
png_write_start_row(png_structrp png_ptr)
|
||||
@@ -3023,4 +3119,39 @@
|
||||
@@ -2822,4 +2922,39 @@
|
||||
}
|
||||
#endif
|
||||
#endif /* WRITE_FLUSH */
|
||||
}
|
||||
+
|
||||
+#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
@@ -1671,31 +1683,31 @@ diff -Naru libpng-1.6.13.org/pngwutil.c libpng-1.6.13/pngwutil.c
|
||||
+ png_ptr->usr_width = png_ptr->width;
|
||||
+}
|
||||
+#endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
#endif /* PNG_WRITE_SUPPORTED */
|
||||
diff -Naru libpng-1.6.13.org/scripts/symbols.def libpng-1.6.13/scripts/symbols.def
|
||||
--- libpng-1.6.13.org/scripts/symbols.def 2014-08-22 22:59:37.091530469 +0900
|
||||
+++ libpng-1.6.13/scripts/symbols.def 2014-08-22 22:59:37.163533111 +0900
|
||||
@@ -249,3 +249,23 @@
|
||||
png_set_check_for_invalid_index @242
|
||||
png_get_palette_max @243
|
||||
png_set_option @244
|
||||
+ png_get_acTL @245
|
||||
+ png_set_acTL @246
|
||||
+ png_get_num_frames @247
|
||||
+ png_get_num_plays @248
|
||||
+ png_get_next_frame_fcTL @249
|
||||
+ png_set_next_frame_fcTL @250
|
||||
+ png_get_next_frame_width @251
|
||||
+ png_get_next_frame_height @252
|
||||
+ png_get_next_frame_x_offset @253
|
||||
+ png_get_next_frame_y_offset @254
|
||||
+ png_get_next_frame_delay_num @255
|
||||
+ png_get_next_frame_delay_den @256
|
||||
+ png_get_next_frame_dispose_op @257
|
||||
+ png_get_next_frame_blend_op @258
|
||||
+ png_get_first_frame_is_hidden @259
|
||||
+ png_set_first_frame_is_hidden @260
|
||||
+ png_read_frame_head @261
|
||||
+ png_set_progressive_frame_fn @262
|
||||
+ png_write_frame_head @263
|
||||
+ png_write_frame_tail @264
|
||||
#endif /* WRITE */
|
||||
diff -Naru libpng-1.6.53.org/scripts/symbols.def libpng-1.6.53/scripts/symbols.def
|
||||
--- libpng-1.6.53.org/scripts/symbols.def 2025-01-26 08:07:01.594606745 +0900
|
||||
+++ libpng-1.6.53/scripts/symbols.def 2025-12-06 20:15:54.196899795 +0900
|
||||
@@ -263,3 +263,23 @@
|
||||
png_get_mDCV_fixed @257
|
||||
png_set_mDCV @258
|
||||
png_set_mDCV_fixed @259
|
||||
+ png_get_acTL @260
|
||||
+ png_set_acTL @261
|
||||
+ png_get_num_frames @262
|
||||
+ png_get_num_plays @263
|
||||
+ png_get_next_frame_fcTL @264
|
||||
+ png_set_next_frame_fcTL @265
|
||||
+ png_get_next_frame_width @266
|
||||
+ png_get_next_frame_height @267
|
||||
+ png_get_next_frame_x_offset @268
|
||||
+ png_get_next_frame_y_offset @269
|
||||
+ png_get_next_frame_delay_num @270
|
||||
+ png_get_next_frame_delay_den @271
|
||||
+ png_get_next_frame_dispose_op @272
|
||||
+ png_get_next_frame_blend_op @273
|
||||
+ png_get_first_frame_is_hidden @274
|
||||
+ png_set_first_frame_is_hidden @275
|
||||
+ png_read_frame_head @276
|
||||
+ png_set_progressive_frame_fn @277
|
||||
+ png_write_frame_head @278
|
||||
+ png_write_frame_tail @279
|
||||
165
libpng.spec
165
libpng.spec
@@ -1,6 +1,7 @@
|
||||
%define apiver %(echo %version | cut -d. -f1-2 | tr -d .)
|
||||
%define apngver %{version}
|
||||
Name: libpng
|
||||
Version: 1.6.13
|
||||
Version: 1.6.53
|
||||
Release: 1mamba
|
||||
Summary: A library of functions for manipulating PNG image format files
|
||||
Group: System/Libraries
|
||||
@@ -9,7 +10,7 @@ Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://www.libpng.org/pub/png/libpng.html
|
||||
Source: http://downloads.sourceforge.net/sourceforge/libpng/libpng-%{version}.tar.xz
|
||||
Source1: http://downloads.sourceforge.net/project/libpng-apng/libpng%{apiver}/%{version}/libpng-%{version}-apng.patch.gz
|
||||
Source1: http://downloads.sourceforge.net/project/libpng-apng/libpng%{apiver}/%{apngver}/libpng-%{apngver}-apng.patch.gz
|
||||
Patch1: %{name}-1.2.8-link_to_proper_libs.patch
|
||||
Patch2: libpng-1.6.5-arm-buildfix.patch
|
||||
License: OSI Approved
|
||||
@@ -17,9 +18,9 @@ License: OSI Approved
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libz-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%debug_package
|
||||
%ifarch x86_64
|
||||
Obsoletes: lib32-libpng < 1.6.38
|
||||
%endif
|
||||
|
||||
%description
|
||||
This package contains the library needed to run programs dynamically linked with libpng.
|
||||
@@ -31,29 +32,13 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The libpng-devel package contains the header files and libraries necessary for developing programs using the PNG (Portable Network Graphics) library.
|
||||
|
||||
If you want to develop programs which will manipulate PNG image format files, you should install libpng-devel.
|
||||
You'll also need to install the libpng package.
|
||||
|
||||
%package -n lib32-%{name}
|
||||
Summary: A library of functions for manipulating PNG image format files (32 bit)
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n lib32-%{name}
|
||||
This package contains the library needed to run programs dynamically linked with libpng.
|
||||
|
||||
%package -n lib32-%{name}-devel
|
||||
Summary: Header files and static library for development with FreeType2 (32 bit)
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib32-%{name}-devel
|
||||
This package is only needed if you intend to develop or compile applications which rely on the FreeType2 library. If you simply want to run existing applications, you won't need this package.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
gunzip -c %{SOURCE1} | patch -p1
|
||||
#%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-shared --enable-static
|
||||
@@ -63,29 +48,15 @@ gunzip -c %{SOURCE1} | patch -p1
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
|
||||
%ifarch x86_64
|
||||
make clean
|
||||
%configure \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--libdir=%{_prefix}/lib \
|
||||
CFLAGS="%{optflags} -m32"
|
||||
%make
|
||||
install -d -m0755 %{buildroot}%{_prefix}/lib
|
||||
cp -a .libs/libpng*.so* %{buildroot}%{_prefix}/lib/
|
||||
ln -s libpng%{apiver}.so %{buildroot}%{_prefix}/lib/libpng.so
|
||||
%endif
|
||||
rm -f %{buildroot}%{_libdir}/libpng.la
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
#%{_libdir}/libpng.so.*
|
||||
%{_libdir}/libpng16.so.*
|
||||
%{_libdir}/libpng%{apiver}.so.*
|
||||
%doc LICENSE
|
||||
|
||||
%files devel
|
||||
@@ -100,10 +71,8 @@ ln -s libpng%{apiver}.so %{buildroot}%{_prefix}/lib/libpng.so
|
||||
%dir %{_includedir}/libpng%{apiver}/
|
||||
%{_includedir}/libpng%{apiver}/*
|
||||
%{_libdir}/libpng.a
|
||||
%{_libdir}/libpng.la
|
||||
%{_libdir}/libpng.so
|
||||
%{_libdir}/libpng%{apiver}.a
|
||||
%{_libdir}/libpng%{apiver}.la
|
||||
%{_libdir}/libpng%{apiver}.so
|
||||
%{_libdir}/pkgconfig/libpng.pc
|
||||
%{_libdir}/pkgconfig/libpng%{apiver}.pc
|
||||
@@ -113,7 +82,7 @@ ln -s libpng%{apiver}.so %{buildroot}%{_prefix}/lib/libpng.so
|
||||
%doc ANNOUNCE CHANGES README TODO
|
||||
%doc pngbar.jpg pngbar.png pngnow.png
|
||||
|
||||
%ifarch x86_64
|
||||
%ifarch x86_64_disabled
|
||||
%files -n lib32-%{name}
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/lib/libpng%{apiver}.so.*
|
||||
@@ -125,6 +94,120 @@ ln -s libpng%{apiver}.so %{buildroot}%{_prefix}/lib/libpng.so
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Dec 06 2025 Automatic Build System <autodist@openmamba.org> 1.6.53-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Nov 24 2025 Automatic Build System <autodist@openmamba.org> 1.6.51-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Jul 06 2025 Automatic Build System <autodist@openmamba.org> 1.6.50-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Jun 15 2025 Automatic Build System <autodist@openmamba.org> 1.6.49-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon May 12 2025 Automatic Build System <autodist@openmamba.org> 1.6.48-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Mar 09 2025 Automatic Build System <autodist@openmamba.org> 1.6.47-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Jan 26 2025 Automatic Build System <autodist@openmamba.org> 1.6.46-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Fri Jan 10 2025 Automatic Build System <autodist@openmamba.org> 1.6.45-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Sep 14 2024 Automatic Build System <autodist@openmamba.org> 1.6.44-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Feb 25 2024 Automatic Build System <autodist@openmamba.org> 1.6.43-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Feb 12 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.42-1mamba
|
||||
- update to 1.6.42
|
||||
|
||||
* Sun Sep 10 2023 Automatic Build System <autodist@mambasoft.it> 1.6.40-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Nov 24 2022 Automatic Build System <autodist@mambasoft.it> 1.6.39-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Sep 17 2022 Automatic Build System <autodist@mambasoft.it> 1.6.38-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Jan 16 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.37-2mamba
|
||||
- x86_64: obsolete lib32-libpng
|
||||
|
||||
* Fri Apr 19 2019 Automatic Build System <autodist@mambasoft.it> 1.6.37-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Dec 25 2018 Automatic Build System <autodist@mambasoft.it> 1.6.36-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Sep 15 2018 Automatic Build System <autodist@mambasoft.it> 1.6.35-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Oct 03 2017 Automatic Build System <autodist@mambasoft.it> 1.6.34-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Aug 31 2017 Automatic Build System <autodist@mambasoft.it> 1.6.32-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Aug 07 2017 Automatic Build System <autodist@mambasoft.it> 1.6.31-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Fri Aug 04 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.29-2mamba
|
||||
- relink with /lib64/libpthread.so.0 for IFUNC symbol longjmp
|
||||
|
||||
* Thu Mar 30 2017 Automatic Build System <autodist@mambasoft.it> 1.6.29-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Jan 08 2017 Automatic Build System <autodist@mambasoft.it> 1.6.28-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Jan 05 2017 Automatic Build System <autodist@mambasoft.it> 1.6.27-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Oct 22 2016 Automatic Build System <autodist@mambasoft.it> 1.6.26-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Oct 04 2016 Automatic Build System <autodist@mambasoft.it> 1.6.25-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Aug 20 2016 Automatic Build System <autodist@mambasoft.it> 1.6.24-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Wed Jun 15 2016 Automatic Build System <autodist@mambasoft.it> 1.6.23-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue May 31 2016 Automatic Build System <autodist@mambasoft.it> 1.6.22-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Jan 25 2016 Automatic Build System <autodist@mambasoft.it> 1.6.21-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Dec 27 2015 Automatic Build System <autodist@mambasoft.it> 1.6.20-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Nov 17 2015 Automatic Build System <autodist@mambasoft.it> 1.6.19-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Aug 06 2015 Automatic Build System <autodist@mambasoft.it> 1.6.18-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Wed Apr 15 2015 Automatic Build System <autodist@mambasoft.it> 1.6.17-1mamba
|
||||
- automatic update by autodist
|
||||
|
||||
* Wed Dec 24 2014 Automatic Build System <autodist@mambasoft.it> 1.6.16-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Nov 25 2014 Automatic Build System <autodist@mambasoft.it> 1.6.15-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Nov 11 2014 Automatic Build System <autodist@mambasoft.it> 1.6.14-1mamba
|
||||
- automatic update by autodist
|
||||
|
||||
* Wed Sep 10 2014 Automatic Build System <autodist@mambasoft.it> 1.6.13-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
@@ -262,7 +345,7 @@ ln -s libpng%{apiver}.so %{buildroot}%{_prefix}/lib/libpng.so
|
||||
* Fri Nov 05 2004 Davide Madrisan <davide.madrisan@qilinux.it> 1.2.5-6qilnx
|
||||
- security fix QSA-2004-051 (CAN-2004-0768)
|
||||
|
||||
* Thu Jul 05 2004 Davide Madrisan <davide.madrisan@qilinux.it> 1.2.5-5qilnx
|
||||
* Mon Jul 05 2004 Davide Madrisan <davide.madrisan@qilinux.it> 1.2.5-5qilnx
|
||||
- security fix for CAN-2004-0597, CAN-2004-0598, CAN-2004-0599
|
||||
|
||||
* Mon May 03 2004 Davide Madrisan <davide.madrisan@qilinux.it> 1.2.5-4qilnx
|
||||
|
||||
Reference in New Issue
Block a user