/* pngwutil.c - utilities to write a PNG file
*
- * libpng version 1.2.6 - August 15, 2004
+ * libpng version 1.2.7 - 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)
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 &&
#endif
png_size_t total_len;
char wbuf[32], hbuf[32];
+ png_byte bunit = unit;
png_debug(1, "in png_write_sCAL\n");
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));
#endif
png_size_t total_len;
char wbuf[32], hbuf[32];
+ png_byte bunit = unit;
png_debug(1, "in png_write_sCAL_s\n");
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));