cairo 1.12.8-x86-mingw32 → 1.12.9-x86-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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +23 -0
  3. data/Rakefile +20 -11
  4. data/ext/cairo/rb_cairo.c +1 -0
  5. data/ext/cairo/rb_cairo.h +1 -1
  6. data/ext/cairo/rb_cairo_context.c +6 -38
  7. data/ext/cairo/rb_cairo_private.h +1 -0
  8. data/ext/cairo/rb_cairo_rectangle.c +83 -0
  9. data/ext/cairo/rb_cairo_surface.c +52 -20
  10. data/lib/2.0/cairo.so +0 -0
  11. data/lib/2.1/cairo.so +0 -0
  12. data/vendor/local/bin/fc-cache.exe +0 -0
  13. data/vendor/local/bin/fc-cat.exe +0 -0
  14. data/vendor/local/bin/fc-list.exe +0 -0
  15. data/vendor/local/bin/fc-match.exe +0 -0
  16. data/vendor/local/bin/fc-pattern.exe +0 -0
  17. data/vendor/local/bin/fc-query.exe +0 -0
  18. data/vendor/local/bin/fc-scan.exe +0 -0
  19. data/vendor/local/bin/fc-validate.exe +0 -0
  20. data/vendor/local/bin/freetype-config +12 -3
  21. data/vendor/local/bin/libcairo-2.dll +0 -0
  22. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  23. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  24. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  25. data/vendor/local/bin/libfreetype-6.dll +0 -0
  26. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  27. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  28. data/vendor/local/bin/libpng-config +1 -1
  29. data/vendor/local/bin/libpng16-16.dll +0 -0
  30. data/vendor/local/bin/libpng16-config +1 -1
  31. data/vendor/local/bin/libwinpthread-1.dll +0 -0
  32. data/vendor/local/bin/libxml2-2.dll +0 -0
  33. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  34. data/vendor/local/bin/pngfix.exe +0 -0
  35. data/vendor/local/bin/xmlcatalog.exe +0 -0
  36. data/vendor/local/bin/xmllint.exe +0 -0
  37. data/vendor/local/bin/zlib1.dll +0 -0
  38. data/vendor/local/etc/fonts/conf.d/30-metric-aliases.conf +51 -2
  39. data/vendor/local/etc/fonts/fonts.conf +1 -1
  40. data/vendor/local/include/fontconfig/fontconfig.h +4 -1
  41. data/vendor/local/include/freetype2/config/ftconfig.h +2 -2
  42. data/vendor/local/include/freetype2/config/ftoption.h +13 -0
  43. data/vendor/local/include/freetype2/freetype.h +42 -2
  44. data/vendor/local/include/freetype2/ftautoh.h +46 -1
  45. data/vendor/local/include/freetype2/ftbdf.h +3 -2
  46. data/vendor/local/include/freetype2/ftchapters.h +1 -0
  47. data/vendor/local/include/freetype2/ftoutln.h +4 -1
  48. data/vendor/local/include/libpng16/png.h +41 -101
  49. data/vendor/local/include/libpng16/pngconf.h +33 -6
  50. data/vendor/local/include/libpng16/pnglibconf.h +1 -1
  51. data/vendor/local/include/png.h +41 -101
  52. data/vendor/local/include/pngconf.h +33 -6
  53. data/vendor/local/include/pnglibconf.h +1 -1
  54. data/vendor/local/lib/fontconfig.def +1 -0
  55. data/vendor/local/lib/libcairo-gobject.a +0 -0
  56. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  57. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  58. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  59. data/vendor/local/lib/libcairo.a +0 -0
  60. data/vendor/local/lib/libcairo.dll.a +0 -0
  61. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  62. data/vendor/local/lib/libfontconfig.la +1 -1
  63. data/vendor/local/lib/libfreetype.a +0 -0
  64. data/vendor/local/lib/libfreetype.dll.a +0 -0
  65. data/vendor/local/lib/libfreetype.la +3 -3
  66. data/vendor/local/lib/libpixman-1.a +0 -0
  67. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  68. data/vendor/local/lib/libpng.a +0 -0
  69. data/vendor/local/lib/libpng.dll.a +0 -0
  70. data/vendor/local/lib/libpng.la +2 -2
  71. data/vendor/local/lib/libpng16.a +0 -0
  72. data/vendor/local/lib/libpng16.dll.a +0 -0
  73. data/vendor/local/lib/libpng16.la +2 -2
  74. data/vendor/local/lib/libxml2.a +0 -0
  75. data/vendor/local/lib/libxml2.dll.a +0 -0
  76. data/vendor/local/lib/libz.a +0 -0
  77. data/vendor/local/lib/libz.dll.a +0 -0
  78. data/vendor/local/lib/pkgconfig/fontconfig.pc +4 -4
  79. data/vendor/local/lib/pkgconfig/freetype2.pc +4 -2
  80. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  81. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  82. data/vendor/local/share/fontconfig/conf.avail/10-no-sub-pixel.conf +1 -1
  83. data/vendor/local/share/fontconfig/conf.avail/30-metric-aliases.conf +51 -2
  84. data/vendor/local/share/license/fontconfig/README +55 -2
  85. data/vendor/local/share/license/freetype/README +6 -6
  86. data/vendor/local/share/license/libpng/README +2 -2
  87. data/vendor/local/share/man/man1/freetype-config.1 +108 -0
  88. data/vendor/local/share/man/man3/libpng.3 +244 -55
  89. data/vendor/local/share/man/man3/libpngpf.3 +2 -2
  90. data/vendor/local/share/man/man5/png.5 +1 -1
  91. data/vendor/local/share/xml/fontconfig/fonts.dtd +1 -1
  92. metadata +75 -75
  93. data/lib/1.9/cairo.so +0 -0
  94. data/vendor/local/lib/libfontconfig.a +0 -0
