"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gd_png.c" between
libgd-2.3.2.tar.gz and libgd-2.3.3.tar.gz

About: LibGD is a library for the dynamic creation of images by programmers (PNG, JPEG, GIF, WebP, XPM, BMP support).

gd_png.c  (libgd-2.3.2):gd_png.c  (libgd-2.3.3)
skipping to change at line 386 skipping to change at line 386
* that all 256 8-bit shades are used, but one could writ e some * that all 256 8-bit shades are used, but one could writ e some
* custom 16-bit code to handle the case where there are gdFree * custom 16-bit code to handle the case where there are gdFree
* palette entries. This error will be extremely rare in * palette entries. This error will be extremely rare in
* general, though. (Quite possibly there is only one su ch * general, though. (Quite possibly there is only one su ch
* image in existence.) */ * image in existence.) */
} }
break; break;
case PNG_COLOR_TYPE_GRAY_ALPHA: case PNG_COLOR_TYPE_GRAY_ALPHA:
png_set_gray_to_rgb(png_ptr); png_set_gray_to_rgb(png_ptr);
// fall through
// Keep above comment, gcc recognizes it and silent its warning a
bout fall through case here
case PNG_COLOR_TYPE_RGB: case PNG_COLOR_TYPE_RGB:
case PNG_COLOR_TYPE_RGB_ALPHA: case PNG_COLOR_TYPE_RGB_ALPHA:
/* gd 2.0: we now support truecolor. See the comment above /* gd 2.0: we now support truecolor. See the comment above
for a rare situation in which the transparent pixel may not for a rare situation in which the transparent pixel may not
work properly with 16-bit channels. */ work properly with 16-bit channels. */
if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) { if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) {
png_get_tRNS (png_ptr, info_ptr, NULL, NULL, &trans_color _rgb); png_get_tRNS (png_ptr, info_ptr, NULL, NULL, &trans_color _rgb);
if (bit_depth == 16) { /* png_set_strip_16() not yet in effect */ if (bit_depth == 16) { /* png_set_strip_16() not yet in effect */
transparent = gdTrueColor (trans_color_rgb->red > > 8, transparent = gdTrueColor (trans_color_rgb->red > > 8,
trans_color_rgb->green >> 8, trans_color_rgb->green >> 8,
skipping to change at line 1093 skipping to change at line 1094
#else /* !HAVE_LIBPNG */ #else /* !HAVE_LIBPNG */
static void _noPngError(void) static void _noPngError(void)
{ {
gd_error("PNG image support has been disabled\n"); gd_error("PNG image support has been disabled\n");
} }
BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * inFile) BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * inFile)
{ {
ARG_NOT_USED(inFile);
_noPngError(); _noPngError();
return NULL; return NULL;
} }
BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data) BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data)
{ {
ARG_NOT_USED(size);
ARG_NOT_USED(data);
return NULL; return NULL;
} }
BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile) BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile)
{ {
ARG_NOT_USED(infile);
return NULL; return NULL;
} }
BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * outFile, int level) BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * outFile, int level)
{ {
ARG_NOT_USED(im);
ARG_NOT_USED(outFile);
ARG_NOT_USED(level);
_noPngError(); _noPngError();
} }
BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * outFile) BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * outFile)
{ {
ARG_NOT_USED(im);
ARG_NOT_USED(outFile);
_noPngError(); _noPngError();
} }
BGD_DECLARE(void *) gdImagePngPtr (gdImagePtr im, int *size) BGD_DECLARE(void *) gdImagePngPtr (gdImagePtr im, int *size)
{ {
ARG_NOT_USED(im);
ARG_NOT_USED(size);
return NULL; return NULL;
} }
BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level) BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level)
{ {
ARG_NOT_USED(im);
ARG_NOT_USED(size);
ARG_NOT_USED(level);
return NULL; return NULL;
} }
BGD_DECLARE(void) gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile) BGD_DECLARE(void) gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile)
{ {
ARG_NOT_USED(im);
ARG_NOT_USED(outfile);
_noPngError(); _noPngError();
} }
BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level) BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level)
{ {
ARG_NOT_USED(im);
ARG_NOT_USED(outfile);
ARG_NOT_USED(level);
_noPngError(); _noPngError();
} }
#endif /* HAVE_LIBPNG */ #endif /* HAVE_LIBPNG */
 End of changes. 10 change blocks. 
1 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)