cairo 1.14.6-x64-mingw32 → 1.15.2-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +6 -6
  3. data/ext/cairo/rb_cairo.h +2 -2
  4. data/ext/cairo/rb_cairo_font_options.c +1 -5
  5. data/lib/2.2/cairo.so +0 -0
  6. data/lib/2.3/cairo.so +0 -0
  7. data/test/test_font_options.rb +2 -47
  8. data/vendor/local/bin/fc-cache.exe +0 -0
  9. data/vendor/local/bin/fc-list.exe +0 -0
  10. data/vendor/local/bin/fc-match.exe +0 -0
  11. data/vendor/local/bin/fc-pattern.exe +0 -0
  12. data/vendor/local/bin/fc-scan.exe +0 -0
  13. data/vendor/local/bin/fc-validate.exe +0 -0
  14. data/vendor/local/bin/libcairo-2.dll +0 -0
  15. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  16. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  17. data/vendor/local/bin/libfreetype-6.dll +0 -0
  18. data/vendor/local/bin/libpng-config +1 -1
  19. data/vendor/local/bin/libpng16-16.dll +0 -0
  20. data/vendor/local/bin/libpng16-config +1 -1
  21. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  22. data/vendor/local/bin/pngfix.exe +0 -0
  23. data/vendor/local/bin/xmllint.exe +0 -0
  24. data/vendor/local/include/cairo/cairo-version.h +2 -2
  25. data/vendor/local/include/cairo/cairo-win32.h +4 -0
  26. data/vendor/local/include/libpng16/png.h +61 -188
  27. data/vendor/local/include/libpng16/pngconf.h +1 -1
  28. data/vendor/local/include/libpng16/pnglibconf.h +1 -2
  29. data/vendor/local/include/png.h +61 -188
  30. data/vendor/local/include/pngconf.h +1 -1
  31. data/vendor/local/include/pnglibconf.h +1 -2
  32. data/vendor/local/lib/libcairo-gobject.a +0 -0
  33. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  34. data/vendor/local/lib/libcairo-gobject.la +3 -3
  35. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  36. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  37. data/vendor/local/lib/libcairo-script-interpreter.la +3 -3
  38. data/vendor/local/lib/libcairo.a +0 -0
  39. data/vendor/local/lib/libcairo.dll.a +0 -0
  40. data/vendor/local/lib/libcairo.la +3 -3
  41. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  42. data/vendor/local/lib/libfreetype.a +0 -0
  43. data/vendor/local/lib/libfreetype.dll.a +0 -0
  44. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  45. data/vendor/local/lib/libpng.a +0 -0
  46. data/vendor/local/lib/libpng.dll.a +0 -0
  47. data/vendor/local/lib/libpng.la +2 -2
  48. data/vendor/local/lib/libpng16.a +0 -0
  49. data/vendor/local/lib/libpng16.dll.a +0 -0
  50. data/vendor/local/lib/libpng16.la +2 -2
  51. data/vendor/local/lib/libxml2.dll.a +0 -0
  52. data/vendor/local/lib/libz.dll.a +0 -0
  53. data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
  54. data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
  55. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
  56. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
  57. data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
  58. data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
  59. data/vendor/local/lib/pkgconfig/cairo-script.pc +1 -1
  60. data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
  61. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
  62. data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
  63. data/vendor/local/lib/pkgconfig/cairo.pc +1 -1
  64. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  65. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  66. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +2 -1
  67. data/vendor/local/share/gtk-doc/html/cairo/index.html +1 -1
  68. data/vendor/local/share/license/libpng/README +1 -1
  69. data/vendor/local/share/man/man3/libpng.3 +21 -66
  70. data/vendor/local/share/man/man3/libpngpf.3 +2 -2
  71. data/vendor/local/share/man/man5/png.5 +2 -2
  72. metadata +2 -2
@@ -1,7 +1,7 @@
1
1
 
2
2
  /* pngconf.h - machine configurable file for libpng
3
3
  *
4
- * libpng version 1.6.23, June 9, 2016
4
+ * libpng version 1.6.21, January 15, 2016
5
5
  *
6
6
  * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson
7
7
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1,6 +1,6 @@
1
1
  /* pnglibconf.h - library build configuration */