@@ -1,8 +1,8 @@
1
1
 
2
2
  /* png.h - header file for PNG reference library
3
3
  *
4
- * libpng version 1.6.8 - December 19, 2013
5
- * Copyright (c) 1998-2013 Glenn Randers-Pehrson
4
+ * libpng version 1.6.10 - March 6, 2014
5
+ * Copyright (c) 1998-2014 Glenn Randers-Pehrson
6
6
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7
7
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8
8
  *
@@ -11,7 +11,7 @@
11
11
  * Authors and maintainers:
12
12
  * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
13
13
  * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
14
- * libpng versions 0.97, January 1998, through 1.6.8 - December 19, 2013: Glenn
14
+ * libpng versions 0.97, January 1998, through 1.6.10 - March 6, 2014: Glenn
15
15
  * See also "Contributing Authors", below.
16
16
  *
17
17
  * Note about libpng version numbers:
@@ -189,6 +189,12 @@
189
189
  * 1.6.8beta01-02 16 10608 16.so.16.8[.0]
190
190
  * 1.6.8rc01-02 16 10608 16.so.16.8[.0]
191
191
  * 1.6.8 16 10608 16.so.16.8[.0]
192
+ * 1.6.9beta01-04 16 10609 16.so.16.9[.0]
193
+ * 1.6.9rc01-02 16 10609 16.so.16.9[.0]
194
+ * 1.6.9 16 10609 16.so.16.9[.0]
195
+ * 1.6.10beta01-03 16 10610 16.so.16.10[.0]
196
+ * 1.6.10betarc01-04 16 10610 16.so.16.10[.0]
197
+ * 1.6.10beta 16 10610 16.so.16.10[.0]
192
198
  *
193
199
  * Henceforth the source version will match the shared-library major
194
200
  * and minor numbers; the shared-library major version number will be
@@ -220,7 +226,7 @@
220
226
  *
221
227
  * This code is released under the libpng license.
222
228
  *
223
- * libpng versions 1.2.6, August 15, 2004, through 1.6.8, December 19, 2013, are
229
+ * libpng versions 1.2.6, August 15, 2004, through 1.6.10, March 6, 2014, are
224
230
  * Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
225
231
  * distributed according to the same disclaimer and license as libpng-1.2.5
226
232
  * with the following individual added to the list of Contributing Authors:
@@ -332,13 +338,13 @@
332
338
  * Y2K compliance in libpng:
333
339
  * =========================
334
340
  *
335
- * December 19, 2013
341
+ * March 6, 2014
336
342
  *
337
343
  * Since the PNG Development group is an ad-hoc body, we can't make
338
344
  * an official declaration.
339
345
  *
340
346
  * This is your unofficial assurance that libpng from version 0.71 and
341
- * upward through 1.6.8 are Y2K compliant. It is my belief that
347
+ * upward through 1.6.10 are Y2K compliant. It is my belief that
342
348
  * earlier versions were also Y2K compliant.
343
349
  *
344
350
  * Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -398,9 +404,9 @@
398
404
  */
399
405
 
400
406
  /* Version information for png.h - this should match the version in png.c */
401
- #define PNG_LIBPNG_VER_STRING "1.6.8"
407
+ #define PNG_LIBPNG_VER_STRING "1.6.10"
402
408
  #define PNG_HEADER_VERSION_STRING \
