[master] Fixed incorrect #ifdef in pngset.c
PNG_UNKNOWN_CHUNKS_SUPPORTED should be PNG_HANDLE_AS_UNKNOWN_SUPPORTED
This commit is contained in:
parent
339416b38b
commit
a08d95b971
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.2.40beta01 - August 13, 2009
|
Libpng 1.2.40beta01 - August 20, 2009
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -42,8 +42,9 @@ Other information:
|
|||||||
|
|
||||||
Changes since the last public release (1.2.39):
|
Changes since the last public release (1.2.39):
|
||||||
|
|
||||||
version 1.2.40beta01 [August 13, 2009]
|
version 1.2.40beta01 [August 20, 2009]
|
||||||
Removed an extra png_debug() recently added to png_write_find_filter().
|
Removed an extra png_debug() recently added to png_write_find_filter().
|
||||||
|
Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
|
||||||
|
3
CHANGES
3
CHANGES
@ -2459,8 +2459,9 @@ version 1.2.39c01 [August 6, 2009]
|
|||||||
version 1.2.39 and 1.0.48 [August 13, 2009]
|
version 1.2.39 and 1.0.48 [August 13, 2009]
|
||||||
No changes.
|
No changes.
|
||||||
|
|
||||||
version 1.2.40beta01 [August 13, 2009]
|
version 1.2.40beta01 [August 20, 2009]
|
||||||
Removed an extra png_debug() recently added to png_write_find_filter().
|
Removed an extra png_debug() recently added to png_write_find_filter().
|
||||||
|
Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.
|
||||||
|
|
||||||
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
|
||||||
|
30
pngset.c
30
pngset.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.2.39 [August 13, 2009]
|
* Last changed in libpng 1.2.40 [August 20, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 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.)
|
||||||
@ -25,6 +25,7 @@ void PNGAPI
|
|||||||
png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
|
png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "bKGD");
|
png_debug1(1, "in %s storage function", "bKGD");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
|
|||||||
double green_x, double green_y, double blue_x, double blue_y)
|
double green_x, double green_y, double blue_x, double blue_y)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "cHRM");
|
png_debug1(1, "in %s storage function", "cHRM");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -74,6 +76,7 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_fixed_point blue_x, png_fixed_point blue_y)
|
png_fixed_point blue_x, png_fixed_point blue_y)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "cHRM fixed");
|
png_debug1(1, "in %s storage function", "cHRM fixed");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -112,7 +115,9 @@ void PNGAPI
|
|||||||
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
|
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
|
||||||
{
|
{
|
||||||
double png_gamma;
|
double png_gamma;
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "gAMA");
|
png_debug1(1, "in %s storage function", "gAMA");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -140,6 +145,7 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
|
|||||||
png_fixed_point png_gamma;
|
png_fixed_point png_gamma;
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "gAMA");
|
png_debug1(1, "in %s storage function", "gAMA");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -177,8 +183,10 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "hIST");
|
png_debug1(1, "in %s storage function", "hIST");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (info_ptr->num_palette == 0 || info_ptr->num_palette
|
if (info_ptr->num_palette == 0 || info_ptr->num_palette
|
||||||
> PNG_MAX_PALETTE_LENGTH)
|
> PNG_MAX_PALETTE_LENGTH)
|
||||||
{
|
{
|
||||||
@ -221,6 +229,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
|
|||||||
int filter_type)
|
int filter_type)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "IHDR");
|
png_debug1(1, "in %s storage function", "IHDR");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -328,6 +337,7 @@ png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_int_32 offset_x, png_int_32 offset_y, int unit_type)
|
png_int_32 offset_x, png_int_32 offset_y, int unit_type)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "oFFs");
|
png_debug1(1, "in %s storage function", "oFFs");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -348,6 +358,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "pCAL");
|
png_debug1(1, "in %s storage function", "pCAL");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -417,6 +428,7 @@ png_set_sCAL(png_structp png_ptr, png_infop info_ptr,
|
|||||||
int unit, double width, double height)
|
int unit, double width, double height)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "sCAL");
|
png_debug1(1, "in %s storage function", "sCAL");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -435,6 +447,7 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_uint_32 length;
|
png_uint_32 length;
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "sCAL");
|
png_debug1(1, "in %s storage function", "sCAL");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -480,6 +493,7 @@ png_set_pHYs(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_uint_32 res_x, png_uint_32 res_y, int unit_type)
|
png_uint_32 res_x, png_uint_32 res_y, int unit_type)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "pHYs");
|
png_debug1(1, "in %s storage function", "pHYs");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -496,6 +510,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
|
|||||||
{
|
{
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "PLTE");
|
png_debug1(1, "in %s storage function", "PLTE");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -546,6 +561,7 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_color_8p sig_bit)
|
png_color_8p sig_bit)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "sBIT");
|
png_debug1(1, "in %s storage function", "sBIT");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -559,6 +575,7 @@ void PNGAPI
|
|||||||
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
|
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "sRGB");
|
png_debug1(1, "in %s storage function", "sRGB");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -586,6 +603,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
|
|||||||
int_green_y, int_blue_x, int_blue_y;
|
int_green_y, int_blue_x, int_blue_y;
|
||||||
#endif
|
#endif
|
||||||
png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM");
|
png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -655,6 +673,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_uint_32 length;
|
png_uint_32 length;
|
||||||
|
|
||||||
png_debug1(1, "in %s storage function", "iCCP");
|
png_debug1(1, "in %s storage function", "iCCP");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)
|
if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -869,6 +888,7 @@ void PNGAPI
|
|||||||
png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
|
png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "tIME");
|
png_debug1(1, "in %s storage function", "tIME");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL ||
|
if (png_ptr == NULL || info_ptr == NULL ||
|
||||||
(png_ptr->mode & PNG_WROTE_tIME))
|
(png_ptr->mode & PNG_WROTE_tIME))
|
||||||
return;
|
return;
|
||||||
@ -884,6 +904,7 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_bytep trans, int num_trans, png_color_16p trans_values)
|
png_bytep trans, int num_trans, png_color_16p trans_values)
|
||||||
{
|
{
|
||||||
png_debug1(1, "in %s storage function", "tRNS");
|
png_debug1(1, "in %s storage function", "tRNS");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1008,7 +1029,7 @@ png_set_sPLT(png_structp png_ptr,
|
|||||||
}
|
}
|
||||||
#endif /* PNG_sPLT_SUPPORTED */
|
#endif /* PNG_sPLT_SUPPORTED */
|
||||||
|
|
||||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_unknown_chunks(png_structp png_ptr,
|
png_set_unknown_chunks(png_structp png_ptr,
|
||||||
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
|
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
|
||||||
@ -1088,7 +1109,9 @@ png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
|
|||||||
{
|
{
|
||||||
/* This function is deprecated in favor of png_permit_mng_features()
|
/* This function is deprecated in favor of png_permit_mng_features()
|
||||||
and will be removed from libpng-1.3.0 */
|
and will be removed from libpng-1.3.0 */
|
||||||
|
|
||||||
png_debug(1, "in png_permit_empty_plte, DEPRECATED.");
|
png_debug(1, "in png_permit_empty_plte, DEPRECATED.");
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
png_ptr->mng_features_permitted = (png_byte)
|
png_ptr->mng_features_permitted = (png_byte)
|
||||||
@ -1103,6 +1126,7 @@ png_uint_32 PNGAPI
|
|||||||
png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
|
png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_permit_mng_features");
|
png_debug(1, "in png_permit_mng_features");
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return (png_uint_32)0;
|
return (png_uint_32)0;
|
||||||
png_ptr->mng_features_permitted =
|
png_ptr->mng_features_permitted =
|
||||||
@ -1164,8 +1188,10 @@ png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
|
|||||||
png_user_chunk_ptr read_user_chunk_fn)
|
png_user_chunk_ptr read_user_chunk_fn)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_read_user_chunk_fn");
|
png_debug(1, "in png_set_read_user_chunk_fn");
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
png_ptr->read_user_chunk_fn = read_user_chunk_fn;
|
png_ptr->read_user_chunk_fn = read_user_chunk_fn;
|
||||||
png_ptr->user_chunk_ptr = user_chunk_ptr;
|
png_ptr->user_chunk_ptr = user_chunk_ptr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user