mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
8
pngset.c
8
pngset.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user