403
- " libpng version 1.6.8 - December 19, 2013\n"
409
+ " libpng version 1.6.10 - March 6, 2014\n"
404
410
 
405
411
  #define PNG_LIBPNG_VER_SONUM 16
406
412
  #define PNG_LIBPNG_VER_DLLNUM 16
@@ -408,7 +414,7 @@
408
414
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
409
415
  #define PNG_LIBPNG_VER_MAJOR 1
410
416
  #define PNG_LIBPNG_VER_MINOR 6
411
- #define PNG_LIBPNG_VER_RELEASE 8
417
+ #define PNG_LIBPNG_VER_RELEASE 10
412
418
 
413
419
  /* This should match the numeric part of the final component of
414
420
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -439,7 +445,7 @@
439
445
  * version 1.0.0 was mis-numbered 100 instead of 10000). From
440
446
  * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
441
447
  */
442
- #define PNG_LIBPNG_VER 10608 /* 1.6.8 */
448
+ #define PNG_LIBPNG_VER 10610 /* 1.6.10 */
443
449
 
444
450
  /* Library configuration: these options cannot be changed after
445
451
  * the library has been built.
@@ -544,7 +550,7 @@ extern "C" {
544
550
  /* This triggers a compiler error in png.c, if png.c and png.h
545
551
  * do not agree upon the version number.
546
552
  */
547
- typedef char* png_libpng_version_1_6_8;
553
+ typedef char* png_libpng_version_1_6_10;
548
554
 
549
555
  /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
550
556
  *
@@ -1206,9 +1212,9 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1206
1212
  #endif
1207
1213
 
1208
1214
  #ifdef PNG_READ_ALPHA_MODE_SUPPORTED
