[libpng10] Imported from libpng-1.0.17.tar

This commit is contained in:
Glenn Randers-Pehrson
2004-09-11 21:17:42 -05:00
parent f47b4b1bf7
commit df8fc6680e
60 changed files with 768 additions and 585 deletions

View File

@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* libpng version 1.0.16 - August 15, 2004
* libpng version 1.0.17 - September 12, 2004
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -617,8 +617,8 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
png_ptr->height < 16384 && png_ptr->width < 16384)
{
png_uint_32 uncompressed_idat_size = png_ptr->height *
(PNG_ROWBYTES(png_ptr->channels*png_ptr->bit_depth,
png_ptr->channels * png_ptr->bit_depth + 15) >> 3);
((png_ptr->width *
png_ptr->channels * png_ptr->bit_depth + 15) >> 3);
unsigned int z_cinfo = z_cmf >> 4;
unsigned int half_z_window_size = 1 << (z_cinfo + 7);
while (uncompressed_idat_size <= half_z_window_size &&
@@ -1556,6 +1556,7 @@ png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
#endif
png_size_t total_len;
char wbuf[32], hbuf[32];
png_byte bunit = unit;
png_debug(1, "in png_write_sCAL\n");
@@ -1576,7 +1577,7 @@ png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
png_debug1(3, "sCAL total length = %d\n", (int)total_len);
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
png_write_chunk_data(png_ptr, (png_bytep)&unit, 1);
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
@@ -1593,6 +1594,7 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
#endif
png_size_t total_len;
char wbuf[32], hbuf[32];
png_byte bunit = unit;
png_debug(1, "in png_write_sCAL_s\n");
@@ -1602,7 +1604,7 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
png_debug1(3, "sCAL total length = %d\n", total_len);
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
png_write_chunk_data(png_ptr, (png_bytep)&unit, 1);
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));