~ubuntu-branches/debian/sid/stella/sid

« back to all changes in this revision

Viewing changes to src/libpng/pngrtran.c

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-06-02 07:33:16 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120602073316-20r4hr32t4oj36u9
Tags: 3.7-1
* New upstream version.
* Update description and documentation with new features in 3.7, notably
  Blargg TV filters (replacing the filters available in versions 3.4.1
  and earlier).
* Switch to debhelper compatibility level 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/* pngrtran.c - transforms the data in a row for PNG readers
3
3
 *
4
 
 * Last changed in libpng 1.5.7 [December 15, 2011]
5
 
 * Copyright (c) 1998-2011 Glenn Randers-Pehrson
 
4
 * Last changed in libpng 1.5.10 [March 8, 2012]
 
5
 * Copyright (c) 1998-2012 Glenn Randers-Pehrson
6
6
 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7
7
 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8
8
 *
1830
1830
 
1831
1831
#ifdef PNG_READ_SHIFT_SUPPORTED
1832
1832
   if ((png_ptr->transformations & PNG_SHIFT) &&
 
1833
      !(png_ptr->transformations & PNG_EXPAND) &&
1833
1834
       (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
1834
1835
   {
1835
1836
      int i;
1836
1837
      int istop = png_ptr->num_palette;
1837
1838
      int shift = 8 - png_ptr->sig_bit.red;
1838
1839
 
 
1840
      png_ptr->transformations &= ~PNG_SHIFT;
 
1841
 
1839
1842
      /* significant bits can be in the range 1 to 7 for a meaninful result, if
1840
1843
       * the number of significant bits is 0 then no shift is done (this is an
1841
1844
       * error condition which is silently ignored.)
2296
2299
      png_do_unpack(row_info, png_ptr->row_buf + 1);
2297
2300
#endif
2298
2301
 
 
2302
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
 
2303
   /* Added at libpng-1.5.10 */
 
2304
   if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
 
2305
      png_do_check_palette_indexes(png_ptr, row_info);
 
2306
#endif
 
2307
 
2299
2308
#ifdef PNG_READ_BGR_SUPPORTED
2300
2309
   if (png_ptr->transformations & PNG_BGR)
2301
2310
      png_do_bgr(row_info, png_ptr->row_buf + 1);