1209
- /* How the alpha channel is interpreted - this affects how the color channels of
1210
- * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
1211
- * file, is present.
1215
+ /* How the alpha channel is interpreted - this affects how the color channels
1216
+ * of a PNG file are returned to the calling application when an alpha channel,
1217
+ * or a tRNS chunk in a palette file, is present.
1212
1218
  *
1213
1219
  * This has no effect on the way pixels are written into a PNG output
1214
1220
  * datastream. The color samples in a PNG datastream are never premultiplied
@@ -1216,33 +1222,19 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1216
1222
  *
1217
1223
  * The default is to return data according to the PNG specification: the alpha
1218
1224
  * channel is a linear measure of the contribution of the pixel to the
1219
- * corresponding composited pixel. The gamma encoded color channels must be
1220
- * scaled according to the contribution and to do this it is necessary to undo
1225
+ * corresponding composited pixel, and the color channels are unassociated
1226
+ * (not premultiplied). The gamma encoded color channels must be scaled
1227
+ * according to the contribution and to do this it is necessary to undo
1221
1228
  * the encoding, scale the color values, perform the composition and reencode
1222
1229
  * the values. This is the 'PNG' mode.
1223
1230
  *
1224
1231
  * The alternative is to 'associate' the alpha with the color information by
1225
- * storing color channel values that have been scaled by the alpha. The
1226
- * advantage is that the color channels can be resampled (the image can be
1227
- * scaled) in this form. The disadvantage is that normal practice is to store
1228
- * linear, not (gamma) encoded, values and this requires 16-bit channels for
1229
- * still images rather than the 8-bit channels that are just about sufficient if
1230
- * gamma encoding is used. In addition all non-transparent pixel values,
1231
- * including completely opaque ones, must be gamma encoded to produce the final
1232
- * image. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the
1233
- * latter being the two common names for associated alpha color channels.)
1234
- *
1235
- * Since it is not necessary to perform arithmetic on opaque color values so
1236
- * long as they are not to be resampled and are in the final color space it is
1237
- * possible to optimize the handling of alpha by storing the opaque pixels in
1238
- * the PNG format (adjusted for the output color space) while storing partially
1239
- * opaque pixels in the standard, linear, format. The accuracy required for
1240
- * standard alpha composition is relatively low, because the pixels are
1241
- * isolated, therefore typically the accuracy loss in storing 8-bit linear
1242
- * values is acceptable. (This is not true if the alpha channel is used to
1243
- * simulate transparency over large areas - use 16 bits or the PNG mode in
1244
- * this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is
1245
- * treated as opaque only if the alpha value is equal to the maximum value.
1232
+ * storing color channel values that have been scaled by the alpha.
1233
+ * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes
1234
+ * (the latter being the two common names for associated alpha color channels).
1235
+ *
1236
+ * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha
1237
+ * value is equal to the maximum value.
1246
1238
  *
1247
1239
  * The final choice is to gamma encode the alpha channel as well. This is
1248
1240
  * broken because, in practice, no implementation that uses this choice
@@ -1269,68 +1261,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
1269
1261
 
1270
1262
  #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
1271
1263
  /* The output_gamma value is a screen gamma in libpng terminology: it expresses
1272
- * how to decode the output values, not how they are encoded. The values used
1273
- * correspond to the normal numbers used to describe the overall gamma of a
1274
- * computer display system; for example 2.2 for an sRGB conformant system. The
1275
- * values are scaled by 100000 in the _fixed version of the API (so 220000 for
1276
- * sRGB.)
1277
- *
1278
- * The inverse of the value is always used to provide a default for the PNG file
1279
- * encoding if it has no gAMA chunk and if png_set_gamma() has not been called
1280
- * to override the PNG gamma information.
1281
- *
1282
- * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode
1283
- * opaque pixels however pixels with lower alpha values are not encoded,
1284
- * regardless of the output gamma setting.
1285
- *
1286
- * When the standard Porter Duff handling is requested with mode 1 the output
1287
- * encoding is set to be linear and the output_gamma value is only relevant
1288
- * as a default for input data that has no gamma information. The linear output
1289
- * encoding will be overridden if png_set_gamma() is called - the results may be
1290
- * highly unexpected!
1291
- *
1292
- * The following numbers are derived from the sRGB standard and the research
1293
- * behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of
1294
- * 0.45455 (1/2.2) for PNG. The value implicitly includes any viewing
1295
- * correction required to take account of any differences in the color
1296
- * environment of the original scene and the intended display environment; the
1297
- * value expresses how to *decode* the image for display, not how the original
1298
- * data was *encoded*.
1299
- *
1300
- * sRGB provides a peg for the PNG standard by defining a viewing environment.
1301
- * sRGB itself, and earlier TV standards, actually use a more complex transform
1302
- * (a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is
1303
- * limited to simple power laws.) By saying that an image for direct display on
1304
- * an sRGB conformant system should be stored with a gAMA chunk value of 45455
1305
- * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification
1306
- * makes it possible to derive values for other display systems and
1307
- * environments.
1308
- *
1309
- * The Mac value is deduced from the sRGB based on an assumption that the actual
1310
- * extra viewing correction used in early Mac display systems was implemented as
1311
- * a power 1.45 lookup table.
1312
- *
1313
- * Any system where a programmable lookup table is used or where the behavior of
1314
- * the final display device characteristics can be changed requires system
1315
- * specific code to obtain the current characteristic. However this can be
1316
- * difficult and most PNG gamma correction only requires an approximate value.
1317
- *
1318
- * By default, if png_set_alpha_mode() is not called, libpng assumes that all
1319
- * values are unencoded, linear, values and that the output device also has a
1320
- * linear characteristic. This is only very rarely correct - it is invariably
1321
- * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the
1322
- * default if you don't know what the right answer is!
1323
- *
1324
- * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS
1325
- * 10.6) which used a correction table to implement a somewhat lower gamma on an
1326
- * otherwise sRGB system.
1327
- *
1328
- * Both these values are reserved (not simple gamma values) in order to allow
1329
- * more precise correction internally in the future.
1330
- *
1331
- * NOTE: the following values can be passed to either the fixed or floating
1332
- * point APIs, but the floating point API will also accept floating point
1333
- * values.
1264
+ * how to decode the output values, not how they are encoded.
1334
1265
  */
1335
1266
  #define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */
1336
1267
  #define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */
@@ -1953,8 +1884,8 @@ PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
1953
1884
  * It is unlikely that this function works correctly as of 1.6.0 and using it
1954
1885
  * may result either in memory leaks or double free of allocated data.
1955
1886
  */
1956
- PNG_EXPORTA(99, void, png_data_freer, (png_const_structrp png_ptr,
1957
- png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED);
1887
+ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1888
+ png_inforp info_ptr, int freer, png_uint_32 mask));
1958
1889
 
1959
1890
  /* Assignments for png_data_freer */
1960
1891
  #define PNG_DESTROY_WILL_FREE_DATA 1
@@ -1996,6 +1927,8 @@ PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr,
1996
1927
  #else
1997
1928
  /* Fatal error in PNG image of libpng - can't continue */
1998
1929
  PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
1930
+ # define png_error(s1,s2) png_err(s1)
1931
+ # define png_chunk_error(s1,s2) png_err(s1)
1999
1932
  #endif
2000
1933
 
2001
1934
  #ifdef PNG_WARNINGS_SUPPORTED
