mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Reverted iTXt compatibility stuff
from 1.2.41beta05, 1.2.41beta11, and 1.2.41beta12.
This commit is contained in:
32
pngwrite.c
32
pngwrite.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.41 [November 3, 2009]
|
||||
* Last changed in libpng 1.2.41 [November 8, 2009]
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -534,10 +534,6 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
|
||||
if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
|
||||
{
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
png_size_t length;
|
||||
#endif
|
||||
|
||||
/* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
|
||||
* we must recompile any applications that use any older library version.
|
||||
* For versions after libpng 1.0, we will be compatible, so we need
|
||||
@@ -567,27 +563,6 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error(png_ptr,
|
||||
"Incompatible libpng version in application and library");
|
||||
}
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
|
||||
/* Any library mismatch is trouble for png_set_read() in
|
||||
* libpng-1.2.41 and later 1.2.x, so we store the caller's
|
||||
* library version string.
|
||||
*/
|
||||
|
||||
length = (png_size_t)png_strlen(user_png_ver) + 1;
|
||||
png_debug1(3, "allocating user_png_ver for png_ptr (%lu bytes)",
|
||||
(unsigned long)length);
|
||||
png_ptr->user_png_ver = (png_charp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)length);
|
||||
|
||||
if (png_ptr->user_png_ver == NULL)
|
||||
png_warning(png_ptr, "Could not store png_ptr->user_png_ver");
|
||||
|
||||
else
|
||||
png_memcpy(png_ptr->user_png_ver, user_png_ver, length);
|
||||
|
||||
#endif /* PNG_iTXt_SUPPORTED */
|
||||
|
||||
}
|
||||
|
||||
/* Initialize zbuf - compression buffer */
|
||||
@@ -1177,11 +1152,6 @@ png_write_destroy(png_structp png_ptr)
|
||||
free_fn = png_ptr->free_fn;
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.2.41, will be removed from 1.4.0 */
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
png_free(png_ptr, png_ptr->user_png_ver);
|
||||
#endif
|
||||
|
||||
png_memset(png_ptr, 0, png_sizeof(png_struct));
|
||||
|
||||
png_ptr->error_fn = error_fn;
|
||||
|
||||
Reference in New Issue
Block a user