13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25 /* pngwtran.c - transforms the data in a row for PNG writers
26 *
27 * This file is available under and governed by the GNU General Public
28 * License version 2 only, as published by the Free Software Foundation.
29 * However, the following notice accompanied the original version of this
30 * file and, per its terms, should not be removed:
31 *
32 * Last changed in libpng 1.6.18 [July 23, 2015]
33 * Copyright (c) 1998-2015 Glenn Randers-Pehrson
34 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
35 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
36 *
37 * This code is released under the libpng license.
38 * For conditions of distribution and use, see the disclaimer
39 * and license in png.h
40 */
41
42 #include "pngpriv.h"
43
44 #ifdef PNG_WRITE_SUPPORTED
45 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
46
47 #ifdef PNG_WRITE_PACK_SUPPORTED
48 /* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
49 * row_info bit depth should be 8 (one pixel per byte). The channels
50 * should be 1 (this only happens on grayscale and paletted images).
51 */
52 static void
53 png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25 /* pngwtran.c - transforms the data in a row for PNG writers
26 *
27 * This file is available under and governed by the GNU General Public
28 * License version 2 only, as published by the Free Software Foundation.
29 * However, the following notice accompanied the original version of this
30 * file and, per its terms, should not be removed:
31 *
32 * Last changed in libpng 1.6.18 [July 23, 2015]
33 * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson
34 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
35 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
36 *
37 * This code is released under the libpng license.
38 * For conditions of distribution and use, see the disclaimer
39 * and license in png.h
40 */
41
42 #include "pngpriv.h"
43
44 #ifdef PNG_WRITE_SUPPORTED
45 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
46
47 #ifdef PNG_WRITE_PACK_SUPPORTED
48 /* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
49 * row_info bit depth should be 8 (one pixel per byte). The channels
50 * should be 1 (this only happens on grayscale and paletted images).
51 */
52 static void
53 png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|