@@ -2006,6 +1939,9 @@ PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr,
2006
1939
  /* Non-fatal error in libpng, chunk name is prepended to message. */
2007
1940
  PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
2008
1941
  png_const_charp warning_message));
1942
+ #else
1943
+ # define png_warning(s1,s2) ((void)(s1))
1944
+ # define png_chunk_warning(s1,s2) ((void)(s1))
2009
1945
  #endif
2010
1946
 
2011
1947
  #ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -2516,11 +2452,15 @@ PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr,
2516
2452
 
2517
2453
  #ifdef PNG_INFO_IMAGE_SUPPORTED
2518
2454
  /* The "params" pointer is currently not used and is for future expansion. */
2455
+ #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
2519
2456
  PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr,
2520
2457
  int transforms, png_voidp params));
2458
+ #endif
2459
+ #ifdef PNG_WRITE_SUPPORTED
2521
2460
  PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr,
2522
2461
  int transforms, png_voidp params));
2523
2462
  #endif
2463
+ #endif
2524
2464
 
2525
2465
  PNG_EXPORT(180, png_const_charp, png_get_copyright,
2526
2466
  (png_const_structrp png_ptr));
@@ -1,7 +1,7 @@
1
1
 
2
2
  /* pngconf.h - machine configurable file for libpng
3
3
  *
4
- * libpng version 1.6.8 - December 19, 2013
4
+ * libpng version 1.6.10 - March 6, 2014
5
5
  *
6
6
  * Copyright (c) 1998-2013 Glenn Randers-Pehrson
7
7
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -361,7 +361,33 @@
361
361
  * version 1.2.41. Disabling these removes the warnings but may also produce
362
362
  * less efficient code.
363
363
  */
364
- # if defined(__GNUC__)
364
+ # if defined(__clang__)
365
+ /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */
366
+ # if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
367
+ # define PNG_USE_RESULT __attribute__((__warn_unused_result__))
368
+ # endif
369
+ # if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
370
+ # define PNG_NORETURN __attribute__((__noreturn__))
371
+ # endif
372
+ # if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
373
+ # define PNG_ALLOCATED __attribute__((__malloc__))
374
+ # endif
375
+ # if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
376
+ # define PNG_DEPRECATED __attribute__((__deprecated__))
377
+ # endif
378
+ # if !defined(PNG_PRIVATE)
379
+ # ifdef __has_extension
380
+ # if __has_extension(attribute_unavailable_with_message)
381
+ # define PNG_PRIVATE __attribute__((__unavailable__(\
382
+ "This function is not exported by libpng.")))
383
+ # endif
384
+ # endif
385
+ # endif
386
+ # ifndef PNG_RESTRICT
387
+ # define PNG_RESTRICT __restrict
388
+ # endif
389
+
390
+ # elif defined(__GNUC__)
365
391
  # ifndef PNG_USE_RESULT
366
392
  # define PNG_USE_RESULT __attribute__((__warn_unused_result__))
367
393
  # endif
@@ -384,12 +410,12 @@
384
410
  __attribute__((__deprecated__))
385
411
  # endif
386
412
  # endif
387
- # if ((__GNUC__ != 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
413
+ # if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
388
414
  # ifndef PNG_RESTRICT
389
415
  # define PNG_RESTRICT __restrict
390
416
  # endif
391
- # endif /* __GNUC__ == 3.0 */
392
- # endif /* __GNUC__ >= 3 */
417
+ # endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */
418
+ # endif /* __GNUC__ >= 3 */
393
419
 
394
420
  # elif defined(_MSC_VER) && (_MSC_VER >= 1300)
395
421
  # ifndef PNG_USE_RESULT
@@ -419,7 +445,7 @@
419
445
  # ifndef PNG_RESTRICT
420
446
  # define PNG_RESTRICT __restrict
421
447
  # endif
422
- # endif /* _MSC_VER */
448
+ # endif
423
449
  #endif /* PNG_PEDANTIC_WARNINGS */
424
450
 
425
451
  #ifndef PNG_DEPRECATED
@@ -440,6 +466,7 @@
440
466
  #ifndef PNG_RESTRICT
441
467
  # define PNG_RESTRICT /* The C99 "restrict" feature */
442
468
  #endif
469
+
443
470
  #ifndef PNG_FP_EXPORT /* A floating point API. */
444
471
  # ifdef PNG_FLOATING_POINT_SUPPORTED
445
472
  # define PNG_FP_EXPORT(ordinal, type, name, args)\
@@ -1,6 +1,6 @@
1
1
  /* pnglibconf.h - library build configuration */
2
2
 
