cairo 1.15.13-x86-mingw32 → 1.15.14-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS +24 -0
- data/README.rdoc +11 -40
- data/Rakefile +4 -2
- data/ext/cairo/rb_cairo.h +1 -1
- data/ext/cairo/rb_cairo_context.c +35 -3
- data/ext/cairo/rb_cairo_font_options.c +5 -6
- data/ext/cairo/rb_cairo_private.h +2 -2
- data/ext/cairo/rb_cairo_scaled_font.c +11 -2
- data/ext/cairo/rb_cairo_surface.c +89 -48
- data/lib/2.2/cairo.so +0 -0
- data/lib/2.3/cairo.so +0 -0
- data/lib/2.4/cairo.so +0 -0
- data/lib/2.5/cairo.so +0 -0
- data/test/{cairo-test-utils.rb → helper.rb} +4 -5
- data/test/run-test.rb +3 -10
- data/test/test_context.rb +6 -6
- data/test/test_font_extents.rb +1 -1
- data/test/test_font_face.rb +1 -1
- data/test/test_font_options.rb +1 -1
- data/test/test_image_surface.rb +2 -2
- data/test/test_pdf_surface.rb +1 -1
- data/test/test_quartz_image_surface.rb +1 -1
- data/test/test_raster_source_pattern.rb +13 -13
- data/test/test_recording_surface.rb +2 -2
- data/test/test_region.rb +1 -1
- data/test/test_scaled_font.rb +1 -1
- data/test/test_script_device.rb +1 -1
- data/test/test_script_surface.rb +1 -1
- data/test/test_surface.rb +5 -5
- data/test/test_svg_surface.rb +1 -1
- data/test/test_tee_surface.rb +2 -2
- data/test/test_text_cluster.rb +1 -1
- data/test/test_text_extents.rb +1 -1
- data/test/test_text_to_glyphs_data.rb +1 -1
- data/test/test_xml_device.rb +1 -1
- data/test/test_xml_surface.rb +2 -2
- data/vendor/local/bin/fc-cache.exe +0 -0
- data/vendor/local/bin/fc-cat.exe +0 -0
- data/vendor/local/bin/fc-conflist.exe +0 -0
- data/vendor/local/bin/fc-list.exe +0 -0
- data/vendor/local/bin/fc-match.exe +0 -0
- data/vendor/local/bin/fc-pattern.exe +0 -0
- data/vendor/local/bin/fc-query.exe +0 -0
- data/vendor/local/bin/fc-scan.exe +0 -0
- data/vendor/local/bin/fc-validate.exe +0 -0
- data/vendor/local/bin/libcairo-2.dll +0 -0
- data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
- data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
- data/vendor/local/bin/libfontconfig-1.dll +0 -0
- data/vendor/local/bin/libfreetype-6.dll +0 -0
- data/vendor/local/bin/libpixman-1-0.dll +0 -0
- data/vendor/local/bin/libpng-config +1 -1
- data/vendor/local/bin/libpng16-16.dll +0 -0
- data/vendor/local/bin/libpng16-config +1 -1
- data/vendor/local/bin/libxml2-2.dll +0 -0
- data/vendor/local/bin/png-fix-itxt.exe +0 -0
- data/vendor/local/bin/pngfix.exe +0 -0
- data/vendor/local/bin/xmlcatalog.exe +0 -0
- data/vendor/local/bin/xmllint.exe +0 -0
- data/vendor/local/bin/zlib1211.dll +0 -0
- data/vendor/local/include/freetype2/freetype/config/ftconfig.h +82 -3
- data/vendor/local/include/freetype2/freetype/config/ftheader.h +43 -85
- data/vendor/local/include/freetype2/freetype/config/ftoption.h +43 -56
- data/vendor/local/include/freetype2/freetype/config/ftstdlib.h +1 -1
- data/vendor/local/include/freetype2/freetype/freetype.h +185 -85
- data/vendor/local/include/freetype2/freetype/ftadvanc.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftbbox.h +2 -2
- data/vendor/local/include/freetype2/freetype/ftbdf.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftbitmap.h +2 -2
- data/vendor/local/include/freetype2/freetype/ftbzip2.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftcache.h +1 -16
- data/vendor/local/include/freetype2/freetype/ftchapters.h +3 -0
- data/vendor/local/include/freetype2/freetype/ftcid.h +2 -2
- data/vendor/local/include/freetype2/freetype/ftdriver.h +1225 -0
- data/vendor/local/include/freetype2/freetype/fterrdef.h +1 -1
- data/vendor/local/include/freetype2/freetype/fterrors.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftfntfmt.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftgasp.h +6 -1
- data/vendor/local/include/freetype2/freetype/ftglyph.h +3 -3
- data/vendor/local/include/freetype2/freetype/ftgxval.h +5 -5
- data/vendor/local/include/freetype2/freetype/ftgzip.h +4 -1
- data/vendor/local/include/freetype2/freetype/ftimage.h +18 -18
- data/vendor/local/include/freetype2/freetype/ftincrem.h +2 -13
- data/vendor/local/include/freetype2/freetype/ftlcdfil.h +5 -18
- data/vendor/local/include/freetype2/freetype/ftlist.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftlzw.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftmac.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftmm.h +99 -11
- data/vendor/local/include/freetype2/freetype/ftmodapi.h +12 -11
- data/vendor/local/include/freetype2/freetype/ftmoderr.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftotval.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftoutln.h +4 -7
- data/vendor/local/include/freetype2/freetype/ftparams.h +205 -0
- data/vendor/local/include/freetype2/freetype/ftpfr.h +4 -4
- data/vendor/local/include/freetype2/freetype/ftrender.h +2 -2
- data/vendor/local/include/freetype2/freetype/ftsizes.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftsnames.h +8 -42
- data/vendor/local/include/freetype2/freetype/ftstroke.h +6 -6
- data/vendor/local/include/freetype2/freetype/ftsynth.h +1 -1
- data/vendor/local/include/freetype2/freetype/ftsystem.h +1 -1
- data/vendor/local/include/freetype2/freetype/fttrigon.h +1 -1
- data/vendor/local/include/freetype2/freetype/fttypes.h +2 -2
- data/vendor/local/include/freetype2/freetype/ftwinfnt.h +2 -2
- data/vendor/local/include/freetype2/freetype/t1tables.h +10 -1
- data/vendor/local/include/freetype2/freetype/ttnameid.h +2 -2
- data/vendor/local/include/freetype2/freetype/tttables.h +1 -1
- data/vendor/local/include/freetype2/freetype/tttags.h +1 -1
- data/vendor/local/include/freetype2/ft2build.h +1 -1
- data/vendor/local/include/libpng16/png.h +40 -40
- data/vendor/local/include/libpng16/pngconf.h +15 -14
- data/vendor/local/include/libpng16/pnglibconf.h +1 -1
- data/vendor/local/include/png.h +40 -40
- data/vendor/local/include/pngconf.h +15 -14
- data/vendor/local/include/pnglibconf.h +1 -1
- data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
- data/vendor/local/lib/libcairo-gobject.la +1 -1
- data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
- data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
- data/vendor/local/lib/libcairo.a +0 -0
- data/vendor/local/lib/libcairo.dll.a +0 -0
- data/vendor/local/lib/libfontconfig.dll.a +0 -0
- data/vendor/local/lib/libfreetype.a +0 -0
- data/vendor/local/lib/libfreetype.dll.a +0 -0
- data/vendor/local/lib/libfreetype.la +3 -3
- data/vendor/local/lib/libpixman-1.dll.a +0 -0
- data/vendor/local/lib/libpng.a +0 -0
- data/vendor/local/lib/libpng.dll.a +0 -0
- data/vendor/local/lib/libpng.la +2 -2
- data/vendor/local/lib/libpng16.a +0 -0
- data/vendor/local/lib/libpng16.dll.a +0 -0
- data/vendor/local/lib/libpng16.la +2 -2
- data/vendor/local/lib/libxml2.dll.a +0 -0
- data/vendor/local/lib/libz.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/freetype2.pc +2 -2
- data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
- data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
- data/vendor/local/share/aclocal/freetype2.m4 +1 -1
- data/vendor/local/share/license/freetype/README +9 -9
- data/vendor/local/share/license/freetype/README.git +1 -1
- data/vendor/local/share/license/libpng/README +2 -2
- data/vendor/local/share/man/man3/libpng.3 +50 -54
- data/vendor/local/share/man/man3/libpngpf.3 +8 -4
- metadata +9 -14
- data/vendor/local/bin/freetype-config +0 -211
- data/vendor/local/include/freetype2/freetype/ftautoh.h +0 -533
- data/vendor/local/include/freetype2/freetype/ftcffdrv.h +0 -321
- data/vendor/local/include/freetype2/freetype/ftpcfdrv.h +0 -105
- data/vendor/local/include/freetype2/freetype/ftttdrv.h +0 -328
- data/vendor/local/include/freetype2/freetype/ttunpat.h +0 -63
- data/vendor/local/share/man/man1/freetype-config.1 +0 -146
Binary file
|
@@ -17,7 +17,7 @@ old_library='libcairo-gobject.a'
|
|
17
17
|
inherited_linker_flags=' -pthread'
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -R/home/vagrant/ruby-gnome2/glib2/vendor/local/lib -L/home/vagrant/rcairo/vendor/local/lib /home/vagrant/rcairo/vendor/local/lib/libcairo.la -lpthread /home/vagrant/rcairo/vendor/local/lib/libpixman-1.la /home/vagrant/rcairo/vendor/local/lib/libfontconfig.la /home/vagrant/rcairo/vendor/local/lib/libxml2.la /home/vagrant/rcairo/vendor/local/lib/libfreetype.la /home/vagrant/rcairo/vendor/local/lib/libpng16.la -lgdi32 -lmsimg32 -lz -L/home/vagrant/ruby-gnome2/glib2/vendor/local/lib /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgobject-2.0.la -L/home/vagrant/
|
20
|
+
dependency_libs=' -R/home/vagrant/ruby-gnome2/glib2/vendor/local/lib -L/home/vagrant/rcairo/vendor/local/lib /home/vagrant/rcairo/vendor/local/lib/libcairo.la -lpthread /home/vagrant/rcairo/vendor/local/lib/libpixman-1.la /home/vagrant/rcairo/vendor/local/lib/libfontconfig.la /home/vagrant/rcairo/vendor/local/lib/libxml2.la /home/vagrant/rcairo/vendor/local/lib/libfreetype.la /home/vagrant/rcairo/vendor/local/lib/libpng16.la -lgdi32 -lmsimg32 -lz -L/home/vagrant/ruby-gnome2/glib2/vendor/local/lib /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgobject-2.0.la -L/home/vagrant/ruby-gnome2/glib2/vendor/local/lib/../lib /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/../lib/libffi.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libglib-2.0.la -lws2_32 -lole32 -lwinmm -lshlwapi /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libpcre.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libintl.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libiconv.la'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
Binary file
|
Binary file
|
data/vendor/local/lib/libcairo.a
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -23,9 +23,9 @@ dependency_libs=' -L/home/vagrant/rcairo/vendor/local/lib /home/vagrant/rcairo/v
|
|
23
23
|
weak_library_names=''
|
24
24
|
|
25
25
|
# Version information for libfreetype.
|
26
|
-
current=
|
27
|
-
age=
|
28
|
-
revision=
|
26
|
+
current=22
|
27
|
+
age=16
|
28
|
+
revision=1
|
29
29
|
|
30
30
|
# Is this an already installed library?
|
31
31
|
installed=yes
|
Binary file
|
data/vendor/local/lib/libpng.a
CHANGED
Binary file
|
Binary file
|
data/vendor/local/lib/libpng.la
CHANGED
data/vendor/local/lib/libpng16.a
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/vendor/local/lib/libz.dll.a
CHANGED
Binary file
|
@@ -4,9 +4,9 @@ libdir=/home/vagrant/rcairo/vendor/local/lib
|
|
4
4
|
includedir=/home/vagrant/rcairo/vendor/local/include
|
5
5
|
|
6
6
|
Name: FreeType 2
|
7
|
-
URL:
|
7
|
+
URL: https://freetype.org
|
8
8
|
Description: A free, high-quality, and portable font engine.
|
9
|
-
Version:
|
9
|
+
Version: 22.1.16
|
10
10
|
Requires:
|
11
11
|
Requires.private: zlib, libpng
|
12
12
|
Libs: -L${libdir} -lfreetype
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Configure paths for FreeType2
|
2
2
|
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
|
3
3
|
#
|
4
|
-
# Copyright 2001-
|
4
|
+
# Copyright 2001-2018 by
|
5
5
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
6
6
|
#
|
7
7
|
# This file is part of the FreeType project, and may only be used, modified,
|
@@ -1,7 +1,7 @@
|
|
1
|
-
FreeType 2.
|
1
|
+
FreeType 2.9.1
|
2
2
|
==============
|
3
3
|
|
4
|
-
Homepage:
|
4
|
+
Homepage: https://www.freetype.org
|
5
5
|
|
6
6
|
FreeType is a freely available software library to render fonts.
|
7
7
|
|
@@ -20,17 +20,17 @@
|
|
20
20
|
documentation is available as a separate package from our sites. Go
|
21
21
|
to
|
22
22
|
|
23
|
-
|
23
|
+
https://download.savannah.gnu.org/releases/freetype/
|
24
24
|
|
25
25
|
and download one of the following files.
|
26
26
|
|
27
|
-
freetype-doc-2.
|
28
|
-
freetype-doc-2.
|
29
|
-
|
27
|
+
freetype-doc-2.9.1.tar.bz2
|
28
|
+
freetype-doc-2.9.1.tar.gz
|
29
|
+
ftdoc291.zip
|
30
30
|
|
31
31
|
To view the documentation online, go to
|
32
32
|
|
33
|
-
|
33
|
+
https://www.freetype.org/freetype2/documentation.html
|
34
34
|
|
35
35
|
|
36
36
|
Mailing Lists
|
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
The lists are moderated; see
|
48
48
|
|
49
|
-
|
49
|
+
https://www.freetype.org/contact.html
|
50
50
|
|
51
51
|
how to subscribe.
|
52
52
|
|
@@ -71,7 +71,7 @@
|
|
71
71
|
|
72
72
|
----------------------------------------------------------------------
|
73
73
|
|
74
|
-
Copyright 2006-
|
74
|
+
Copyright 2006-2018 by
|
75
75
|
David Turner, Robert Wilhelm, and Werner Lemberg.
|
76
76
|
|
77
77
|
This file is part of the FreeType project, and may only be used,
|
@@ -37,7 +37,7 @@ repository.
|
|
37
37
|
|
38
38
|
----------------------------------------------------------------------
|
39
39
|
|
40
|
-
Copyright 2005-
|
40
|
+
Copyright 2005-2018 by
|
41
41
|
David Turner, Robert Wilhelm, and Werner Lemberg.
|
42
42
|
|
43
43
|
This file is part of the FreeType project, and may only be used,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
README for libpng version 1.6.
|
1
|
+
README for libpng version 1.6.35 - July 15, 2018 (shared library 16.0)
|
2
2
|
See the note about version numbers near the top of png.h
|
3
3
|
|
4
4
|
See INSTALL for instructions on how to install libpng.
|
@@ -118,7 +118,7 @@ development group.
|
|
118
118
|
Send comments/corrections/commendations to png-mng-implement at
|
119
119
|
lists.sourceforge.net (subscription required; visit
|
120
120
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
121
|
-
to subscribe)
|
121
|
+
to subscribe).
|
122
122
|
|
123
123
|
You can't reach Guy, the original libpng author, at the addresses
|
124
124
|
given in previous versions of this document. He and Andreas will
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.TH LIBPNG 3 "
|
1
|
+
.TH LIBPNG 3 "July 15, 2018"
|
2
2
|
.SH NAME
|
3
|
-
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.
|
3
|
+
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.35
|
4
4
|
.SH SYNOPSIS
|
5
5
|
\fB
|
6
6
|
#include <png.h>\fP
|
@@ -225,7 +225,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.34
|
|
225
225
|
|
226
226
|
\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE* \fIfile\fP\fB);\fP
|
227
227
|
|
228
|
-
\fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB,
|
228
|
+
\fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB, size_t \fIsize\fP\fB);\fP
|
229
229
|
|
230
230
|
\fBint png_image_finish_read (png_imagep \fP\fIimage\fP\fB, png_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap\fP\fB);\fP
|
231
231
|
|
@@ -237,7 +237,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.34
|
|
237
237
|
|
238
238
|
\fBint png_image_write_to_stdio (png_imagep \fP\fIimage\fP\fB, FILE \fP\fI*file\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap)\fP\fB);\fP
|
239
239
|
|
240
|
-
\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB,
|
240
|
+
\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, size_t \fIpng_info_struct_size\fP\fB);\fP
|
241
241
|
|
242
242
|
\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP
|
243
243
|
|
@@ -251,9 +251,9 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.34
|
|
251
251
|
|
252
252
|
\fBpng_uint_32 png_permit_mng_features (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fImng_features_permitted\fP\fB);\fP
|
253
253
|
|
254
|
-
\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB,
|
254
|
+
\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, size_t \fIbuffer_size\fP\fB);\fP
|
255
255
|
|
256
|
-
\
|
256
|
+
\fBsize_t png_process_data_pause \fP\fI(png_structp\fP\fB, int \fIsave\fP\fB);\fP
|
257
257
|
|
258
258
|
\fBpng_uint_32 png_process_data_skip \fI(png_structp\fP\fB);\fP
|
259
259
|
|
@@ -475,15 +475,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.34
|
|
475
475
|
|
476
476
|
\fBvoid png_set_write_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIwrite_user_transform_fn\fP\fB);\fP
|
477
477
|
|
478
|
-
\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB,
|
478
|
+
\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, size_t \fP\fIstart\fP\fB, size_t \fInum_to_check\fP\fB);\fP
|
479
479
|
|
480
480
|
\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP
|
481
481
|
|
482
482
|
\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP
|
483
483
|
|
484
|
-
\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB,
|
484
|
+
\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, size_t \fIlength\fP\fB);\fP
|
485
485
|
|
486
|
-
\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB,
|
486
|
+
\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, size_t \fIlength\fP\fB);\fP
|
487
487
|
|
488
488
|
\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP
|
489
489
|
|
@@ -518,10 +518,9 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|
518
518
|
.SH LIBPNG.TXT
|
519
519
|
libpng-manual.txt - A description on how to use and modify libpng
|
520
520
|
|
521
|
-
libpng version 1.6.
|
521
|
+
libpng version 1.6.35 - July 15, 2018
|
522
522
|
Updated and distributed by Glenn Randers-Pehrson
|
523
|
-
|
524
|
-
Copyright (c) 1998-2017 Glenn Randers-Pehrson
|
523
|
+
Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
525
524
|
|
526
525
|
This document is released under the libpng license.
|
527
526
|
For conditions of distribution and use, see the disclaimer
|
@@ -529,7 +528,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|
529
528
|
|
530
529
|
Based on:
|
531
530
|
|
532
|
-
libpng versions 0.97, January 1998, through 1.6.
|
531
|
+
libpng versions 0.97, January 1998, through 1.6.35 - July 15, 2018
|
533
532
|
Updated and distributed by Glenn Randers-Pehrson
|
534
533
|
Copyright (c) 1998-2017 Glenn Randers-Pehrson
|
535
534
|
|
@@ -866,18 +865,18 @@ Customizing libpng.
|
|
866
865
|
FILE *fp = fopen(file_name, "rb");
|
867
866
|
if (!fp)
|
868
867
|
{
|
869
|
-
return
|
868
|
+
return ERROR;
|
870
869
|
}
|
871
870
|
|
872
871
|
if (fread(header, 1, number, fp) != number)
|
873
872
|
{
|
874
|
-
return
|
873
|
+
return ERROR;
|
875
874
|
}
|
876
875
|
|
877
876
|
is_png = !png_sig_cmp(header, 0, number);
|
878
877
|
if (!is_png)
|
879
878
|
{
|
880
|
-
return
|
879
|
+
return NOT_PNG;
|
881
880
|
}
|
882
881
|
|
883
882
|
Next, png_struct and png_info need to be allocated and initialized. In
|
@@ -896,7 +895,7 @@ create the structure, so your application should check for that.
|
|
896
895
|
user_error_fn, user_warning_fn);
|
897
896
|
|
898
897
|
if (!png_ptr)
|
899
|
-
return
|
898
|
+
return ERROR;
|
900
899
|
|
901
900
|
png_infop info_ptr = png_create_info_struct(png_ptr);
|
902
901
|
|
@@ -904,7 +903,7 @@ create the structure, so your application should check for that.
|
|
904
903
|
{
|
905
904
|
png_destroy_read_struct(&png_ptr,
|
906
905
|
(png_infopp)NULL, (png_infopp)NULL);
|
907
|
-
return
|
906
|
+
return ERROR;
|
908
907
|
}
|
909
908
|
|
910
909
|
If you want to use your own memory allocation routines,
|
@@ -939,7 +938,7 @@ free any memory.
|
|
939
938
|
png_destroy_read_struct(&png_ptr, &info_ptr,
|
940
939
|
&end_info);
|
941
940
|
fclose(fp);
|
942
|
-
return
|
941
|
+
return ERROR;
|
943
942
|
}
|
944
943
|
|
945
944
|
Pass (png_infopp)NULL instead of &end_info if you didn't create
|
@@ -1021,7 +1020,7 @@ input stream. You must supply the function
|
|
1021
1020
|
|
1022
1021
|
png_byte name[5];
|
1023
1022
|
png_byte *data;
|
1024
|
-
|
1023
|
+
size_t size;
|
1025
1024
|
|
1026
1025
|
/* Note that libpng has already taken care of
|
1027
1026
|
the CRC handling */
|
@@ -1030,9 +1029,9 @@ input stream. You must supply the function
|
|
1030
1029
|
unknown chunk structure, process it, and return one
|
1031
1030
|
of the following: */
|
1032
1031
|
|
1033
|
-
return
|
1034
|
-
return
|
1035
|
-
return
|
1032
|
+
return \-n; /* chunk had an error */
|
1033
|
+
return 0; /* did not recognize */
|
1034
|
+
return n; /* success */
|
1036
1035
|
}
|
1037
1036
|
|
1038
1037
|
(You can give your function another name that you like instead of
|
@@ -1521,7 +1520,7 @@ chunks to be assumed to be encoded using sRGB.
|
|
1521
1520
|
png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
|
1522
1521
|
|
1523
1522
|
In this case the output is assumed to be something like an sRGB conformant
|
1524
|
-
display
|
1523
|
+
display preceded by a power-law lookup table of power 1.45. This is how
|
1525
1524
|
early Mac systems behaved.
|
1526
1525
|
|
1527
1526
|
png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR);
|
@@ -1573,7 +1572,7 @@ faster.)
|
|
1573
1572
|
|
1574
1573
|
When the default gamma of PNG files doesn't match the output gamma.
|
1575
1574
|
If you have PNG files with no gamma information png_set_alpha_mode allows
|
1576
|
-
you to provide a default gamma, but it also sets the
|
1575
|
+
you to provide a default gamma, but it also sets the output gamma to the
|
1577
1576
|
matching value. If you know your PNG files have a gamma that doesn't
|
1578
1577
|
match the output you can take advantage of the fact that
|
1579
1578
|
png_set_alpha_mode always sets the output gamma but only sets the PNG
|
@@ -2927,7 +2926,7 @@ separate.
|
|
2927
2926
|
{
|
2928
2927
|
png_destroy_read_struct(&png_ptr, &info_ptr,
|
2929
2928
|
(png_infopp)NULL);
|
2930
|
-
return
|
2929
|
+
return ERROR;
|
2931
2930
|
}
|
2932
2931
|
|
2933
2932
|
png_read_end(png_ptr, end_info);
|
@@ -3067,7 +3066,7 @@ png_infop info_ptr;
|
|
3067
3066
|
user_error_fn, user_warning_fn);
|
3068
3067
|
|
3069
3068
|
if (!png_ptr)
|
3070
|
-
return
|
3069
|
+
return ERROR;
|
3071
3070
|
|
3072
3071
|
info_ptr = png_create_info_struct(png_ptr);
|
3073
3072
|
|
@@ -3075,14 +3074,14 @@ png_infop info_ptr;
|
|
3075
3074
|
{
|
3076
3075
|
png_destroy_read_struct(&png_ptr,
|
3077
3076
|
(png_infopp)NULL, (png_infopp)NULL);
|
3078
|
-
return
|
3077
|
+
return ERROR;
|
3079
3078
|
}
|
3080
3079
|
|
3081
3080
|
if (setjmp(png_jmpbuf(png_ptr)))
|
3082
3081
|
{
|
3083
3082
|
png_destroy_read_struct(&png_ptr, &info_ptr,
|
3084
3083
|
(png_infopp)NULL);
|
3085
|
-
return
|
3084
|
+
return ERROR;
|
3086
3085
|
}
|
3087
3086
|
|
3088
3087
|
/* This one's new. You can provide functions
|
@@ -3116,7 +3115,7 @@ png_infop info_ptr;
|
|
3116
3115
|
{
|
3117
3116
|
png_destroy_read_struct(&png_ptr, &info_ptr,
|
3118
3117
|
(png_infopp)NULL);
|
3119
|
-
return
|
3118
|
+
return ERROR;
|
3120
3119
|
}
|
3121
3120
|
|
3122
3121
|
/* This one's new also. Simply give it a chunk
|
@@ -3260,7 +3259,7 @@ custom writing functions. See the discussion under Customizing libpng.
|
|
3260
3259
|
FILE *fp = fopen(file_name, "wb");
|
3261
3260
|
|
3262
3261
|
if (!fp)
|
3263
|
-
return
|
3262
|
+
return ERROR;
|
3264
3263
|
|
3265
3264
|
Next, png_struct and png_info need to be allocated and initialized.
|
3266
3265
|
As these can be both relatively large, you may not want to store these
|
@@ -3275,14 +3274,14 @@ both "png_ptr"; you can call them anything you like, such as
|
|
3275
3274
|
user_error_fn, user_warning_fn);
|
3276
3275
|
|
3277
3276
|
if (!png_ptr)
|
3278
|
-
return
|
3277
|
+
return ERROR;
|
3279
3278
|
|
3280
3279
|
png_infop info_ptr = png_create_info_struct(png_ptr);
|
3281
3280
|
if (!info_ptr)
|
3282
3281
|
{
|
3283
3282
|
png_destroy_write_struct(&png_ptr,
|
3284
3283
|
(png_infopp)NULL);
|
3285
|
-
return
|
3284
|
+
return ERROR;
|
3286
3285
|
}
|
3287
3286
|
|
3288
3287
|
If you want to use your own memory allocation routines,
|
@@ -3309,7 +3308,7 @@ section below for more information on the libpng error handling.
|
|
3309
3308
|
{
|
3310
3309
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
3311
3310
|
fclose(fp);
|
3312
|
-
return
|
3311
|
+
return ERROR;
|
3313
3312
|
}
|
3314
3313
|
...
|
3315
3314
|
return;
|
@@ -4297,7 +4296,7 @@ in-memory bitmap formats or to be written from the same formats. If these
|
|
4297
4296
|
formats do not accommodate your needs then you can, and should, use the more
|
4298
4297
|
sophisticated APIs above - these support a wide variety of in-memory formats
|
4299
4298
|
and a wide variety of sophisticated transformations to those formats as well
|
4300
|
-
as a wide variety of APIs to manipulate
|
4299
|
+
as a wide variety of APIs to manipulate ancillary information.
|
4301
4300
|
|
4302
4301
|
To read a PNG file using the simplified API:
|
4303
4302
|
|
@@ -4620,7 +4619,7 @@ READ APIs
|
|
4620
4619
|
The PNG header is read from the stdio FILE object.
|
4621
4620
|
|
4622
4621
|
int png_image_begin_read_from_memory(png_imagep image,
|
4623
|
-
png_const_voidp memory,
|
4622
|
+
png_const_voidp memory, size_t size)
|
4624
4623
|
|
4625
4624
|
The PNG header is read from the given memory buffer.
|
4626
4625
|
|
@@ -4773,10 +4772,10 @@ png_get_io_ptr(). For example:
|
|
4773
4772
|
The replacement I/O functions must have prototypes as follows:
|
4774
4773
|
|
4775
4774
|
void user_read_data(png_structp png_ptr,
|
4776
|
-
png_bytep data,
|
4775
|
+
png_bytep data, size_t length);
|
4777
4776
|
|
4778
4777
|
void user_write_data(png_structp png_ptr,
|
4779
|
-
png_bytep data,
|
4778
|
+
png_bytep data, size_t length);
|
4780
4779
|
|
4781
4780
|
void user_flush_data(png_structp png_ptr);
|
4782
4781
|
|
@@ -5302,7 +5301,7 @@ behavior in case the application runs out of memory part-way through
|
|
5302
5301
|
the process.
|
5303
5302
|
|
5304
5303
|
We changed the prototypes of png_get_compression_buffer_size() and
|
5305
|
-
png_set_compression_buffer_size() to work with
|
5304
|
+
png_set_compression_buffer_size() to work with size_t instead of
|
5306
5305
|
png_uint_32.
|
5307
5306
|
|
5308
5307
|
Support for numbered error messages was removed by default, since we
|
@@ -5773,9 +5772,8 @@ or you can browse it with a web browser at
|
|
5773
5772
|
https://github.com/glennrp/libpng or
|
5774
5773
|
https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
|
5775
5774
|
|
5776
|
-
Patches can be sent to
|
5777
|
-
|
5778
|
-
the libpng bug tracker at
|
5775
|
+
Patches can be sent to png-mng-implement at lists.sourceforge.net or
|
5776
|
+
uploaded to the libpng bug tracker at
|
5779
5777
|
|
5780
5778
|
https://libpng.sourceforge.io/
|
5781
5779
|
|
@@ -5784,9 +5782,9 @@ or as a "pull request" to
|
|
5784
5782
|
https://github.com/glennrp/libpng/pulls
|
5785
5783
|
|
5786
5784
|
We also accept patches built from the tar or zip distributions, and
|
5787
|
-
simple verbal
|
5785
|
+
simple verbal descriptions of bug fixes, reported either to the
|
5788
5786
|
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
|
5789
|
-
mailing list, as github issues
|
5787
|
+
mailing list, as github issues.
|
5790
5788
|
|
5791
5789
|
.SH XV. Coding style
|
5792
5790
|
|
@@ -5807,7 +5805,7 @@ braces on separate lines:
|
|
5807
5805
|
The braces can be omitted from simple one-line actions:
|
5808
5806
|
|
5809
5807
|
if (condition)
|
5810
|
-
return
|
5808
|
+
return 0;
|
5811
5809
|
|
5812
5810
|
We use 3-space indentation, except for continued statements which
|
5813
5811
|
are usually indented the same as the first line of the statement
|
@@ -5932,7 +5930,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
|
|
5932
5930
|
an official declaration.
|
5933
5931
|
|
5934
5932
|
This is your unofficial assurance that libpng from version 0.71 and
|
5935
|
-
upward through 1.6.
|
5933
|
+
upward through 1.6.35 are Y2K compliant. It is my belief that earlier
|
5936
5934
|
versions were also Y2K compliant.
|
5937
5935
|
|
5938
5936
|
Libpng only has two year fields. One is a 2-byte unsigned integer
|
@@ -6034,7 +6032,7 @@ the first widely used release:
|
|
6034
6032
|
...
|
6035
6033
|
1.5.30 15 10530 15.so.15.30[.0]
|
6036
6034
|
...
|
6037
|
-
1.6.
|
6035
|
+
1.6.35 16 10635 16.so.16.35[.0]
|
6038
6036
|
|
6039
6037
|
Henceforth the source version will match the shared-library minor
|
6040
6038
|
and patch numbers; the shared-library major version number will be
|
@@ -6090,9 +6088,9 @@ possible without all of you.
|
|
6090
6088
|
|
6091
6089
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
6092
6090
|
|
6093
|
-
Libpng version 1.6.
|
6091
|
+
Libpng version 1.6.35 - July 15, 2018:
|
6094
6092
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
6095
|
-
|
6093
|
+
Maintained by Glenn Randers-Pehrson.
|
6096
6094
|
|
6097
6095
|
Supported by the PNG development group
|
6098
6096
|
.br
|
@@ -6115,8 +6113,8 @@ this sentence.
|
|
6115
6113
|
|
6116
6114
|
This code is released under the libpng license.
|
6117
6115
|
|
6118
|
-
libpng versions 1.0.7, July 1, 2000 through 1.6.
|
6119
|
-
Copyright (c) 2000-2002, 2004, 2006-
|
6116
|
+
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
|
6117
|
+
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
6120
6118
|
derived from libpng-1.0.6, and are distributed according to the same
|
6121
6119
|
disclaimer and license as libpng-1.0.6 with the following individuals
|
6122
6120
|
added to the list of Contributing Authors:
|
@@ -6242,8 +6240,6 @@ Also, the PNG logo (in PNG format, of course) is supplied in the
|
|
6242
6240
|
files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
|
6243
6241
|
|
6244
6242
|
Glenn Randers-Pehrson
|
6245
|
-
|
6246
|
-
September 29, 2017
|
6243
|
+
July 15, 2018
|
6247
6244
|
|
6248
6245
|
.\" end of man page
|
6249
|
-
|