summaryrefslogtreecommitdiff
path: root/pngread.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-11-08 16:51:11 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-11-08 16:51:11 -0600
commitf748fda0ed4aa65cc9a2c10e439bced1dd4d9752 (patch)
treeafb2af36f533ebdd5c144f0963030b51aeffe36d /pngread.c
parent87480bf6d469b1d6afa584a22cbee8d21b9e6930 (diff)
downloadlibpng-f748fda0ed4aa65cc9a2c10e439bced1dd4d9752.tar.gz
[master] Reverted iTXt compatibility stuff
from 1.2.41beta05, 1.2.41beta11, and 1.2.41beta12.
Diffstat (limited to 'pngread.c')
-rw-r--r--pngread.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/pngread.c b/pngread.c
index 7da0e2120..93c5f5434 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
/* pngread.c - read 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.)
@@ -66,8 +66,6 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
- /* Added at libpng-1.2.41 */
- png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
#endif
#ifdef PNG_SETJMP_SUPPORTED
@@ -118,10 +116,6 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
* For versions after libpng 1.0, we will be compatible, so we need
* only check the first digit.
*/
-#ifdef PNG_iTXt_SUPPORTED
- png_size_t length;
-#endif
-
if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
(user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
(user_png_ver[0] == '0' && user_png_ver[2] < '9'))
@@ -146,26 +140,6 @@ png_create_read_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 */
@@ -327,8 +301,6 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
- /* Added at libpng-1.2.41 */
- png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
#endif
/* Initialize zbuf - compression buffer */
@@ -377,10 +349,6 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
png_size_t num_checked = png_ptr->sig_bytes,
num_to_check = 8 - num_checked;
-#ifdef PNG_IO_STATE_SUPPORTED
- png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE;
-#endif
-
png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);
png_ptr->sig_bytes = 8;
@@ -1325,11 +1293,6 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
#endif /* PNG_TEXT_SUPPORTED */
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-/* 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
-
/* Save the important info out of the png_struct, in case it is
* being used again.
*/