2
2
 
3
- /* libpng version 1.6.23, June 9, 2016 */
3
+ /* libpng version 1.6.21, January 15, 2016 */
4
4
 
5
5
  /* Copyright (c) 1998-2016 Glenn Randers-Pehrson */
6
6
 
@@ -107,7 +107,6 @@
107
107
  #define PNG_SIMPLIFIED_READ_SUPPORTED
108
108
  #define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
109
109
  #define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
110
- #define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
111
110
  #define PNG_SIMPLIFIED_WRITE_SUPPORTED
112
111
  #define PNG_STDIO_SUPPORTED
113
112
  #define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /* png.h - header file for PNG reference library
3
3
  *
4
- * libpng version 1.6.23, June 9, 2016
4
+ * libpng version 1.6.21, January 15, 2016
5
5
  *
6
6
  * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
7
7
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
12
12
  * Authors and maintainers:
13
13
  * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
14
14
  * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
15
- * libpng versions 0.97, January 1998, through 1.6.23, June 9, 2016:
15
+ * libpng versions 0.97, January 1998, through 1.6.21, January 15, 2016:
16
16
  * Glenn Randers-Pehrson.
17
17
  * See also "Contributing Authors", below.
18
18
  */
@@ -25,11 +25,7 @@
25
25
  *
26
26
  * This code is released under the libpng license.
27
27
  *
28
- * Some files in the "contrib" directory and some configure-generated
29
- * files that are distributed with libpng have other copyright owners and
30
- * are released under other open source licenses.
31
- *
32
- * libpng versions 1.0.7, July 1, 2000 through 1.6.23, June 9, 2016 are
28
+ * libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are
33
29
  * Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
34
30
  * derived from libpng-1.0.6, and are distributed according to the same
35
31
  * disclaimer and license as libpng-1.0.6 with the following individuals
@@ -51,10 +47,6 @@
51
47
  * risk of satisfactory quality, performance, accuracy, and effort is with
52
48
  * the user.
53
49
  *
54
- * Some files in the "contrib" directory have other copyright owners and
55
- * are released under other open source licenses.
56
- *
57
- *
58
50
  * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
59
51
  * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
60
52
  * libpng-0.96, and are distributed according to the same disclaimer and
@@ -65,9 +57,6 @@
65
57
  * Glenn Randers-Pehrson
66
58
  * Willem van Schaik
67
59
  *
68
- * Some files in the "scripts" directory have different copyright owners
69
- * but are also released under this license.
70
- *
71
60
  * libpng versions 0.89, June 1996, through 0.96, May 1997, are
72
61
  * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
73
62
  * and are distributed according to the same disclaimer and license as
@@ -81,9 +70,6 @@
81
70
  * Greg Roelofs
82
71
  * Tom Tanner
83
72
  *
84
- * Some files in the "scripts" directory have other copyright owners
85
- * but are released under this license.
86
- *
87
73
  * libpng versions 0.5, May 1995, through 0.88, January 1996, are
88
74
  * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
89
75
  *
@@ -123,29 +109,6 @@
123
109
  * appreciated.
124
110
  *
125
111
  * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
126
- *
127
- * TRADEMARK:
128
- *
129
- * The name "libpng" has not been registered by the Copyright owner
130
- * as a trademark in any jurisdiction. However, because libpng has
131
- * been distributed and maintained world-wide, continually since 1995,
132
- * the Copyright owner claims "common-law trademark protection" in any
133
- * jurisdiction where common-law trademark is recognized.
134
- *
135
- * OSI CERTIFICATION:
136
- *
137
- * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
138
- * a certification mark of the Open Source Initiative. OSI has not addressed
139
- * the additional disclaimers inserted at version 1.0.7.
140
- *
141
- * EXPORT CONTROL:
142
- *
143
- * The Copyright owner believes that the Export Control Classification
144
- * Number (ECCN) for libpng is EAR99, which means not subject to export
145
- * controls or International Traffic in Arms Regulations (ITAR) because
146
- * it is open source, publicly available software, that does not contain
147
- * any encryption software. See the EAR, paragraphs 734.3(b)(3) and
148
- * 734.7(b).
149
112
  */
150
113
 
151
114
  /*
@@ -158,6 +121,12 @@
158
121
  * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
159
122
  */
