[PATCH 6/6] Bump version to 1.46

James Le Cuirot chewi at aura-online.co.uk
Sun Jun 1 15:28:41 PDT 2014


This marks the introduction of the memory reading functions and
PNG_LUMINANCE_ALPHA support. The documentation has been updated
accordingly.
---
 CMakeLists.txt     |  2 +-
 Makefile           | 10 +++++-----
 glpng.htm          | 32 +++++++++++++++++++++++++++++---
 include/GL/glpng.h |  2 +-
 src/glpng.c        |  2 +-
 5 files changed, 37 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6bd9d50..c022e07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ project(glpng C)
 include(GNUInstallDirs)
 
 set(SONAME_VERSION 1)
-set(MINOR_VERSION 45)
+set(MINOR_VERSION 46)
 set(VERSION ${SONAME_VERSION}.${MINOR_VERSION})
 
 set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries")
diff --git a/Makefile b/Makefile
index 0daf632..185ba11 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,12 @@ SHAREDLIBFLAGS=-shared
 DESTDIR=/usr/local
 DOCDIR=$(DESTDIR)/share/doc/libglpng
 
-all: libglpng.a libglpng.so.1.45
+all: libglpng.a libglpng.so.1.46
 
 libglpng.a: glpng.o
 	ar rv $@ $<
 
-libglpng.so.1.45: glpng.o
+libglpng.so.1.46: glpng.o
 	gcc $(CFLAGS) $(SHAREDLIBFLAGS) -Wl,-soname=libglpng.so.1 -Wl,--whole-archive $< -Wl,--no-whole-archive $(LDFLAGS) -o $@
 
 glpng.o: src/glpng.c
@@ -18,7 +18,7 @@ glpng.o: src/glpng.c
 clean:
 	rm glpng.o libglpng.*
 
-install: libglpng.a libglpng.so.1.45
+install: libglpng.a libglpng.so.1.46
 	for i in include include/GL lib; do \
 		install -m 755 -d $(DESTDIR)/$$i; \
 	done
@@ -29,7 +29,7 @@ install: libglpng.a libglpng.so.1.45
 	install -m 644 Example/Stunt.png Example/Test.c $(DOCDIR)/examples
 	install -m 644 include/GL/glpng.h $(DESTDIR)/include/GL
 	install -m 644 libglpng.* $(DESTDIR)/lib
-	ln -s libglpng.so.1.45 $(DESTDIR)/lib/libglpng.so.1
-	ln -s libglpng.so.1.45 $(DESTDIR)/lib/libglpng.so
+	ln -s libglpng.so.1.46 $(DESTDIR)/lib/libglpng.so.1
+	ln -s libglpng.so.1.46 $(DESTDIR)/lib/libglpng.so
 
 .PHONY: clean install
diff --git a/glpng.htm b/glpng.htm
index 3b8d79e..dc21efa 100644
--- a/glpng.htm
+++ b/glpng.htm
@@ -6,8 +6,8 @@
 <title>glpng</title>
 </head>
 <body bgcolor="#FFFFFF">
-<h2 align="center">PNG loader library for OpenGL v1.45
-(10/7/2000)</h2>
+<h2 align="center">PNG loader library for OpenGL v1.46
+(2/6/2014)</h2>
 <p align="center">Ben Wyatt <a href=
 "mailto:ben at wyatt100.freeserve.co.uk">ben at wyatt100.freeserve.co.uk</a></p>
 <h3>Introduction</h3>
@@ -57,8 +57,10 @@ link with glpng.lib or glpngd.lib.</p>
 <ul>
 <li><a href="#pngLoad">pngLoad</a></li>
 <li><a href="#pngLoadF">pngLoadF</a></li>
+<li><a href="#pngLoadMem">pngLoadMem</a></li>
 <li><a href="#pngBind">pngBind</a></li>
 <li><a href="#pngBindF">pngBindF</a></li>
