[libpng17] Imported from libpng-1.7.0beta32.tar

This commit is contained in:
Glenn Randers-Pehrson
2014-02-26 12:11:18 -06:00
parent deb920b4a7
commit f99393490d
17 changed files with 39 additions and 115 deletions

View File

@@ -8,7 +8,7 @@
* Read a single pixel value from a PNG file.
*
* This code illustrates basic 'by-row' reading of a PNG file using libpng.
* Rows are read until a particular pixel is found, the value of this pixel is
* Rows are read until a particular pixel is found; the value of this pixel is
* then printed on stdout.
*
* The code illustrates how to do this on interlaced as well as non-interlaced
@@ -56,7 +56,7 @@ component(png_const_bytep row, png_uint_32 x, unsigned int c,
case 8: return row[0];
case 16: return (row[0] << 8) + row[1];
default:
/* This should never happen, it indicates a bug in this program or in
/* This should never happen; it indicates a bug in this program or in
* libpng itself:
*/
fprintf(stderr, "pngpixel: invalid bit depth %u\n", bit_depth);
@@ -132,7 +132,7 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
return;
default:
png_error(png_ptr, "invalid color type");
png_error(png_ptr, "pngpixel: invalid color type");
}
}