[devel] Imported from libpng-1.5.0beta03.tar

This commit is contained in:
Glenn Randers-Pehrson 2010-02-08 15:36:41 -06:00
parent 3c6df196b5
commit f1eb918dc8
23 changed files with 129 additions and 103 deletions

View File

@ -209,9 +209,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 14.${PNGLIB_RELEASE}.1.5.0beta02
VERSION 14.${PNGLIB_RELEASE}.0
SOVERSION 14
# VERSION 15.${PNGLIB_RELEASE}.1.5.0beta03
VERSION 15.${PNGLIB_RELEASE}.0
SOVERSION 15
CLEAN_DIRECT_OUTPUT 1)
endif()
if(PNG_STATIC)

View File

@ -1,5 +1,5 @@
Installing libpng version 1.5.0beta02 - February 8, 2010
Installing libpng version 1.5.0beta03 - February 8, 2010
On Unix/Linux and similar systems, you can simply type
@ -46,7 +46,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
might be called "libpng-1.5.0beta02" or "libpng14" and "zlib-1.2.3"
might be called "libpng-1.5.0beta03" or "libpng15" and "zlib-1.2.3"
or "zlib123") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta02, February 8, 2010, are
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta03, February 8, 2010, are
Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors

16
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.5.0beta02 - February 8, 2010 (shared library 14.0)
README for libpng version 1.5.0beta03 - February 8, 2010 (shared library 15.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@ -185,9 +185,9 @@ Files in this distribution:
makefile.std => Generic UNIX makefile (cc, creates static
libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng14.so.14.1.5.0beta02)
gcc, creates libpng15.so.15.1.5.0beta03)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng14.so.14.1.5.0beta02)
(gcc, creates libpng15.so.15.1.5.0beta03)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@ -204,17 +204,17 @@ Files in this distribution:
makefile.intel => Intel C/C++ version 4.0 and later
makefile.mingw => Mingw/gcc makefile
makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
makefile.ne14bsd => NetBSD/cc makefile, makes
libpng14.so
makefile.ne15bsd => NetBSD/cc makefile, makes
libpng15.so
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
(gcc, creates libpng14.so.14.1.5.0beta02)
(gcc, creates libpng15.so.15.1.5.0beta03)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng14.so.14.1.5.0beta02)
(gcc, creates libpng15.so.15.1.5.0beta03)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng14.so.14.1.5.0beta02)
(gcc, creates libpng15.so.15.1.5.0beta03)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

View File

@ -23,9 +23,9 @@
# macros --------------------------------------------------------------------
PNGINC = -I/usr/local/include/libpng14
PNGLIB = -L/usr/local/lib -lpng14 # dynamically linked against libpng
#PNGLIB = /usr/local/lib/libpng14.a # statically linked against libpng
PNGINC = -I/usr/local/include/libpng15
PNGLIB = -L/usr/local/lib -lpng15 # dynamically linked against libpng
#PNGLIB = /usr/local/lib/libpng15.a # statically linked against libpng
# or:
#PNGINC = -I../..
#PNGLIB = -L../.. -lpng

View File

@ -26,14 +26,14 @@
# macros --------------------------------------------------------------------
#PNGDIR = /usr/local/lib
#PNGINC = -I/usr/local/include/libpng14
#PNGLIBd = -L$(PNGDIR) -lpng14 # dynamically linked, installed libpng
#PNGLIBs = $(PNGDIR)/libpng14.a # statically linked, installed libpng
#PNGINC = -I/usr/local/include/libpng15
#PNGLIBd = -L$(PNGDIR) -lpng15 # dynamically linked, installed libpng
#PNGLIBs = $(PNGDIR)/libpng15.a # statically linked, installed libpng
# or:
PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds
#PNGDIR = ../libpng
PNGINC = -I$(PNGDIR)
PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng14 # dynamically linked
PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng15 # dynamically linked
PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng
ZDIR = /usr/local/lib

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.5.0beta02 - February 8, 2010
libpng version 1.5.0beta03 - February 8, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.0beta02 - February 8, 2010
libpng versions 0.97, January 1998, through 1.5.0beta03 - February 8, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -899,7 +899,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
As of libpng version 1.5.0beta02, not all possible expansions are supported.
As of libpng version 1.5.0beta03, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@ -3251,7 +3251,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.5.0beta02 are Y2K compliant. It is my belief that earlier
upward through 1.5.0beta03 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "February 8, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta02
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta03
.SH SYNOPSIS
\fI\fB
@ -785,7 +785,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.5.0beta02 - February 8, 2010
libpng version 1.5.0beta03 - February 8, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -796,7 +796,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.0beta02 - February 8, 2010
libpng versions 0.97, January 1998, through 1.5.0beta03 - February 8, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -1684,7 +1684,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
As of libpng version 1.5.0beta02, not all possible expansions are supported.
As of libpng version 1.5.0beta03, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@ -4036,7 +4036,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.5.0beta02 are Y2K compliant. It is my belief that earlier
upward through 1.5.0beta03 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@ -4268,7 +4268,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.5.0beta02 - February 8, 2010:
Libpng version 1.5.0beta03 - February 8, 2010:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -4291,7 +4291,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta02, February 8, 2010, are
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta03, February 8, 2010, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "February 8, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta02
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta03
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP

6
png.c
View File

@ -18,7 +18,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_5_0beta02 Your_png_h_is_not_version_1_5_0beta02;
typedef version_1_5_0beta03 Your_png_h_is_not_version_1_5_0beta03;
/* Version information for C files. This had better match the version
* string defined in png.h.
@ -552,13 +552,13 @@ png_get_copyright(png_structp png_ptr)
#else
#ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
"libpng version 1.5.0beta02 - February 8, 2010" PNG_STRING_NEWLINE \
"libpng version 1.5.0beta03 - February 8, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE);
#else
return ((png_charp) "libpng version 1.5.0beta02 - February 8, 2010\
return ((png_charp) "libpng version 1.5.0beta03 - February 8, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");

38
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.5.0beta02 - February 8, 2010
* libpng version 1.5.0beta03 - February 8, 2010
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.5.0beta02 - February 8, 2010: Glenn
* libpng versions 0.97, January 1998, through 1.5.0beta03 - February 8, 2010: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -169,7 +169,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.5.0beta02, February 8, 2010, are
* libpng versions 1.2.6, August 15, 2004, through 1.5.0beta03, February 8, 2010, are
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@ -287,7 +287,7 @@
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.5.0beta02 are Y2K compliant. It is my belief that earlier
* upward through 1.5.0beta03 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@ -343,12 +343,12 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.5.0beta02"
#define PNG_LIBPNG_VER_STRING "1.5.0beta03"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.5.0beta02 - February 8, 2010\n"
" libpng version 1.5.0beta03 - February 8, 2010\n"
#define PNG_LIBPNG_VER_SONUM 14
#define PNG_LIBPNG_VER_DLLNUM 14
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
@ -358,7 +358,7 @@
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 02
#define PNG_LIBPNG_VER_BUILD 03
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@ -595,7 +595,23 @@ typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
#ifdef PNG_INTERNAL
#include "pnginfo.h"
#else
typedef struct png_info_struct png_info;
/* provide an incomplete structure-type-reference for png_info */
# if 1 /* this works on FreeBSD but is not in the C language. */
/* gcc (GCC) 4.2.1 20070719 [FreeBSD] */
/* also on Sunos running gcc (GCC) 4.3.4 */
typedef struct { ; } png_info;
# endif
# if 0 /* does not work on FreeBSD or SunOS. */
typedef struct png_info;
# endif
# if 0 /* does not work on FreeBSD or SunOS */
struct png_info;
# endif
#endif
typedef png_info FAR * png_infop;
@ -792,7 +808,7 @@ typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef png_structp version_1_5_0beta02;
typedef png_structp version_1_5_0beta03;
typedef png_struct FAR * FAR * png_structpp;

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.5.0beta02 - February 8, 2010
* libpng version 1.5.0beta03 - February 8, 2010
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -701,8 +701,13 @@ png_push_save_buffer(png_structp png_ptr)
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
old_buffer = png_ptr->save_buffer;
png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr,
png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
(png_size_t)new_max);
if (png_ptr->save_buffer == NULL)
{
png_free(png_ptr, old_buffer);
png_error(png_ptr, "Insufficient memory for save_buffer");
}
png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
png_free(png_ptr, old_buffer);
png_ptr->save_buffer_max = new_max;

View File