3
- /* libpng version 1.6.8 - December 19, 2013 */
3
+ /* libpng version 1.6.10 - March 6, 2014 */
4
4
 
5
5
  /* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
6
6
 
@@ -1,8 +1,8 @@
1
1
 
2
2
  /* png.h - header file for PNG reference library
3
3
  *
4
- * libpng version 1.6.8 - December 19, 2013
5
- * Copyright (c) 1998-2013 Glenn Randers-Pehrson
4
+ * libpng version 1.6.10 - March 6, 2014
5
+ * Copyright (c) 1998-2014 Glenn Randers-Pehrson
6
6
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7
7
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8
8
  *
@@ -11,7 +11,7 @@
11
11
  * Authors and maintainers:
12
12
  * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
13
13
  * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
14
- * libpng versions 0.97, January 1998, through 1.6.8 - December 19, 2013: Glenn
14
+ * libpng versions 0.97, January 1998, through 1.6.10 - March 6, 2014: Glenn
15
15
  * See also "Contributing Authors", below.
16
16
  *
17
17
  * Note about libpng version numbers:
@@ -189,6 +189,12 @@
189
189
  * 1.6.8beta01-02 16 10608 16.so.16.8[.0]
190
190
  * 1.6.8rc01-02 16 10608 16.so.16.8[.0]
191
191
  * 1.6.8 16 10608 16.so.16.8[.0]
192
+ * 1.6.9beta01-04 16 10609 16.so.16.9[.0]
193
+ * 1.6.9rc01-02 16 10609 16.so.16.9[.0]
194
+ * 1.6.9 16 10609 16.so.16.9[.0]
195
+ * 1.6.10beta01-03 16 10610 16.so.16.10[.0]
196
+ * 1.6.10betarc01-04 16 10610 16.so.16.10[.0]
197
+ * 1.6.10beta 16 10610 16.so.16.10[.0]
192
198
  *
193
199
  * Henceforth the source version will match the shared-library major
194
200
  * and minor numbers; the shared-library major version number will be
@@ -220,7 +226,7 @@
220
226
  *
221
227
  * This code is released under the libpng license.
222
228
  *
223
- * libpng versions 1.2.6, August 15, 2004, through 1.6.8, December 19, 2013, are
229
+ * libpng versions 1.2.6, August 15, 2004, through 1.6.10, March 6, 2014, are
224
230
  * Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
225
231
  * distributed according to the same disclaimer and license as libpng-1.2.5
226
232
  * with the following individual added to the list of Contributing Authors:
@@ -332,13 +338,13 @@
332
338
  * Y2K compliance in libpng:
333
339
  * =========================
334
340
  *
335
- * December 19, 2013
341
+ * March 6, 2014
336
342
  *
337
343
  * Since the PNG Development group is an ad-hoc body, we can't make
338
344
  * an official declaration.
339
345
  *
340
346
  * This is your unofficial assurance that libpng from version 0.71 and
341
- * upward through 1.6.8 are Y2K compliant. It is my belief that
347
+ * upward through 1.6.10 are Y2K compliant. It is my belief that
342
348
  * earlier versions were also Y2K compliant.
343
349
  *
344
350
  * Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -398,9 +404,9 @@
398
404
  */
399
405
 
400
406
  /* Version information for png.h - this should match the version in png.c */
401
- #define PNG_LIBPNG_VER_STRING "1.6.8"
407
+ #define PNG_LIBPNG_VER_STRING "1.6.10"
402
408
  #define PNG_HEADER_VERSION_STRING \
403
- " libpng version 1.6.8 - December 19, 2013\n"
409
+ " libpng version 1.6.10 - March 6, 2014\n"
404
410
 
405
411
  #define PNG_LIBPNG_VER_SONUM 16
406
412
  #define PNG_LIBPNG_VER_DLLNUM 16
@@ -408,7 +414,7 @@
408
414
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
409
415
  #define PNG_LIBPNG_VER_MAJOR 1
410
416
  #define PNG_LIBPNG_VER_MINOR 6
411
- #define PNG_LIBPNG_VER_RELEASE 8
417
+ #define PNG_LIBPNG_VER_RELEASE 10
412
418
 
413
419
  /* This should match the numeric part of the final component of
414
420
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -439,7 +445,7 @@
439
445
  * version 1.0.0 was mis-numbered 100 instead of 10000). From
440
446
  * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
441
447
  */
442
- #define PNG_LIBPNG_VER 10608 /* 1.6.8 */
448
+ #define PNG_LIBPNG_VER 10610 /* 1.6.10 */
443
449
 