160
123
 
124
+ /*
125
+ * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
126
+ * a certification mark of the Open Source Initiative. OSI has not addressed
127
+ * the additional disclaimers inserted at version 1.0.7.
128
+ */
129
+
161
130
  /*
162
131
  * The contributing authors would like to thank all those who helped
163
132
  * with testing, bug fixes, and patience. This wouldn't have been
@@ -213,11 +182,11 @@
213
182
  * ...
214
183
  * 1.0.19 10 10019 10.so.0.19[.0]
215
184
  * ...
216
- * 1.2.56 13 10256 12.so.0.56[.0]
185
+ * 1.2.53 13 10253 12.so.0.53[.0]
217
186
  * ...
218
- * 1.5.27 15 10527 15.so.15.27[.0]
187
+ * 1.5.23 15 10523 15.so.15.23[.0]
219
188
  * ...
220
- * 1.6.23 16 10623 16.so.16.23[.0]
189
+ * 1.6.21 16 10621 16.so.16.21[.0]
221
190
  *
222
191
  * Henceforth the source version will match the shared-library major
223
192
  * and minor numbers; the shared-library major version number will be
@@ -245,13 +214,13 @@
245
214
  * Y2K compliance in libpng:
246
215
  * =========================
247
216
  *
248
- * June 9, 2016
217
+ * January 15, 2016
249
218
  *
250
219
  * Since the PNG Development group is an ad-hoc body, we can't make
251
220
  * an official declaration.
252
221
  *
253
222
  * This is your unofficial assurance that libpng from version 0.71 and
254
- * upward through 1.6.23 are Y2K compliant. It is my belief that
223
+ * upward through 1.6.21 are Y2K compliant. It is my belief that
255
224
  * earlier versions were also Y2K compliant.
256
225
  *
257
226
  * Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -313,9 +282,9 @@
313
282
  */
314
283
 
315
284
  /* Version information for png.h - this should match the version in png.c */
316
- #define PNG_LIBPNG_VER_STRING "1.6.23"
285
+ #define PNG_LIBPNG_VER_STRING "1.6.21"
317
286
  #define PNG_HEADER_VERSION_STRING \
318
- " libpng version 1.6.23 - June 9, 2016\n"
287
+ " libpng version 1.6.21 - January 15, 2016\n"
319
288
 
320
289
  #define PNG_LIBPNG_VER_SONUM 16
321
290
  #define PNG_LIBPNG_VER_DLLNUM 16
@@ -323,7 +292,7 @@
323
292
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
324
293
  #define PNG_LIBPNG_VER_MAJOR 1
325
294
  #define PNG_LIBPNG_VER_MINOR 6
326
- #define PNG_LIBPNG_VER_RELEASE 23
295
+ #define PNG_LIBPNG_VER_RELEASE 21
327
296
 
328
297
  /* This should match the numeric part of the final component of
329
298
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -354,7 +323,7 @@
354
323
  * version 1.0.0 was mis-numbered 100 instead of 10000). From
355
324
  * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
356
325
  */
357
- #define PNG_LIBPNG_VER 10623 /* 1.6.23 */
326
+ #define PNG_LIBPNG_VER 10621 /* 1.6.21 */
358
327
 
359
328
  /* Library configuration: these options cannot be changed after
360
329
  * the library has been built.
@@ -464,7 +433,7 @@ extern "C" {
464
433
  /* This triggers a compiler error in png.c, if png.c and png.h
465
434
  * do not agree upon the version number.
466
435
  */
467
- typedef char* png_libpng_version_1_6_23;
436
+ typedef char* png_libpng_version_1_6_21;
468
437
 
469
438
  /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
470
439
  *
@@ -765,22 +734,24 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
765
734
  * data in the info_struct to be written into the output file. The values
766
735
  * of the PNG_INFO_<chunk> defines should NOT be changed.
767
736
  */