+<li><a href="#pngBindMem">pngBindMem</a></li>
 <li><a href="#pngLoadRaw">pngLoadRaw</a></li>
 <li><a href="#pngLoadRawF">pngLoadRawF</a></li>
 <li><a href="#SetStencil">pngSetStencil</a></li>
@@ -117,6 +119,7 @@ sqrt(r<sup>2</sup>+g<sup>2</sup>+b<sup>2</sup>)</li>
 <li><a name="PNG_CALLBACK">PNG_CALLBACK</a> to use the callback
 function defined by <a href=
 "#pngSetAlphaCallback">pngSetAlphaCallback</a>.</li>
+<li>PNG_LUMINANCE_ALPHA</li>
 </ul>
 </td>
 </tr>
@@ -161,9 +164,27 @@ file.</p>
 </blockquote>
 <pre>
 <a name=
+"pngLoadMem"><strong>success = pngLoadMem(mem, size, mipmap, trans, info)</strong></a>
+</pre>
+<blockquote>
+<table border="1">
+<tr>
+<td valign="top">mem</td>
+<td>Pointer to a buffer</td>
+</tr>
+<tr>
+<td valign="top">size</td>
+<td>Size of the buffer</td>
+</tr>
+</table>
+<p>This is used to load a PNG from a memory buffer.</p>
+</blockquote>
+<pre>
+<a name=
 "pngBind"><strong>id = pngBind(filename, mipmap, trans, info, wrapst, minfilter, magfilter)</strong></a><strong>
 </strong><a name=
 "pngBindF"><strong>id = pngBindF(file, mipmap, trans, info, wrapst, minfilter, magfilter)</strong></a>
+<a name="pngBindMem"><strong>id = pngBindMem(mem, size, mipmap, trans, info, wrapst, minfilter, magfilter)</strong></a>
 </pre>
 <blockquote>
 <table border="1">
@@ -345,7 +366,7 @@ handle) cases.</li>
 <li>Other mipmap generating algorithms could be implemented
 (wavelet stuff?). Source donations are welcome.</li>
 <li>Saving the frame buffer to a PNG file.</li>
-<li>Support for GL_INTENSITY, GL_LUMINANCE_ALPHA and others.</li>
+<li>Support for GL_INTENSITY and others.</li>
 </ul>
 <h3>History</h3>
 <table border="0">
@@ -419,6 +440,11 @@ producing warnings and errors in MSDEV.</td>
 <td valign="top">Fixed bug where the standard orientation flag was
 being ignored in pngLoadRawF (thanks to Mark B. Allan!).</td>
 </tr>
+<tr>
+<td valign="top" nowrap>1.46 (02/06/14)</td>
+<td valign="top">Added memory reading functions and
+PNG_LUMINANCE_ALPHA support. Fixed CVE-2010-1519.</td>
+</tr>
 </table>
 <p>Get the latest version from <a href=
 "http://www.wyatt100.freeserve.co.uk/download.htm">http://www.wyatt100.freeserve.co.uk/download.htm</a></p>
diff --git a/include/GL/glpng.h b/include/GL/glpng.h
index 96e95e9..4af4aaf 100644
--- a/include/GL/glpng.h
+++ b/include/GL/glpng.h
@@ -1,5 +1,5 @@
 /*
- * PNG loader library for OpenGL v1.45 (10/07/00)
+ * PNG loader library for OpenGL v1.46 (02/06/14)
  * by Ben Wyatt ben at wyatt100.freeserve.co.uk
  * Using LibPNG 1.0.2 and ZLib 1.1.3
  *
diff --git a/src/glpng.c b/src/glpng.c
index e19c35d..d78a591 100644
--- a/src/glpng.c
+++ b/src/glpng.c
@@ -1,5 +1,5 @@
 /*
- * PNG loader library for OpenGL v1.45 (10/07/00)
+ * PNG loader library for OpenGL v1.46 (02/06/14)
  * by Ben Wyatt ben at wyatt100.freeserve.co.uk
  * Using LibPNG 1.0.2 and ZLib 1.1.3
  *
-- 
1.9.2



More information about the Games mailing list