[libpng16] Bump version to 1.6.1beta05

This commit is contained in:
Glenn Randers-Pehrson
2013-03-02 14:58:22 -06:00
parent f3af706c2a
commit 871b1d0fab
186 changed files with 20681 additions and 8559 deletions

View File

@@ -103,7 +103,7 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
index < num_trans ? trans_alpha[index] : 255);
else /* no transparency */
printf("INDEXED %u = %d %d %d\n", index,
printf("INDEXED %u = %d %d %d\n", index,
palette[index].red, palette[index].green,
palette[index].blue);
}
@@ -273,7 +273,7 @@ int main(int argc, const char **argv)
ystep = xstep = 1;
}
/* To find the pixel loop over 'py' for each pass
/* To find the pixel, loop over 'py' for each pass
* reading a row and then checking to see if it
* contains the pixel.
*/
@@ -283,12 +283,13 @@ int main(int argc, const char **argv)
/* png_read_row takes two pointers. When libpng
* handles the interlace the first is filled in
* pixel-by-pixel, the second receives the same
* pixel-by-pixel, and the second receives the same
* pixels but they are replicated across the
* unwritten pixels so far for each pass. When we
* do the interlace, however, they just contain
* the pixels from the interlace pass - giving
* both is wasteful and pointless.
* both is wasteful and pointless, so we pass a
* NULL pointer.
*/
png_read_row(png_ptr, row_tmp, NULL);
@@ -326,7 +327,7 @@ int main(int argc, const char **argv)
else
{
/* Else libpng has raised an error. An error message has
* already been output, it is only necessary to clean up
* already been output, so it is only necessary to clean up
* locally allocated data:
*/
if (row != NULL)

View File

@@ -29,13 +29,17 @@ int main(int argc, const char **argv)
{
png_image image;
/* Only the image structure version number needs to be set. */
memset(&image, 0, sizeof image);
image.version = PNG_IMAGE_VERSION;
if (png_image_begin_read_from_file(&image, argv[1]))
{
png_bytep buffer;
/* Change this to try different formats! */
/* Change this to try different formats! If you set a colormap format
* then you must also supply a colormap below.
*/
image.format = PNG_FORMAT_RGBA;
buffer = malloc(PNG_IMAGE_SIZE(image));
@@ -43,10 +47,11 @@ int main(int argc, const char **argv)
if (buffer != NULL)
{
if (png_image_finish_read(&image, NULL/*background*/, buffer,
0/*row_stride*/))
0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */))
{
if (png_image_write_to_file(&image, argv[2],
0/*convert_to_8bit*/, buffer, 0/*row_stride*/))
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
NULL/*colormap*/))
result = 0;
else