768
- #define PNG_INFO_gAMA 0x0001U
769
- #define PNG_INFO_sBIT 0x0002U
770
- #define PNG_INFO_cHRM 0x0004U
771
- #define PNG_INFO_PLTE 0x0008U
772
- #define PNG_INFO_tRNS 0x0010U
773
- #define PNG_INFO_bKGD 0x0020U
774
- #define PNG_INFO_hIST 0x0040U
775
- #define PNG_INFO_pHYs 0x0080U
776
- #define PNG_INFO_oFFs 0x0100U
777
- #define PNG_INFO_tIME 0x0200U
778
- #define PNG_INFO_pCAL 0x0400U
779
- #define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */
780
- #define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */
781
- #define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */
782
- #define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */
783
- #define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */
737
+ #define PNG_INFO_gAMA 0x0001
738
+ #define PNG_INFO_sBIT 0x0002
739
+ #define PNG_INFO_cHRM 0x0004
740
+ #define PNG_INFO_PLTE 0x0008
741
+ #define PNG_INFO_tRNS 0x0010
742
+ #define PNG_INFO_bKGD 0x0020
743
+ #define PNG_INFO_hIST 0x0040
744
+ #define PNG_INFO_pHYs 0x0080
745
+ #define PNG_INFO_oFFs 0x0100
746
+ #define PNG_INFO_tIME 0x0200
747
+ #define PNG_INFO_pCAL 0x0400
748
+ #define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */
749
+ #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
750
+ #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
751
+ #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
752
+ #if INT_MAX >= 0x8000 /* else this might break */
753
+ #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
754
+ #endif
784
755
 
785
756
  /* This is used for the transformation routines, as some of them
786
757
  * change these values for the row. It also should enable using
@@ -1351,7 +1322,7 @@ PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr));
1351
1322
  #endif
1352
1323
 
1353
1324
  #ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
1354
- #define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */
1325
+ #define PNG_READ_16_TO_8 SUPPORTED /* Name prior to 1.5.4 */
1355
1326
  /* Strip the second byte of information from a 16-bit depth file. */
1356
1327
  PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr));
1357
1328
  #endif
@@ -1502,8 +1473,8 @@ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
1502
1473
  #define PNG_FILTER_UP 0x20
1503
1474
  #define PNG_FILTER_AVG 0x40
1504
1475
  #define PNG_FILTER_PAETH 0x80
1505
- #define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP)
1506
- #define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH)
1476
+ #define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
1477
+ PNG_FILTER_AVG | PNG_FILTER_PAETH)
1507
1478
 
1508
1479
  /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
1509
1480
  * These defines should NOT be changed.
@@ -1780,21 +1751,21 @@ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1780
1751
  #define PNG_SET_WILL_FREE_DATA 1
1781
1752
  #define PNG_USER_WILL_FREE_DATA 2
1782
1753
  /* Flags for png_ptr->free_me and info_ptr->free_me */
1783
- #define PNG_FREE_HIST 0x0008U
1784
- #define PNG_FREE_ICCP 0x0010U
1785
- #define PNG_FREE_SPLT 0x0020U
1786
- #define PNG_FREE_ROWS 0x0040U
1787
- #define PNG_FREE_PCAL 0x0080U
1788
- #define PNG_FREE_SCAL 0x0100U
1754
+ #define PNG_FREE_HIST 0x0008
1755
+ #define PNG_FREE_ICCP 0x0010
1756
+ #define PNG_FREE_SPLT 0x0020
1757
+ #define PNG_FREE_ROWS 0x0040
1758
+ #define PNG_FREE_PCAL 0x0080
1759
+ #define PNG_FREE_SCAL 0x0100
1789
1760
  #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
1790
- # define PNG_FREE_UNKN 0x0200U
1761
+ # define PNG_FREE_UNKN 0x0200
1791
1762
  #endif
1792
- /* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */
1793
- #define PNG_FREE_PLTE 0x1000U
1794
- #define PNG_FREE_TRNS 0x2000U
1795
- #define PNG_FREE_TEXT 0x4000U
1796
- #define PNG_FREE_ALL 0x7fffU
1797
- #define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
1763
+ /* PNG_FREE_LIST 0x0400 removed in 1.6.0 because it is ignored */
1764
+ #define PNG_FREE_PLTE 0x1000
1765
+ #define PNG_FREE_TRNS 0x2000
1766
+ #define PNG_FREE_TEXT 0x4000
1767
+ #define PNG_FREE_ALL 0x7fff
1768
+ #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
1798
1769
 
