Imported from libpng-1.2.35beta01.tar

This commit is contained in:
Glenn Randers-Pehrson
2009-02-04 13:11:41 -06:00
parent d8865433f9
commit d0a4300dde
56 changed files with 223 additions and 156 deletions

View File

@@ -1,9 +1,9 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.2.34 [December 18, 2008]
* Last changed in libpng 1.2.35 [February 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Copyright (c) 1998-2009 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.)
*
@@ -61,7 +61,8 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
#endif
info_ptr->valid |= PNG_INFO_cHRM;
}
#endif
#endif /* PNG_FLOATING_POINT_SUPPORTED */
#ifdef PNG_FIXED_POINT_SUPPORTED
void PNGAPI
png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
@@ -382,7 +383,11 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
return;
}
info_ptr->pcal_params[nparams] = NULL;
#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_PCAL;
#endif
for (i = 0; i < nparams; i++)
info_ptr->pcal_params[i] = NULL;
for (i = 0; i < nparams; i++)
{
@@ -399,9 +404,6 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
}
info_ptr->valid |= PNG_INFO_pCAL;
#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_PCAL;
#endif
}
#endif
@@ -635,7 +637,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
}
#endif /* cHRM */
}
#endif
#endif /* sRGB */
#if defined(PNG_iCCP_SUPPORTED)
@@ -959,6 +961,7 @@ png_set_sPLT(png_structp png_ptr,
png_memcpy(np, info_ptr->splt_palettes,
info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));
png_free(png_ptr, info_ptr->splt_palettes);
info_ptr->splt_palettes=NULL;