[master] Fixed deprecated usages in contrib directory.
This commit is contained in:
parent
3130af0e2b
commit
7aacd895ee
2
ANNOUNCE
2
ANNOUNCE
@ -147,6 +147,8 @@ version 1.2.41beta17 [November 9, 2009]
|
|||||||
Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
|
Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
|
||||||
Marked deprecated function prototypes with PNG_DEPRECATED.
|
Marked deprecated function prototypes with PNG_DEPRECATED.
|
||||||
Marked memory allocation function prototypes with PNG_ALLOCATED.
|
Marked memory allocation function prototypes with PNG_ALLOCATED.
|
||||||
|
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
|
||||||
|
Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
|
||||||
|
2
CHANGES
2
CHANGES
@ -2578,6 +2578,8 @@ version 1.2.41beta17 [November 9, 2009]
|
|||||||
Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
|
Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
|
||||||
Marked deprecated function prototypes with PNG_DEPRECATED.
|
Marked deprecated function prototypes with PNG_DEPRECATED.
|
||||||
Marked memory allocation function prototypes with PNG_ALLOCATED.
|
Marked memory allocation function prototypes with PNG_ALLOCATED.
|
||||||
|
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
|
||||||
|
Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
|
||||||
|
|
||||||
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
|
||||||
|
@ -93,7 +93,7 @@ int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
|
|||||||
* have used slightly more general png_sig_cmp() function instead */
|
* have used slightly more general png_sig_cmp() function instead */
|
||||||
|
|
||||||
fread(sig, 1, 8, infile);
|
fread(sig, 1, 8, infile);
|
||||||
if (!png_check_sig(sig, 8))
|
if (png_sig_cmp(sig, 0, 8))
|
||||||
return 1; /* bad signature */
|
return 1; /* bad signature */
|
||||||
|
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ void readpng2_version_info(void)
|
|||||||
|
|
||||||
int readpng2_check_sig(uch *sig, int num)
|
int readpng2_check_sig(uch *sig, int num)
|
||||||
{
|
{
|
||||||
return png_check_sig(sig, num);
|
return !png_sig_cmp(sig, 0, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -379,6 +379,7 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
|
|||||||
{
|
{
|
||||||
mainprog_info *mainprog_ptr;
|
mainprog_info *mainprog_ptr;
|
||||||
int color_type, bit_depth;
|
int color_type, bit_depth;
|
||||||
|
png_uint_32 width, height;
|
||||||
double gamma;
|
double gamma;
|
||||||
|
|
||||||
|
|
||||||
@ -414,8 +415,10 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
/* this is just like in the non-progressive case */
|
/* this is just like in the non-progressive case */
|
||||||
|
|
||||||
png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width,
|
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
|
||||||
&mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
|
mainprog_ptr->width = (ulg)width;
|
||||||
|
mainprog_ptr->height = (ulg)height;
|
||||||
|
|
||||||
|
|
||||||
/* since we know we've read all of the PNG file's "header" (i.e., up
|
/* since we know we've read all of the PNG file's "header" (i.e., up
|
||||||
|
@ -211,7 +211,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
|
|||||||
if (ret != 8)
|
if (ret != 8)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ret = png_check_sig (buf, 8);
|
ret = !png_sig_cmp (buf, 0, 8);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
|
|||||||
// first check the eight byte PNG signature
|
// first check the eight byte PNG signature
|
||||||
|
|
||||||
fread(pbSig, 1, 8, pfFile);
|
fread(pbSig, 1, 8, pfFile);
|
||||||
if (!png_check_sig(pbSig, 8))
|
if (png_sig_cmp(pbSig, 0, 8))
|
||||||
{
|
{
|
||||||
*ppbImageData = pbImageData = NULL;
|
*ppbImageData = pbImageData = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user