1799
1770
  #ifdef PNG_USER_MEM_SUPPORTED
1800
1771
  PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr,
@@ -2918,19 +2889,12 @@ typedef struct
2918
2889
  * is the minimum 'row stride', the minimum count of components between each
2919
2890
  * row. For a color-mapped image this is the minimum number of bytes in a
2920
2891
  * row.
2921
- *
2922
- * WARNING: this macro overflows for some images with more than one component
2923
- * and very large image widths. libpng will refuse to process an image where
2924
- * this macro would overflow.
2925
2892
  */
2926
2893
 
2927
2894
  #define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\
2928
2895
  (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride))
2929
2896
  /* Return the size, in bytes, of an image buffer given a png_image and a row
2930
2897
  * stride - the number of components to leave space for in each row.
2931
- *
2932
- * WARNING: this macro overflows a 32-bit integer for some large PNG images,
2933
- * libpng will refuse to process an image where such an overflow would occur.
2934
2898
  */
2935
2899
 
2936
2900
  #define PNG_IMAGE_SIZE(image)\
@@ -3051,6 +3015,7 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3051
3015
  #endif /* SIMPLIFIED_READ */
3052
3016
 
3053
3017
  #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
3018
+ #ifdef PNG_STDIO_SUPPORTED
3054
3019
  /* WRITE APIS
3055
3020
  * ----------
3056
3021
  * For write you must initialize a png_image structure to describe the image to
@@ -3067,7 +3032,6 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3067
3032
  * values do not correspond to the colors in sRGB.
3068
3033
  * colormap_entries: set to the number of entries in the color-map (0 to 256)
3069
3034
  */
3070
- #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
3071
3035
  PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
3072
3036
  const char *file, int convert_to_8bit, const void *buffer,
3073
3037
  png_int_32 row_stride, const void *colormap));
@@ -3077,9 +3041,8 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3077
3041
  int convert_to_8_bit, const void *buffer, png_int_32 row_stride,
3078
3042
  const void *colormap));
3079
3043
  /* Write the image to the given (FILE*). */
3080
- #endif /* SIMPLIFIED_WRITE_STDIO */
3081
3044
 
3082
- /* With all write APIs if image is in one of the linear formats with 16-bit
3045
+ /* With both write APIs if image is in one of the linear formats with 16-bit
3083
3046
  * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG
3084
3047
  * gamma encoded according to the sRGB specification, otherwise a 16-bit linear
3085
3048
  * encoded PNG file is written.
@@ -3091,103 +3054,13 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3091
3054
  *
3092
3055
  * With all APIs row_stride is handled as in the read APIs - it is the spacing
3093
3056
  * from one row to the next in component sized units (1 or 2 bytes) and if
3094
- * negative indicates a bottom-up row layout in the buffer. If row_stride is
3095
- * zero, libpng will calculate it for you from the image width and number of
3096
- * channels.
3057
+ * negative indicates a bottom-up row layout in the buffer. If row_stride is zero,
3058
+ * libpng will calculate it for you from the image width and number of channels.
3097
3059
  *
3098
- * Note that the write API does not support interlacing, sub-8-bit pixels or
3099
- * most ancillary chunks. If you need to write text chunks (e.g. for copyright
3100
- * notices) you need to use one of the other APIs.
3101
- */
3102
-
3103
- PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
3104
- png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit,
3105
- const void *buffer, png_int_32 row_stride, const void *colormap));
3106
- /* Write the image to the given memory buffer. The function both writes the
3107
- * whole PNG data stream to *memory and updates *memory_bytes with the count
3108
- * of bytes written.
3109
- *
3110
- * 'memory' may be NULL. In this case *memory_bytes is not read however on
3111
- * success the number of bytes which would have been written will still be
3112
- * stored in *memory_bytes. On failure *memory_bytes will contain 0.
3113
- *
3114
- * If 'memory' is not NULL it must point to memory[*memory_bytes] of
3115
- * writeable memory.
3116
- *
3117
- * If the function returns success memory[*memory_bytes] (if 'memory' is not
3118
- * NULL) contains the written PNG data. *memory_bytes will always be less
3119
- * than or equal to the original value.
3120
- *
3121
- * If the function returns false and *memory_bytes was not changed an error
3122
- * occured during write. If *memory_bytes was changed, or is not 0 if
3123
- * 'memory' was NULL, the write would have succeeded but for the memory
3124
- * buffer being too small. *memory_bytes contains the required number of
3125
- * bytes and will be bigger that the original value.
3126
- */
3127
-
3128
- #define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\
3129
- row_stride, colormap)\
3130
- png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\
3131
- row_stride, colormap)
3132
- /* Return the amount of memory in 'size' required to compress this image.
3133
- * The png_image structure 'image' must be filled in as in the above
3134
- * function and must not be changed before the actual write call, the buffer
3135
- * and all other parameters must also be identical to that in the final
3136
- * write call. The 'size' variable need not be initialized.
3137
- *
3138
- * NOTE: the macro returns true/false, if false is returned 'size' will be
3139
- * set to zero and the write failed and probably will fail if tried again.
3140
- */
3141
-
3142
- /* You can pre-allocate the buffer by making sure it is of sufficient size
3143
- * regardless of the amount of compression achieved. The buffer size will
3144
- * always be bigger than the original image and it will never be filled. The
3145
- * following macros are provided to assist in allocating the buffer.
3060
+ * Note that the write API does not support interlacing, sub-8-bit pixels, indexed
3061
+ * PNG (color_type 3) or most ancillary chunks.
3146
3062
  */