@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
* libpng version 1.5.0beta02 - February 8, 2010
* libpng version 1.5.0beta03 - February 8, 2010
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -2349,14 +2349,14 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
else
{
png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
png_ptr->gamma_shift][red>>8];
png_ptr->gamma_shift][red>>8];
png_uint_16 green_1 =
png_ptr->gamma_16_to_1[(green&0xff) >>
png_ptr->gamma_shift][green>>8];
png_ptr->gamma_shift][green>>8];
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
png_ptr->gamma_shift][blue>>8];
png_ptr->gamma_shift][blue>>8];
png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1
+ bc*blue_1)>>15);
+ bc*blue_1)>>15);
w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
png_ptr->gamma_shift][gray16 >> 8];
rgb_error |= 1;
@ -2405,7 +2405,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
if (red != green || red != blue)
rgb_error |= 1;
*(dp++) = png_ptr->gamma_from_1
[(rc*red + gc*green + bc*blue)>>15];
[(rc*red + gc*green + bc*blue)>>15];
*(dp++) = *(sp++); /* alpha */
}
}
@ -2454,7 +2454,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
png_ptr->gamma_shift][blue>>8];
png_uint_16 gray16 = (png_uint_16)((rc * red_1
+ gc * green_1 + bc * blue_1)>>15);
+ gc * green_1 + bc * blue_1)>>15);
w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
png_ptr->gamma_shift][gray16 >> 8];
rgb_error |= 1;
@ -2685,7 +2685,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
png_byte p = (png_byte)((*sp >> shift) & 0x0f);
png_byte g = (png_byte)((gamma_table[p |
(p << 4)] >> 4) & 0x0f);
(p << 4)] >> 4) & 0x0f);
*sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
*sp |= (png_byte)(g << shift);
}
@ -2732,13 +2732,10 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp++)
{
if (*sp == trans_color->gray)
{
*sp = (png_byte)background->gray;
}
else
{
*sp = gamma_table[*sp];
}
}
}
else
@ -2748,9 +2745,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp++)
{
if (*sp == trans_color->gray)
{
*sp = (png_byte)background->gray;
}
}
}
break;
@ -2836,8 +2831,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp += 3)
{
if (*sp == trans_color->red &&
*(sp + 1) == trans_color->green &&
*(sp + 2) == trans_color->blue)
*(sp + 1) == trans_color->green &&
*(sp + 2) == trans_color->blue)
{
*sp = (png_byte)background->red;
*(sp + 1) = (png_byte)background->green;
@ -2858,7 +2853,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
if (r == trans_color->red && g == trans_color->green &&
b == trans_color->blue)
b == trans_color->blue)
{
/* Background is already in screen gamma */
*sp = (png_byte)((background->red >> 8) & 0xff);
@ -2893,7 +2888,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
if (r == trans_color->red && g == trans_color->green &&
b == trans_color->blue)
b == trans_color->blue)
{
*sp = (png_byte)((background->red >> 8) & 0xff);
*(sp + 1) = (png_byte)(background->red & 0xff);
@ -2923,9 +2918,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 a = *(sp + 1);
if (a == 0xff)
{
*dp = gamma_table[*sp];
}
else if (a == 0)
{
/* Background is already in screen gamma */
@ -2951,18 +2945,15 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_byte a = *(sp + 1);
if (a == 0xff)
{
*dp = *sp;
}
#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
{
*dp = (png_byte)background->gray;
}
else
{
png_composite(*dp, *sp, a, background_1->gray);
}
#else
*dp = (png_byte)background->gray;
#endif
@ -3022,9 +3013,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
if (a == (png_uint_16)0xffff)
{
png_memcpy(dp, sp, 2);
}
#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
#else
@ -3119,9 +3109,9 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
png_composite(*dp, *sp, a, background->red);
png_composite(*(dp + 1), *(sp + 1), a,
background->green);
background->green);
png_composite(*(dp + 2), *(sp + 2), a,
background->blue);
background->blue);
}
}
}
@ -3171,11 +3161,13 @@ png_do_background(png_row_infop row_info, png_bytep row,
x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
*dp = (png_byte)((x >> 8) & 0xff);
*(dp + 1) = (png_byte)(x & 0xff);
v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
png_composite_16(w, v, a, background_1->green);
x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
*(dp + 2) = (png_byte)((x >> 8) & 0xff);
*(dp + 3) = (png_byte)(x & 0xff);
v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
png_composite_16(w, v, a, background_1->blue);
x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8];
@ -3238,7 +3230,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
row_info->channels--;
row_info->pixel_depth = (png_byte)(row_info->channels *
row_info->bit_depth);
row_info->bit_depth);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
}
}
@ -3295,10 +3287,12 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
@ -3317,10 +3311,13 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
{
*sp = gamma_table[*sp];
sp++;
*sp = gamma_table[*sp];
sp++;
*sp = gamma_table[*sp];
sp++;
sp++;
}
}
@ -3333,10 +3330,12 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
@ -3465,8 +3464,10 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
if ((*sp >> shift) & 0x01)
*dp = 1;
else
*dp = 0;
if (shift == 7)
{
shift = 0;
@ -3541,8 +3542,10 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
if ((int)(*sp) >= num_trans)
*dp-- = 0xff;
else
*dp-- = trans_alpha[*sp];
*dp-- = palette[*sp].blue;
*dp-- = palette[*sp].green;
*dp-- = palette[*sp].red;
@ -3612,8 +3615,10 @@ png_do_expand(png_row_infop row_info, png_bytep row,
{
if ((*sp >> shift) & 0x01)
*dp = 0xff;
else
*dp = 0;
if (shift == 7)
{
shift = 0;

View File

@ -1625,4 +1625,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_5_0beta02 your_png_h_is_not_version_1_5_0beta02;
typedef version_1_5_0beta03 your_png_h_is_not_version_1_5_0beta03;

View File

@ -33,9 +33,9 @@ To use:
This project builds the libpng binaries as follows:
* Win32_DLL_Release\libpng14.dll DLL build
* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
* Win32_DLL_Release\libpng15.dll DLL build
* Win32_DLL_Debug\libpng15d.dll DLL build (debug version)
* Win32_DLL_VB\libpng15vb.dll DLL build for Visual Basic, using stdcall
* Win32_LIB_Release\libpng.lib static build
* Win32_LIB_Debug\libpngd.lib static build (debug version)

View File

@ -59,7 +59,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng14.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng15.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
@ -90,7 +90,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng14d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng15d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
@ -121,10 +121,10 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng14vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng15vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# Begin Special Build Tool
OutDir=.\Win32_DLL_VB
TargetName=libpng14vb
TargetName=libpng15vb
SOURCE="$(InputPath)"
PostBuild_Cmds=echo Deleting $(targetname) import library and export file (Not required for VB projects) del $(outdir)\$(targetname).lib del $(outdir)\$(targetname).exp
# End Special Build Tool

View File

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 Win32_DLL_Release\libpng14.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 Win32_DLL_Release\libpng15.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\Win32_DLL_Release
SOURCE="$(InputPath)"
@ -86,7 +86,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Win32_DLL_Debug\libpng14d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Win32_DLL_Debug\libpng15d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\Win32_DLL_Debug
SOURCE="$(InputPath)"

View File

@ -34,9 +34,9 @@ To use:
This project builds the libpng binaries as follows:
* Win32_DLL_Release\libpng14.dll DLL build
* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
* Win32_DLL_Release\libpng15.dll DLL build
* Win32_DLL_Debug\libpng15d.dll DLL build (debug version)
* Win32_DLL_VB\libpng15vb.dll DLL build for Visual Basic, using stdcall
* Win32_LIB_Release\libpng.lib static build
* Win32_LIB_Debug\libpngd.lib static build (debug version)

View File

@ -30,7 +30,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng14.dll"
OutputFile="$(OutDir)/libpng15.dll"
LinkIncremental="1"
ModuleDefinitionFile="..\..\scripts\pngwin.def"/>
<Tool
@ -78,7 +78,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng14d.dll"
OutputFile="$(OutDir)/libpng15d.dll"
ModuleDefinitionFile="..\..\scripts\pngwin.def"
GenerateDebugInformation="TRUE"/>
<Tool
@ -126,7 +126,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng14vb.dll"
OutputFile="$(OutDir)/libpng15vb.dll"
LinkIncremental="1"/>
<Tool
Name="VCMIDLTool"/>

View File

@ -130,7 +130,7 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
Name="VCLinkerTool"
OutputFile="$(OutDir)/pngtest.exe"
LinkIncremental="1"
IgnoreDefaultLibraryNames="$(IntDir)\libpng14b.lib"
IgnoreDefaultLibraryNames="$(IntDir)\libpng15b.lib"
SubSystem="1"
TargetMachine="1"/>
<Tool

View File

@ -224,9 +224,9 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 14;
DYLIB_CURRENT_VERSION = 14;
FRAMEWORK_VERSION = 1.5.0beta02;
DYLIB_COMPATIBILITY_VERSION = 15;
DYLIB_CURRENT_VERSION = 15;
FRAMEWORK_VERSION = 1.5.0beta03;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;
@ -242,9 +242,9 @@
4FADC24408B4156D00ABE55E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DYLIB_COMPATIBILITY_VERSION = 14;
DYLIB_CURRENT_VERSION = 14;
FRAMEWORK_VERSION = 1.5.0beta02;
DYLIB_COMPATIBILITY_VERSION = 15;
DYLIB_CURRENT_VERSION = 15;
FRAMEWORK_VERSION = 1.5.0beta03;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;