444
450
  /* Library configuration: these options cannot be changed after
445
451
  * the library has been built.
@@ -544,7 +550,7 @@ extern "C" {
544
550
  /* This triggers a compiler error in png.c, if png.c and png.h
545
551
  * do not agree upon the version number.
546
552
  */
547
- typedef char* png_libpng_version_1_6_8;
553
+ typedef char* png_libpng_version_1_6_10;
548
554
 
549
555
  /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
550
556
  *
@@ -1206,9 +1212,9 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1206
1212
  #endif
1207
1213
 
1208
1214
  #ifdef PNG_READ_ALPHA_MODE_SUPPORTED
1209
- /* How the alpha channel is interpreted - this affects how the color channels of
1210
- * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
1211
- * file, is present.
1215
+ /* How the alpha channel is interpreted - this affects how the color channels
1216
+ * of a PNG file are returned to the calling application when an alpha channel,
1217
+ * or a tRNS chunk in a palette file, is present.
1212
1218
  *
1213
1219
  * This has no effect on the way pixels are written into a PNG output
1214
1220
  * datastream. The color samples in a PNG datastream are never premultiplied
@@ -1216,33 +1222,19 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1216
1222
  *
1217
1223
  * The default is to return data according to the PNG specification: the alpha
1218
1224
  * channel is a linear measure of the contribution of the pixel to the
1219
- * corresponding composited pixel. The gamma encoded color channels must be
1220
- * scaled according to the contribution and to do this it is necessary to undo
1225
+ * corresponding composited pixel, and the color channels are unassociated
1226
+ * (not premultiplied). The gamma encoded color channels must be scaled
1227
+ * according to the contribution and to do this it is necessary to undo
1221
1228
  * the encoding, scale the color values, perform the composition and reencode
1222
1229
  * the values. This is the 'PNG' mode.
1223
1230
  *
1224
1231
  * The alternative is to 'associate' the alpha with the color information by
1225
- * storing color channel values that have been scaled by the alpha. The
1226
- * advantage is that the color channels can be resampled (the image can be
1227
- * scaled) in this form. The disadvantage is that normal practice is to store
1228
- * linear, not (gamma) encoded, values and this requires 16-bit channels for
1229
- * still images rather than the 8-bit channels that are just about sufficient if
1230
- * gamma encoding is used. In addition all non-transparent pixel values,
1231
- * including completely opaque ones, must be gamma encoded to produce the final
1232
- * image. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the
1233
- * latter being the two common names for associated alpha color channels.)
1234
- *
1235
- * Since it is not necessary to perform arithmetic on opaque color values so
1236
- * long as they are not to be resampled and are in the final color space it is
1237
- * possible to optimize the handling of alpha by storing the opaque pixels in
1238
- * the PNG format (adjusted for the output color space) while storing partially
1239
- * opaque pixels in the standard, linear, format. The accuracy required for
1240
- * standard alpha composition is relatively low, because the pixels are
1241
- * isolated, therefore typically the accuracy loss in storing 8-bit linear
1242
- * values is acceptable. (This is not true if the alpha channel is used to
1243
- * simulate transparency over large areas - use 16 bits or the PNG mode in
1244
- * this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is
1245
- * treated as opaque only if the alpha value is equal to the maximum value.
1232
+ * storing color channel values that have been scaled by the alpha.
1233
+ * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes
1234
+ * (the latter being the two common names for associated alpha color channels).
1235
+ *
1236
+ * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha
1237
+ * value is equal to the maximum value.
1246
1238
  *
1247
1239
  * The final choice is to gamma encode the alpha channel as well. This is
1248
1240
  * broken because, in practice, no implementation that uses this choice
@@ -1269,68 +1261,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
1269
1261
 
1270
1262
  #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
1271
1263
  /* The output_gamma value is a screen gamma in libpng terminology: it expresses
1272
- * how to decode the output values, not how they are encoded. The values used
1273
- * correspond to the normal numbers used to describe the overall gamma of a
1274
- * computer display system; for example 2.2 for an sRGB conformant system. The
1275
- * values are scaled by 100000 in the _fixed version of the API (so 220000 for
1276
- * sRGB.)
1277
- *
1278
- * The inverse of the value is always used to provide a default for the PNG file
1279
- * encoding if it has no gAMA chunk and if png_set_gamma() has not been called
1280
- * to override the PNG gamma information.
1281
- *
1282
- * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode
1283
- * opaque pixels however pixels with lower alpha values are not encoded,
1284
- * regardless of the output gamma setting.
1285
- *
1286
- * When the standard Porter Duff handling is requested with mode 1 the output
1287
- * encoding is set to be linear and the output_gamma value is only relevant
1288
- * as a default for input data that has no gamma information. The linear output
1289
- * encoding will be overridden if png_set_gamma() is called - the results may be
1290
- * highly unexpected!
1291
- *
1292
- * The following numbers are derived from the sRGB standard and the research
1293
- * behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of
1294
- * 0.45455 (1/2.2) for PNG. The value implicitly includes any viewing
1295
- * correction required to take account of any differences in the color
1296
- * environment of the original scene and the intended display environment; the
1297
- * value expresses how to *decode* the image for display, not how the original
1298
- * data was *encoded*.
1299
- *
1300
- * sRGB provides a peg for the PNG standard by defining a viewing environment.
1301
- * sRGB itself, and earlier TV standards, actually use a more complex transform
1302
- * (a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is
1303
- * limited to simple power laws.) By saying that an image for direct display on
1304
- * an sRGB conformant system should be stored with a gAMA chunk value of 45455
1305
- * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification
1306
- * makes it possible to derive values for other display systems and
1307
- * environments.
1308
- *
1309
- * The Mac value is deduced from the sRGB based on an assumption that the actual
1310
- * extra viewing correction used in early Mac display systems was implemented as
1311
- * a power 1.45 lookup table.
1312
- *
1313
- * Any system where a programmable lookup table is used or where the behavior of
1314
- * the final display device characteristics can be changed requires system
1315
- * specific code to obtain the current characteristic. However this can be
1316
- * difficult and most PNG gamma correction only requires an approximate value.
1317
- *
1318
- * By default, if png_set_alpha_mode() is not called, libpng assumes that all
1319
- * values are unencoded, linear, values and that the output device also has a
1320
- * linear characteristic. This is only very rarely correct - it is invariably
1321
- * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the
1322
- * default if you don't know what the right answer is!
1323
- *
1324
- * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS
1325
- * 10.6) which used a correction table to implement a somewhat lower gamma on an
1326
- * otherwise sRGB system.
1327
- *
1328
- * Both these values are reserved (not simple gamma values) in order to allow
1329
- * more precise correction internally in the future.
1330
- *
1331
- * NOTE: the following values can be passed to either the fixed or floating
1332
- * point APIs, but the floating point API will also accept floating point
1333
- * values.
1264
+ * how to decode the output values, not how they are encoded.
1334
1265
  */