3147
- #define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height)
3148
- /* The number of uncompressed bytes in the PNG byte encoding of the image;
3149
- * uncompressing the PNG IDAT data will give this number of bytes.
3150
- *
3151
- * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this
3152
- * macro can because of the extra bytes used in the PNG byte encoding. You
3153
- * need to avoid this macro if your image size approaches 2^30 in width or
3154
- * height. The same goes for the remainder of these macros; they all produce
3155
- * bigger numbers than the actual in-memory image size.
3156
- */
3157
- #ifndef PNG_ZLIB_MAX_SIZE
3158
- # define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U)
3159
- /* An upper bound on the number of compressed bytes given 'b' uncompressed
3160
- * bytes. This is based on deflateBounds() in zlib; different
3161
- * implementations of zlib compression may conceivably produce more data so
3162
- * if your zlib implementation is not zlib itself redefine this macro
3163
- * appropriately.
3164
- */
3165
- #endif
3166
-
3167
- #define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\
3168
- PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image))
3169
- /* An upper bound on the size of the data in the PNG IDAT chunks. */
3170
-
3171
- #define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\
3172
- ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\
3173
- (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\
3174
- 12U+3U*(image).colormap_entries/*PLTE data*/+\
3175
- (((image).format&PNG_FORMAT_FLAG_ALPHA)?\
3176
- 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\
3177
- 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size))
3178
- /* A helper for the following macro; if your compiler cannot handle the
3179
- * following macro use this one with the result of
3180
- * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most
3181
- * compilers should handle this just fine.)
3182
- */
3183
-
3184
- #define PNG_IMAGE_PNG_SIZE_MAX(image)\
3185
- PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image))
3186
- /* An upper bound on the total length of the PNG data stream for 'image'.
3187
- * The result is of type png_alloc_size_t, on 32-bit systems this may
3188
- * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will
3189
- * run out of buffer space but return a corrected size which should work.
3190
- */
3063
+ #endif /* STDIO */
3191
3064
  #endif /* SIMPLIFIED_WRITE */
3192
3065
  /*******************************************************************************
3193
3066
  * END OF SIMPLIFIED API
@@ -3245,7 +3118,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
3245
3118
  * one to use is one more than this.)
3246
3119
  */
3247
3120
  #ifdef PNG_EXPORT_LAST_ORDINAL
3248
- PNG_EXPORT_LAST_ORDINAL(245);
3121
+ PNG_EXPORT_LAST_ORDINAL(244);
3249
3122
  #endif
3250
3123
 
3251
3124
  #ifdef __cplusplus
@@ -1,7 +1,7 @@
1
1
 
2
2
  /* pngconf.h - machine configurable file for libpng
3
3
  *
4
- * libpng version 1.6.23, June 9, 2016
4
+ * libpng version 1.6.21, January 15, 2016
5
5
  *
6
6
  * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson
7
7
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)