mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.7beta2.tar
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* libpng version 1.2.7beta1 - August 26, 2004
|
||||
* libpng version 1.2.7beta2 - August 29, 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)
|
||||
@@ -1528,6 +1528,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");
|
||||
|
||||
@@ -1548,7 +1549,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));
|
||||
|
||||
@@ -1565,6 +1566,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");
|
||||
|
||||
@@ -1574,7 +1576,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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user