16#ifdef PNG_WRITE_SUPPORTED
17#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
19#ifdef PNG_WRITE_PACK_SUPPORTED
32 switch ((
int)bit_depth)
46 for (
i = 0;
i < row_width;
i++)
84 for (
i = 0;
i < row_width;
i++)
124 for (
i = 0;
i < row_width;
i++)
128 value = (png_byte)(*
sp & 0x0f);
155 row_info->
bit_depth = (png_byte)bit_depth;
163#ifdef PNG_WRITE_SHIFT_SUPPORTED
179 int shift_start[4], shift_dec[4];
217 size_t row_bytes = row_info->
rowbytes;
228 for (
i = 0;
i < row_bytes;
i++, bp++)
236 for (
j = shift_start[0];
j > -shift_dec[0];
j -= shift_dec[0])
245 *bp = (png_byte)(
out & 0xff);
255 for (
i = 0;
i < istop;
i++, bp++)
264 for (
j = shift_start[
c];
j > -shift_dec[
c];
j -= shift_dec[
c])
273 *bp = (png_byte)(
out & 0xff);
283 for (bp =
row,
i = 0;
i < istop;
i++)
292 for (
j = shift_start[
c];
j > -shift_dec[
c];
j -= shift_dec[
c])
300 *bp++ = (png_byte)((
value >> 8) & 0xff);
301 *bp++ = (png_byte)(
value & 0xff);
308#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
312 png_debug(1,
"in png_do_write_swap_alpha");
324 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
326 png_byte save = *(
sp++);
334#ifdef PNG_WRITE_16BIT_SUPPORTED
342 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
369 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
371 png_byte save = *(
sp++);
377#ifdef PNG_WRITE_16BIT_SUPPORTED
385 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
402#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
406 png_debug(1,
"in png_do_write_invert_alpha");
418 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
426 *dp = (png_byte)(255 - *(
sp++));
430#ifdef PNG_WRITE_16BIT_SUPPORTED
438 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
449 *(dp++) = (png_byte)(255 - *(
sp++));
450 *dp = (png_byte)(255 - *(
sp++));
465 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
468 *(dp++) = (png_byte)(255 - *(
sp++));
472#ifdef PNG_WRITE_16BIT_SUPPORTED
480 for (
i = 0,
sp = dp =
row;
i < row_width;
i++)
487 *(dp++) = (png_byte)(255 - *(
sp++));
488 *dp = (png_byte)(255 - *(
sp++));
503 png_debug(1,
"in png_do_write_transformations");
508#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
511 (*(
png_ptr->write_user_transform_fn))
524#ifdef PNG_WRITE_FILLER_SUPPORTED
526 png_do_strip_channel(row_info,
png_ptr->row_buf + 1,
530#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
532 png_do_packswap(row_info,
png_ptr->row_buf + 1);
535#ifdef PNG_WRITE_PACK_SUPPORTED
537 png_do_pack(row_info,
png_ptr->row_buf + 1,
541#ifdef PNG_WRITE_SWAP_SUPPORTED
542# ifdef PNG_16BIT_SUPPORTED
544 png_do_swap(row_info,
png_ptr->row_buf + 1);
548#ifdef PNG_WRITE_SHIFT_SUPPORTED
550 png_do_shift(row_info,
png_ptr->row_buf + 1,
554#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
556 png_do_write_swap_alpha(row_info,
png_ptr->row_buf + 1);
559#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
561 png_do_write_invert_alpha(row_info,
png_ptr->row_buf + 1);
564#ifdef PNG_WRITE_BGR_SUPPORTED
566 png_do_bgr(row_info,
png_ptr->row_buf + 1);
569#ifdef PNG_WRITE_INVERT_SUPPORTED
571 png_do_invert(row_info,
png_ptr->row_buf + 1);
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define PNG_COLOR_TYPE_RGB_ALPHA
#define PNG_COLOR_TYPE_GRAY_ALPHA
#define PNG_COLOR_TYPE_PALETTE
#define png_get_uint_16(buf)
#define PNG_COLOR_MASK_COLOR
#define PNG_COLOR_MASK_ALPHA
png_struct *PNG_RESTRICT png_structrp
#define PNG_ROWBYTES(pixel_bits, width)
#define PNG_USER_TRANSFORM
#define PNG_FLAG_FILLER_AFTER