Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: third_party/libpng/pngwrite.c

Issue 7464050: libpng: update to 1.2.45 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libpng/pngrutil.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.2.42 [January 3, 2010] 4 * Last changed in libpng 1.2.45 [July 7, 2011]
5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson 5 * Copyright (c) 1998-2011 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
11 * and license in png.h 11 * and license in png.h
12 */ 12 */
13 13
14 /* Get internal access to png.h */ 14 /* Get internal access to png.h */
15 #define PNG_INTERNAL 15 #define PNG_INTERNAL
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 png_debug(5, "writing extra chunks"); 288 png_debug(5, "writing extra chunks");
289 289
290 for (up = info_ptr->unknown_chunks; 290 for (up = info_ptr->unknown_chunks;
291 up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; 291 up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
292 up++) 292 up++)
293 { 293 {
294 int keep = png_handle_as_unknown(png_ptr, up->name); 294 int keep = png_handle_as_unknown(png_ptr, up->name);
295 if (keep != PNG_HANDLE_CHUNK_NEVER && 295 if (keep != PNG_HANDLE_CHUNK_NEVER &&
296 up->location && (up->location & PNG_HAVE_PLTE) && 296 up->location && (up->location & PNG_HAVE_PLTE) &&
297 !(up->location & PNG_HAVE_IDAT) && 297 !(up->location & PNG_HAVE_IDAT) &&
298 !(up->location & PNG_AFTER_IDAT) &&
298 ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || 299 ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
299 (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) 300 (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
300 { 301 {
301 png_write_chunk(png_ptr, up->name, up->data, up->size); 302 png_write_chunk(png_ptr, up->name, up->data, up->size);
302 } 303 }
303 } 304 }
304 } 305 }
305 #endif 306 #endif
306 } 307 }
307 308
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 png_write_image(png_ptr, info_ptr->row_pointers); 1584 png_write_image(png_ptr, info_ptr->row_pointers);
1584 1585
1585 /* It is REQUIRED to call this to finish writing the rest of the file */ 1586 /* It is REQUIRED to call this to finish writing the rest of the file */
1586 png_write_end(png_ptr, info_ptr); 1587 png_write_end(png_ptr, info_ptr);
1587 1588
1588 transforms = transforms; /* Quiet compiler warnings */ 1589 transforms = transforms; /* Quiet compiler warnings */
1589 params = params; 1590 params = params;
1590 } 1591 }
1591 #endif 1592 #endif
1592 #endif /* PNG_WRITE_SUPPORTED */ 1593 #endif /* PNG_WRITE_SUPPORTED */
OLDNEW
« no previous file with comments | « third_party/libpng/pngrutil.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698