[devel] Changed several "#ifdef PNG_UNKNOWN_CHUNK_SUPPORTED" to

to "#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED", to make the png_set_keep
    mechanism available for ignoring known chunks even when not saving
    unknown chunks.
This commit is contained in:
Glenn Randers-Pehrson
2009-06-13 10:05:05 -05:00
parent b5444a1779
commit 7824a70c1d
7 changed files with 67 additions and 51 deletions

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.4.0 [June 5, 2009]
* Last changed in libpng 1.4.0 [June 12, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1009,7 +1009,7 @@ png_set_sPLT(png_structp png_ptr,
}
#endif /* PNG_sPLT_SUPPORTED */
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
void PNGAPI
png_set_unknown_chunks(png_structp png_ptr,
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
@@ -1039,8 +1039,8 @@ png_set_unknown_chunks(png_structp png_ptr,
png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;
png_unknown_chunkp from = unknowns + i;
png_memcpy((png_charp)to->name,
(png_charp)from->name,
png_memcpy((png_charp)to->name,
(png_charp)from->name,
png_sizeof(from->name));
to->name[png_sizeof(to->name)-1] = '\0';
to->size = from->size;