1335
1266
  #define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */
1336
1267
  #define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */
@@ -1953,8 +1884,8 @@ PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
1953
1884
  * It is unlikely that this function works correctly as of 1.6.0 and using it
1954
1885
  * may result either in memory leaks or double free of allocated data.
1955
1886
  */
1956
- PNG_EXPORTA(99, void, png_data_freer, (png_const_structrp png_ptr,
1957
- png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED);
1887
+ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1888
+ png_inforp info_ptr, int freer, png_uint_32 mask));
1958
1889
 
1959
1890
  /* Assignments for png_data_freer */
1960
1891
  #define PNG_DESTROY_WILL_FREE_DATA 1
@@ -1996,6 +1927,8 @@ PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr,
1996
1927
  #else
1997
1928
  /* Fatal error in PNG image of libpng - can't continue */
1998
1929
  PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
1930
+ # define png_error(s1,s2) png_err(s1)
1931
+ # define png_chunk_error(s1,s2) png_err(s1)
1999
1932
  #endif
2000
1933
 
2001
1934
  #ifdef PNG_WARNINGS_SUPPORTED
@@ -2006,6 +1939,9 @@ PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr,
2006
1939
  /* Non-fatal error in libpng, chunk name is prepended to message. */
2007
1940
  PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
2008
1941
  png_const_charp warning_message));
1942
+ #else
1943
+ # define png_warning(s1,s2) ((void)(s1))
1944
+ # define png_chunk_warning(s1,s2) ((void)(s1))
2009
1945
  #endif
2010
1946
 
2011
1947
  #ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -2516,11 +2452,15 @@ PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr,
2516
2452
 
2517
2453
  #ifdef PNG_INFO_IMAGE_SUPPORTED
2518
2454
  /* The "params" pointer is currently not used and is for future expansion. */
2455
+ #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
2519
2456
  PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr,
2520
2457
  int transforms, png_voidp params));
2458
+ #endif
2459
+ #ifdef PNG_WRITE_SUPPORTED
2521
2460
  PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr,
2522
2461
  int transforms, png_voidp params));
2523
2462
  #endif
2463
+ #endif
2524
2464
 
2525
2465
  PNG_EXPORT(180, png_const_charp, png_get_copyright,
2526
2466
  (png_const_structrp png_ptr));