mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Make png_set|get_compression_buffer_size() available even
when PNG_WRITE_SUPPORTED is not enabled. There was no good reason for this restriction, and PNG readers can gain a speed benefit in reading large iCCP chunks by increasing png_ptr->zbuf_size via these functions.
This commit is contained in:
parent
793fedcf57
commit
c87ddbb3ce
4
ANNOUNCE
4
ANNOUNCE
@ -33,6 +33,10 @@ version 1.4.1beta01 [January 7, 2010]
|
|||||||
KNOWNBUG, and libpng.la (Robert Schwebel).
|
KNOWNBUG, and libpng.la (Robert Schwebel).
|
||||||
Revised the makefiles to install the same files and symbolic
|
Revised the makefiles to install the same files and symbolic
|
||||||
links as configure, except for libpng.la and libpng14.la.
|
links as configure, except for libpng.la and libpng14.la.
|
||||||
|
Make png_set|get_compression_buffer_size() available even when
|
||||||
|
PNG_WRITE_SUPPORTED is not enabled.
|
||||||
|
Make png_set|get_compression_buffer_size() available even when
|
||||||
|
PNG_WRITE_SUPPORTED is not enabled.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
2
CHANGES
2
CHANGES
@ -2465,6 +2465,8 @@ version 1.4.1beta01 [January 7, 2010]
|
|||||||
KNOWNBUG, and libpng.la (Robert Schwebel).
|
KNOWNBUG, and libpng.la (Robert Schwebel).
|
||||||
Revised the makefiles to install the same files and symbolic
|
Revised the makefiles to install the same files and symbolic
|
||||||
links as configure, except for libpng.la and libpng14.la.
|
links as configure, except for libpng.la and libpng14.la.
|
||||||
|
Make png_set|get_compression_buffer_size() available even when
|
||||||
|
PNG_WRITE_SUPPORTED is not enabled.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
4
png.c
4
png.c
@ -551,13 +551,13 @@ png_get_copyright(png_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
return ((png_charp) PNG_STRING_NEWLINE \
|
return ((png_charp) PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.4.1beta01 - January 3, 2010" PNG_STRING_NEWLINE \
|
"libpng version 1.4.1beta01 - January 7, 2010" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE);
|
PNG_STRING_NEWLINE);
|
||||||
#else
|
#else
|
||||||
return ((png_charp) "libpng version 1.4.1beta01 - January 3, 2010\
|
return ((png_charp) "libpng version 1.4.1beta01 - January 7, 2010\
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
|
||||||
|
|||||||
14
png.h
14
png.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.4.1beta01 - January 3, 2010
|
* libpng version 1.4.1beta01 - January 7, 2010
|
||||||
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.4.1beta01 - January 3, 2010: Glenn
|
* libpng versions 0.97, January 1998, through 1.4.1beta01 - January 7, 2010: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@ -165,7 +165,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.4.1beta01, January 3, 2010, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.4.1beta01, January 7, 2010, are
|
||||||
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@ -277,7 +277,7 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* January 3, 2010
|
* January 7, 2010
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
@ -341,7 +341,7 @@
|
|||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.4.1beta01"
|
#define PNG_LIBPNG_VER_STRING "1.4.1beta01"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.4.1beta01 - January 3, 2010\n"
|
" libpng version 1.4.1beta01 - January 7, 2010\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 14
|
#define PNG_LIBPNG_VER_SONUM 14
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 14
|
#define PNG_LIBPNG_VER_DLLNUM 14
|
||||||
@ -1380,15 +1380,11 @@ extern PNG_EXPORT(png_structp,png_create_write_struct)
|
|||||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||||
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
|
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
|
||||||
extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
|
extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
|
||||||
PNGARG((png_structp png_ptr));
|
PNGARG((png_structp png_ptr));
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
|
||||||
extern PNG_EXPORT(void,png_set_compression_buffer_size)
|
extern PNG_EXPORT(void,png_set_compression_buffer_size)
|
||||||
PNGARG((png_structp png_ptr, png_size_t size));
|
PNGARG((png_structp png_ptr, png_size_t size));
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
|
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
|
||||||
* match up.
|
* match up.
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.4.1beta01 - January 3, 2010
|
* libpng version 1.4.1beta01 - January 7, 2010
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
2
pngget.c
2
pngget.c
@ -872,13 +872,11 @@ png_get_user_chunk_ptr(png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
|
||||||
png_size_t PNGAPI
|
png_size_t PNGAPI
|
||||||
png_get_compression_buffer_size(png_structp png_ptr)
|
png_get_compression_buffer_size(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_ptr ? png_ptr->zbuf_size : 0L);
|
return (png_ptr ? png_ptr->zbuf_size : 0L);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngpriv.h - private declarations for use inside libpng
|
/* pngpriv.h - private declarations for use inside libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.4.1beta01 - January 3, 2010
|
* libpng version 1.4.1beta01 - January 7, 2010
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
2
pngset.c
2
pngset.c
@ -1093,7 +1093,6 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_compression_buffer_size(png_structp png_ptr,
|
png_set_compression_buffer_size(png_structp png_ptr,
|
||||||
png_size_t size)
|
png_size_t size)
|
||||||
@ -1106,7 +1105,6 @@ png_set_compression_buffer_size(png_structp png_ptr,
|
|||||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
png_ptr->zstream.next_out = png_ptr->zbuf;
|
||||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
|
png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user