| OLD | NEW |
| 1 | 1 |
| 2 /* pngwrite.c - general routines to write a PNG file | 2 /* pngwrite.c - general routines to write a PNG file |
| 3 * | 3 * |
| 4 * Last changed in libpng 1.6.19 [November 12, 2015] | 4 * Last changed in libpng 1.6.19 [November 12, 2015] |
| 5 * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson | 5 * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson |
| 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) | 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) |
| 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) | 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) |
| 8 * | 8 * |
| 9 * This code is released under the libpng license. | 9 * This code is released under the libpng license. |
| 10 * For conditions of distribution and use, see the disclaimer | 10 * For conditions of distribution and use, see the disclaimer |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 png_debug(1, "in png_write_destroy"); | 930 png_debug(1, "in png_write_destroy"); |
| 931 | 931 |
| 932 /* Free any memory zlib uses */ | 932 /* Free any memory zlib uses */ |
| 933 if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0) | 933 if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0) |
| 934 deflateEnd(&png_ptr->zstream); | 934 deflateEnd(&png_ptr->zstream); |
| 935 | 935 |
| 936 /* Free our memory. png_free checks NULL for us. */ | 936 /* Free our memory. png_free checks NULL for us. */ |
| 937 png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list); | 937 png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list); |
| 938 png_free(png_ptr, png_ptr->row_buf); | 938 png_free(png_ptr, png_ptr->row_buf); |
| 939 png_ptr->row_buf = NULL; | 939 png_ptr->row_buf = NULL; |
| 940 #ifdef PNG_READ_EXPANDED_SUPPORTED |
| 941 png_free(png_ptr, png_ptr->row_tmp_palette); |
| 942 png_ptr->row_tmp_palette = NULL; |
| 943 #endif |
| 940 #ifdef PNG_WRITE_FILTER_SUPPORTED | 944 #ifdef PNG_WRITE_FILTER_SUPPORTED |
| 941 png_free(png_ptr, png_ptr->prev_row); | 945 png_free(png_ptr, png_ptr->prev_row); |
| 942 png_free(png_ptr, png_ptr->try_row); | 946 png_free(png_ptr, png_ptr->try_row); |
| 943 png_free(png_ptr, png_ptr->tst_row); | 947 png_free(png_ptr, png_ptr->tst_row); |
| 944 png_ptr->prev_row = NULL; | 948 png_ptr->prev_row = NULL; |
| 945 png_ptr->try_row = NULL; | 949 png_ptr->try_row = NULL; |
| 946 png_ptr->tst_row = NULL; | 950 png_ptr->tst_row = NULL; |
| 947 #endif | 951 #endif |
| 948 | 952 |
| 949 #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED | 953 #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED |
| (...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2374 else if (image != NULL) | 2378 else if (image != NULL) |
| 2375 return png_image_error(image, | 2379 return png_image_error(image, |
| 2376 "png_image_write_to_file: incorrect PNG_IMAGE_VERSION"); | 2380 "png_image_write_to_file: incorrect PNG_IMAGE_VERSION"); |
| 2377 | 2381 |
| 2378 else | 2382 else |
| 2379 return 0; | 2383 return 0; |
| 2380 } | 2384 } |
| 2381 #endif /* SIMPLIFIED_WRITE_STDIO */ | 2385 #endif /* SIMPLIFIED_WRITE_STDIO */ |
| 2382 #endif /* SIMPLIFIED_WRITE */ | 2386 #endif /* SIMPLIFIED_WRITE */ |
| 2383 #endif /* WRITE */ | 2387 #endif /* WRITE */ |
| OLD | NEW |