Imported from libpng-1.2.19beta11.tar

This commit is contained in:
Glenn Randers-Pehrson
2007-05-28 08:45:13 -05:00
parent c1523ad16d
commit e59c47d5b1
58 changed files with 208 additions and 166 deletions

View File

@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* Last changed in libpng 1.2.19 May 24, 2007
* Last changed in libpng 1.2.19 May 28, 2007
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -378,7 +378,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
int interlace_type)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_IHDR;
PNG_IHDR;
#endif
png_byte buf[13]; /* buffer to store the IHDR info */
@@ -607,7 +607,7 @@ void /* PRIVATE */
png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_IDAT;
PNG_IDAT;
#endif
png_debug(1, "in png_write_IDAT\n");
@@ -659,7 +659,7 @@ void /* PRIVATE */
png_write_IEND(png_structp png_ptr)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_IEND;
PNG_IEND;
#endif
png_debug(1, "in png_write_IEND\n");
png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL,
@@ -674,7 +674,7 @@ void /* PRIVATE */
png_write_gAMA(png_structp png_ptr, double file_gamma)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_gAMA;
PNG_gAMA;
#endif
png_uint_32 igamma;
png_byte buf[4];
@@ -691,7 +691,7 @@ void /* PRIVATE */
png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_gAMA;
PNG_gAMA;
#endif
png_byte buf[4];
@@ -709,7 +709,7 @@ void /* PRIVATE */
png_write_sRGB(png_structp png_ptr, int srgb_intent)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_sRGB;
PNG_sRGB;
#endif
png_byte buf[1];
@@ -885,7 +885,7 @@ void /* PRIVATE */
png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_sBIT;
PNG_sBIT;
#endif
png_byte buf[4];
png_size_t size;
@@ -944,7 +944,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
double blue_x, double blue_y)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_cHRM;
PNG_cHRM;
#endif
png_byte buf[32];
png_uint_32 itemp;
@@ -1006,7 +1006,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
png_fixed_point blue_y)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_cHRM;
PNG_cHRM;
#endif
png_byte buf[32];
@@ -1059,7 +1059,7 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
int num_trans, int color_type)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_tRNS;
PNG_tRNS;
#endif
png_byte buf[6];
@@ -1113,7 +1113,7 @@ void /* PRIVATE */
png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_bKGD;
PNG_bKGD;
#endif
png_byte buf[6];
@@ -1328,7 +1328,7 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
png_size_t text_len)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_tEXt;
PNG_tEXt;
#endif
png_size_t key_len;
png_charp new_key;
@@ -1369,7 +1369,7 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
png_size_t text_len, int compression)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_zTXt;
PNG_zTXt;
#endif
png_size_t key_len;
char buf[1];
@@ -1428,7 +1428,7 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
png_charp lang, png_charp lang_key, png_charp text)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST PNG_iTXt;
PNG_iTXt;
#endif
png_size_t lang_len, key_len, lang_key_len, text_len;
png_charp new_lang, new_key;
@@ -1769,7 +1769,7 @@ png_write_start_row(png_structp png_ptr)
if (png_ptr->do_filter & PNG_FILTER_UP)
{
png_ptr->up_row = (png_bytep )png_malloc(png_ptr,
png_ptr->up_row = (png_bytep)png_malloc(png_ptr,
(png_ptr->rowbytes + 1));
png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
}
@@ -1783,7 +1783,7 @@ png_write_start_row(png_structp png_ptr)
if (png_ptr->do_filter & PNG_FILTER_PAETH)
{
png_ptr->paeth_row = (png_bytep )png_malloc(png_ptr,
png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,
(png_ptr->rowbytes + 1));
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
}