mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.0.6.tar
This commit is contained in:
12
pngwutil.c
12
pngwutil.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* libpng 1.0.5s - February 18, 2000
|
||||
* libpng 1.0.6 - March 21, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -179,7 +179,6 @@ png_text_compress(png_structp png_ptr,
|
||||
#else
|
||||
png_warning(png_ptr, "Unknown compression type");
|
||||
#endif
|
||||
compression = PNG_TEXT_COMPRESSION_zTXt;
|
||||
}
|
||||
|
||||
/* We can't write the chunk until we find out how much data we have,
|
||||
@@ -642,7 +641,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
}
|
||||
|
||||
if (compression_type)
|
||||
/* ignore */ ;
|
||||
png_warning(png_ptr, "Unknown compression type in iCCP chunk");
|
||||
|
||||
if (profile == NULL || *profile == '\0')
|
||||
profile_len = 0;
|
||||
@@ -667,7 +666,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
#if defined(PNG_WRITE_sPLT_SUPPORTED)
|
||||
/* write a sPLT chunk */
|
||||
void
|
||||
png_write_sPLT(png_structp png_ptr, png_spalette_p spalette)
|
||||
png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_sPLT;
|
||||
@@ -677,10 +676,11 @@ png_write_sPLT(png_structp png_ptr, png_spalette_p spalette)
|
||||
png_byte entrybuf[10];
|
||||
int entry_size = (spalette->depth == 8 ? 6 : 10);
|
||||
int palette_size = entry_size * spalette->nentries;
|
||||
png_spalette_entryp ep;
|
||||
png_sPLT_entryp ep;
|
||||
|
||||
png_debug(1, "in png_write_sPLT\n");
|
||||
if (spalette->name == NULL || (name_len = png_check_keyword(png_ptr, spalette->name, &new_name))==0)
|
||||
if (spalette->name == NULL || (name_len = png_check_keyword(png_ptr,
|
||||
spalette->name, &new_name))==0)
|
||||
{
|
||||
png_warning(png_ptr, "Empty keyword in sPLT chunk");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user