Prusa MINI Firmware overview
pngtrans.c File Reference
#include "pngpriv.h"

Functions

void PNGAPI png_set_bgr (png_structrp png_ptr)
 
void PNGAPI png_set_swap (png_structrp png_ptr)
 
void PNGAPI png_set_packing (png_structrp png_ptr)
 
void PNGAPI png_set_packswap (png_structrp png_ptr)
 
void PNGAPI png_set_shift (png_structrp png_ptr, png_const_color_8p true_bits)
 
int PNGAPI png_set_interlace_handling (png_structrp png_ptr)
 
void PNGAPI png_set_filler (png_structrp png_ptr, png_uint_32 filler, int filler_loc)
 
void PNGAPI png_set_add_alpha (png_structrp png_ptr, png_uint_32 filler, int filler_loc)
 
void PNGAPI png_set_swap_alpha (png_structrp png_ptr)
 
void PNGAPI png_set_invert_alpha (png_structrp png_ptr)
 
void PNGAPI png_set_invert_mono (png_structrp png_ptr)
 
void png_do_invert (png_row_infop row_info, png_bytep row)
 
void png_do_swap (png_row_infop row_info, png_bytep row)
 
void png_do_packswap (png_row_infop row_info, png_bytep row)
 
void png_do_strip_channel (png_row_infop row_info, png_bytep row, int at_start)
 
void png_do_bgr (png_row_infop row_info, png_bytep row)
 
void png_do_check_palette_indexes (png_structrp png_ptr, png_row_infop row_info)
 
void PNGAPI png_set_user_transform_info (png_structrp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)
 
png_voidp PNGAPI png_get_user_transform_ptr (png_const_structrp png_ptr)
 
png_uint_32 PNGAPI png_get_current_row_number (png_const_structrp png_ptr)
 
png_byte PNGAPI png_get_current_pass_number (png_const_structrp png_ptr)
 

Variables

static const png_byte onebppswaptable [256]
 
static const png_byte twobppswaptable [256]
 
static const png_byte fourbppswaptable [256]
 

Function Documentation

◆ png_set_bgr()

void PNGAPI png_set_bgr ( png_structrp  png_ptr)
22 {
23  png_debug(1, "in png_set_bgr");
24 
25  if (png_ptr == NULL)
26  return;
27 
28  png_ptr->transformations |= PNG_BGR;
29 }
Here is the caller graph for this function:

◆ png_set_swap()

void PNGAPI png_set_swap ( png_structrp  png_ptr)
36 {
37  png_debug(1, "in png_set_swap");
38 
39  if (png_ptr == NULL)
40  return;
41 
42  if (png_ptr->bit_depth == 16)
43  png_ptr->transformations |= PNG_SWAP_BYTES;
44 }
Here is the caller graph for this function:

◆ png_set_packing()

void PNGAPI png_set_packing ( png_structrp  png_ptr)
51 {
52  png_debug(1, "in png_set_packing");
53 
54  if (png_ptr == NULL)
55  return;
56 
57  if (png_ptr->bit_depth < 8)
58  {
59  png_ptr->transformations |= PNG_PACK;
60 # ifdef PNG_WRITE_SUPPORTED
61  png_ptr->usr_bit_depth = 8;
62 # endif
63  }
64 }
Here is the caller graph for this function:

◆ png_set_packswap()

void PNGAPI png_set_packswap ( png_structrp  png_ptr)
71 {
72  png_debug(1, "in png_set_packswap");
73 
74  if (png_ptr == NULL)
75  return;
76 
77  if (png_ptr->bit_depth < 8)
78  png_ptr->transformations |= PNG_PACKSWAP;
79 }
Here is the caller graph for this function:

◆ png_set_shift()

void PNGAPI png_set_shift ( png_structrp  png_ptr,
png_const_color_8p  true_bits 
)
85 {
86  png_debug(1, "in png_set_shift");
87 
88  if (png_ptr == NULL)
89  return;
90 
91  png_ptr->transformations |= PNG_SHIFT;
92  png_ptr->shift = *true_bits;
93 }
Here is the caller graph for this function:

◆ png_set_interlace_handling()

int PNGAPI png_set_interlace_handling ( png_structrp  png_ptr)
100 {
101  png_debug(1, "in png_set_interlace handling");
102 
103  if (png_ptr != 0 && png_ptr->interlaced != 0)
104  {
105  png_ptr->transformations |= PNG_INTERLACE;
106  return (7);
107  }
108 
109  return (1);
110 }
Here is the caller graph for this function:

◆ png_set_filler()

void PNGAPI png_set_filler ( png_structrp  png_ptr,
png_uint_32  filler,
int  filler_loc 
)
121 {
122  png_debug(1, "in png_set_filler");
123 
124  if (png_ptr == NULL)
125  return;
126 
127  /* In libpng 1.6 it is possible to determine whether this is a read or write
128  * operation and therefore to do more checking here for a valid call.
129  */
130  if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0)
131  {
132 # ifdef PNG_READ_FILLER_SUPPORTED
133  /* On read png_set_filler is always valid, regardless of the base PNG
134  * format, because other transformations can give a format where the
135  * filler code can execute (basically an 8 or 16-bit component RGB or G
136  * format.)
137  *
138  * NOTE: usr_channels is not used by the read code! (This has led to
139  * confusion in the past.) The filler is only used in the read code.
140  */
141  png_ptr->filler = (png_uint_16)filler;
142 # else
143  png_app_error(png_ptr, "png_set_filler not supported on read");
144  PNG_UNUSED(filler) /* not used in the write case */
145  return;
146 # endif
147  }
148 
149  else /* write */
150  {
151 # ifdef PNG_WRITE_FILLER_SUPPORTED
152  /* On write the usr_channels parameter must be set correctly at the
153  * start to record the number of channels in the app-supplied data.
154  */
155  switch (png_ptr->color_type)
156  {
157  case PNG_COLOR_TYPE_RGB:
158  png_ptr->usr_channels = 4;
159  break;
160 
161  case PNG_COLOR_TYPE_GRAY:
162  if (png_ptr->bit_depth >= 8)
163  {
164  png_ptr->usr_channels = 2;
165  break;
166  }
167 
168  else
169  {
170  /* There simply isn't any code in libpng to strip out bits
171  * from bytes when the components are less than a byte in
172  * size!
173  */
175  "png_set_filler is invalid for"
176  " low bit depth gray output");
177  return;
178  }
179 
180  default:
182  "png_set_filler: inappropriate color type");
183  return;
184  }
185 # else
186  png_app_error(png_ptr, "png_set_filler not supported on write");
187  return;
188 # endif
189  }
190 
191  /* Here on success - libpng supports the operation, set the transformation
192  * and the flag to say where the filler channel is.
193  */
194  png_ptr->transformations |= PNG_FILLER;
195 
196  if (filler_loc == PNG_FILLER_AFTER)
197  png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
198 
199  else
200  png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;
201 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ png_set_add_alpha()

void PNGAPI png_set_add_alpha ( png_structrp  png_ptr,
png_uint_32  filler,
int  filler_loc 
)
206 {
207  png_debug(1, "in png_set_add_alpha");
208 
209  if (png_ptr == NULL)
210  return;
211 
212  png_set_filler(png_ptr, filler, filler_loc);
213  /* The above may fail to do anything. */
214  if ((png_ptr->transformations & PNG_FILLER) != 0)
215  png_ptr->transformations |= PNG_ADD_ALPHA;
216 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ png_set_swap_alpha()

void PNGAPI png_set_swap_alpha ( png_structrp  png_ptr)
224 {
225  png_debug(1, "in png_set_swap_alpha");
226 
227  if (png_ptr == NULL)
228  return;
229 
230  png_ptr->transformations |= PNG_SWAP_ALPHA;
231 }
Here is the caller graph for this function:

◆ png_set_invert_alpha()

void PNGAPI png_set_invert_alpha ( png_structrp  png_ptr)
238 {
239  png_debug(1, "in png_set_invert_alpha");
240 
241  if (png_ptr == NULL)
242  return;
243 
244  png_ptr->transformations |= PNG_INVERT_ALPHA;
245 }
Here is the caller graph for this function:

◆ png_set_invert_mono()

void PNGAPI png_set_invert_mono ( png_structrp  png_ptr)
251 {
252  png_debug(1, "in png_set_invert_mono");
253 
254  if (png_ptr == NULL)
255  return;
256 
257  png_ptr->transformations |= PNG_INVERT_MONO;
258 }
Here is the caller graph for this function:

◆ png_do_invert()

void png_do_invert ( png_row_infop  row_info,
png_bytep  row 
)
263 {
264  png_debug(1, "in png_do_invert");
265 
266  /* This test removed from libpng version 1.0.13 and 1.2.0:
267  * if (row_info->bit_depth == 1 &&
268  */
269  if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
270  {
271  png_bytep rp = row;
272  size_t i;
273  size_t istop = row_info->rowbytes;
274 
275  for (i = 0; i < istop; i++)
276  {
277  *rp = (png_byte)(~(*rp));
278  rp++;
279  }
280  }
281 
282  else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
283  row_info->bit_depth == 8)
284  {
285  png_bytep rp = row;
286  size_t i;
287  size_t istop = row_info->rowbytes;
288 
289  for (i = 0; i < istop; i += 2)
290  {
291  *rp = (png_byte)(~(*rp));
292  rp += 2;
293  }
294  }
295 
296 #ifdef PNG_16BIT_SUPPORTED
297  else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
298  row_info->bit_depth == 16)
299  {
300  png_bytep rp = row;
301  size_t i;
302  size_t istop = row_info->rowbytes;
303 
304  for (i = 0; i < istop; i += 4)
305  {
306  *rp = (png_byte)(~(*rp));
307  *(rp + 1) = (png_byte)(~(*(rp + 1)));
308  rp += 4;
309  }
310  }
311 #endif
312 }
Here is the caller graph for this function:

◆ png_do_swap()

void png_do_swap ( png_row_infop  row_info,
png_bytep  row 
)
320 {
321  png_debug(1, "in png_do_swap");
322 
323  if (row_info->bit_depth == 16)
324  {
325  png_bytep rp = row;
326  png_uint_32 i;
327  png_uint_32 istop= row_info->width * row_info->channels;
328 
329  for (i = 0; i < istop; i++, rp += 2)
330  {
331 #ifdef PNG_BUILTIN_BSWAP16_SUPPORTED
332  /* Feature added to libpng-1.6.11 for testing purposes, not
333  * enabled by default.
334  */
335  *(png_uint_16*)rp = __builtin_bswap16(*(png_uint_16*)rp);
336 #else
337  png_byte t = *rp;
338  *rp = *(rp + 1);
339  *(rp + 1) = t;
340 #endif
341  }
342  }
343 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ png_do_packswap()

void png_do_packswap ( png_row_infop  row_info,
png_bytep  row 
)
456 {
457  png_debug(1, "in png_do_packswap");
458 
459  if (row_info->bit_depth < 8)
460  {
461  png_bytep rp;
462  png_const_bytep end, table;
463 
464  end = row + row_info->rowbytes;
465 
466  if (row_info->bit_depth == 1)
467  table = onebppswaptable;
468 
469  else if (row_info->bit_depth == 2)
470  table = twobppswaptable;
471 
472  else if (row_info->bit_depth == 4)
473  table = fourbppswaptable;
474 
475  else
476  return;
477 
478  for (rp = row; rp < end; rp++)
479  *rp = table[*rp];
480  }
481 }
Here is the caller graph for this function:

◆ png_do_strip_channel()

void png_do_strip_channel ( png_row_infop  row_info,
png_bytep  row,
int  at_start 
)
496 {
497  png_bytep sp = row; /* source pointer */
498  png_bytep dp = row; /* destination pointer */
499  png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */
500 
501  /* At the start sp will point to the first byte to copy and dp to where
502  * it is copied to. ep always points just beyond the end of the row, so
503  * the loop simply copies (channels-1) channels until sp reaches ep.
504  *
505  * at_start: 0 -- convert AG, XG, ARGB, XRGB, AAGG, XXGG, etc.
506  * nonzero -- convert GA, GX, RGBA, RGBX, GGAA, RRGGBBXX, etc.
507  */
508 
509  /* GA, GX, XG cases */
510  if (row_info->channels == 2)
511  {
512  if (row_info->bit_depth == 8)
513  {
514  if (at_start != 0) /* Skip initial filler */
515  ++sp;
516  else /* Skip initial channel and, for sp, the filler */
517  {
518  sp += 2; ++dp;
519  }
520 
521  /* For a 1 pixel wide image there is nothing to do */
522  while (sp < ep)
523  {
524  *dp++ = *sp; sp += 2;
525  }
526 
527  row_info->pixel_depth = 8;
528  }
529 
530  else if (row_info->bit_depth == 16)
531  {
532  if (at_start != 0) /* Skip initial filler */
533  sp += 2;
534  else /* Skip initial channel and, for sp, the filler */
535  {
536  sp += 4; dp += 2;
537  }
538 
539  while (sp < ep)
540  {
541  *dp++ = *sp++; *dp++ = *sp; sp += 3;
542  }
543 
544  row_info->pixel_depth = 16;
545  }
546 
547  else
548  return; /* bad bit depth */
549 
550  row_info->channels = 1;
551 
552  /* Finally fix the color type if it records an alpha channel */
553  if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
554  row_info->color_type = PNG_COLOR_TYPE_GRAY;
555  }
556 
557  /* RGBA, RGBX, XRGB cases */
558  else if (row_info->channels == 4)
559  {
560  if (row_info->bit_depth == 8)
561  {
562  if (at_start != 0) /* Skip initial filler */
563  ++sp;
564  else /* Skip initial channels and, for sp, the filler */
565  {
566  sp += 4; dp += 3;
567  }
568 
569  /* Note that the loop adds 3 to dp and 4 to sp each time. */
570  while (sp < ep)
571  {
572  *dp++ = *sp++; *dp++ = *sp++; *dp++ = *sp; sp += 2;
573  }
574 
575  row_info->pixel_depth = 24;
576  }
577 
578  else if (row_info->bit_depth == 16)
579  {
580  if (at_start != 0) /* Skip initial filler */
581  sp += 2;
582  else /* Skip initial channels and, for sp, the filler */
583  {
584  sp += 8; dp += 6;
585  }
586 
587  while (sp < ep)
588  {
589  /* Copy 6 bytes, skip 2 */
590  *dp++ = *sp++; *dp++ = *sp++;
591  *dp++ = *sp++; *dp++ = *sp++;
592  *dp++ = *sp++; *dp++ = *sp; sp += 3;
593  }
594 
595  row_info->pixel_depth = 48;
596  }
597 
598  else
599  return; /* bad bit depth */
600 
601  row_info->channels = 3;
602 
603  /* Finally fix the color type if it records an alpha channel */
604  if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
605  row_info->color_type = PNG_COLOR_TYPE_RGB;
606  }
607 
608  else
609  return; /* The filler channel has gone already */
610 
611  /* Fix the rowbytes value. */
612  row_info->rowbytes = (size_t)(dp-row);
613 }
Here is the caller graph for this function:

◆ png_do_bgr()

void png_do_bgr ( png_row_infop  row_info,
png_bytep  row 
)
620 {
621  png_debug(1, "in png_do_bgr");
622 
623  if ((row_info->color_type & PNG_COLOR_MASK_COLOR) != 0)
624  {
625  png_uint_32 row_width = row_info->width;
626  if (row_info->bit_depth == 8)
627  {
628  if (row_info->color_type == PNG_COLOR_TYPE_RGB)
629  {
630  png_bytep rp;
631  png_uint_32 i;
632 
633  for (i = 0, rp = row; i < row_width; i++, rp += 3)
634  {
635  png_byte save = *rp;
636  *rp = *(rp + 2);
637  *(rp + 2) = save;
638  }
639  }
640 
641  else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
642  {
643  png_bytep rp;
644  png_uint_32 i;
645 
646  for (i = 0, rp = row; i < row_width; i++, rp += 4)
647  {
648  png_byte save = *rp;
649  *rp = *(rp + 2);
650  *(rp + 2) = save;
651  }
652  }
653  }
654 
655 #ifdef PNG_16BIT_SUPPORTED
656  else if (row_info->bit_depth == 16)
657  {
658  if (row_info->color_type == PNG_COLOR_TYPE_RGB)
659  {
660  png_bytep rp;
661  png_uint_32 i;
662 
663  for (i = 0, rp = row; i < row_width; i++, rp += 6)
664  {
665  png_byte save = *rp;
666  *rp = *(rp + 4);
667  *(rp + 4) = save;
668  save = *(rp + 1);
669  *(rp + 1) = *(rp + 5);
670  *(rp + 5) = save;
671  }
672  }
673 
674  else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
675  {
676  png_bytep rp;
677  png_uint_32 i;
678 
679  for (i = 0, rp = row; i < row_width; i++, rp += 8)
680  {
681  png_byte save = *rp;
682  *rp = *(rp + 4);
683  *(rp + 4) = save;
684  save = *(rp + 1);
685  *(rp + 1) = *(rp + 5);
686  *(rp + 5) = save;
687  }
688  }
689  }
690 #endif
691  }
692 }
Here is the caller graph for this function:

◆ png_do_check_palette_indexes()

void png_do_check_palette_indexes ( png_structrp  png_ptr,
png_row_infop  row_info 
)
700 {
701  if (png_ptr->num_palette < (1 << row_info->bit_depth) &&
702  png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */
703  {
704  /* Calculations moved outside switch in an attempt to stop different
705  * compiler warnings. 'padding' is in *bits* within the last byte, it is
706  * an 'int' because pixel_depth becomes an 'int' in the expression below,
707  * and this calculation is used because it avoids warnings that other
708  * forms produced on either GCC or MSVC.
709  */
710  int padding = PNG_PADBITS(row_info->pixel_depth, row_info->width);
711  png_bytep rp = png_ptr->row_buf + row_info->rowbytes - 1;
712 
713  switch (row_info->bit_depth)
714  {
715  case 1:
716  {
717  /* in this case, all bytes must be 0 so we don't need
718  * to unpack the pixels except for the rightmost one.
719  */
720  for (; rp > png_ptr->row_buf; rp--)
721  {
722  if ((*rp >> padding) != 0)
723  png_ptr->num_palette_max = 1;
724  padding = 0;
725  }
726 
727  break;
728  }
729 
730  case 2:
731  {
732  for (; rp > png_ptr->row_buf; rp--)
733  {
734  int i = ((*rp >> padding) & 0x03);
735 
736  if (i > png_ptr->num_palette_max)
737  png_ptr->num_palette_max = i;
738 
739  i = (((*rp >> padding) >> 2) & 0x03);
740 
741  if (i > png_ptr->num_palette_max)
742  png_ptr->num_palette_max = i;
743 
744  i = (((*rp >> padding) >> 4) & 0x03);
745 
746  if (i > png_ptr->num_palette_max)
747  png_ptr->num_palette_max = i;
748 
749  i = (((*rp >> padding) >> 6) & 0x03);
750 
751  if (i > png_ptr->num_palette_max)
752  png_ptr->num_palette_max = i;
753 
754  padding = 0;
755  }
756 
757  break;
758  }
759 
760  case 4:
761  {
762  for (; rp > png_ptr->row_buf; rp--)
763  {
764  int i = ((*rp >> padding) & 0x0f);
765 
766  if (i > png_ptr->num_palette_max)
767  png_ptr->num_palette_max = i;
768 
769  i = (((*rp >> padding) >> 4) & 0x0f);
770 
771  if (i > png_ptr->num_palette_max)
772  png_ptr->num_palette_max = i;
773 
774  padding = 0;
775  }
776 
777  break;
778  }
779 
780  case 8:
781  {
782  for (; rp > png_ptr->row_buf; rp--)
783  {
784  if (*rp > png_ptr->num_palette_max)
785  png_ptr->num_palette_max = (int) *rp;
786  }
787 
788  break;
789  }
790 
791  default:
792  break;
793  }
794  }
795 }
Here is the caller graph for this function:

◆ png_set_user_transform_info()

void PNGAPI png_set_user_transform_info ( png_structrp  png_ptr,
png_voidp  user_transform_ptr,
int  user_transform_depth,
int  user_transform_channels 
)
804 {
805  png_debug(1, "in png_set_user_transform_info");
806 
807  if (png_ptr == NULL)
808  return;
809 
810 #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
811  if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 &&
812  (png_ptr->flags & PNG_FLAG_ROW_INIT) != 0)
813  {
815  "info change after png_start_read_image or png_read_update_info");
816  return;
817  }
818 #endif
819 
820  png_ptr->user_transform_ptr = user_transform_ptr;
821  png_ptr->user_transform_depth = (png_byte)user_transform_depth;
822  png_ptr->user_transform_channels = (png_byte)user_transform_channels;
823 }
Here is the call graph for this function:

◆ png_get_user_transform_ptr()

png_voidp PNGAPI png_get_user_transform_ptr ( png_const_structrp  png_ptr)
834 {
835  if (png_ptr == NULL)
836  return (NULL);
837 
838  return png_ptr->user_transform_ptr;
839 }

◆ png_get_current_row_number()

png_uint_32 PNGAPI png_get_current_row_number ( png_const_structrp  png_ptr)
845 {
846  /* See the comments in png.h - this is the sub-image row when reading an
847  * interlaced image.
848  */
849  if (png_ptr != NULL)
850  return png_ptr->row_number;
851 
852  return PNG_UINT_32_MAX; /* help the app not to fail silently */
853 }

◆ png_get_current_pass_number()

png_byte PNGAPI png_get_current_pass_number ( png_const_structrp  png_ptr)
857 {
858  if (png_ptr != NULL)
859  return png_ptr->pass;
860  return 8; /* invalid */
861 }

Variable Documentation

◆ onebppswaptable

const png_byte onebppswaptable[256]
static

◆ twobppswaptable

const png_byte twobppswaptable[256]
static

◆ fourbppswaptable

const png_byte fourbppswaptable[256]
static
PNG_BGR
#define PNG_BGR
Definition: pngpriv.h:642
png_const_bytep
const typedef png_byte * png_const_bytep
Definition: pngconf.h:580
PNG_FILLER_AFTER
#define PNG_FILLER_AFTER
Definition: png.h:1249
PNG_UNUSED
#define PNG_UNUSED(param)
Definition: pngpriv.h:438
onebppswaptable
static const png_byte onebppswaptable[256]
Definition: pngtrans.c:348
PNG_INVERT_ALPHA
#define PNG_INVERT_ALPHA
Definition: pngpriv.h:661
PNG_PADBITS
#define PNG_PADBITS(pixel_bits, width)
Definition: pngpriv.h:758
PNG_FLAG_ROW_INIT
#define PNG_FLAG_ROW_INIT
Definition: pngpriv.h:685
PNG_IS_READ_STRUCT
#define PNG_IS_READ_STRUCT
Definition: pngpriv.h:639
twobppswaptable
static const png_byte twobppswaptable[256]
Definition: pngtrans.c:383
PNG_UINT_32_MAX
#define PNG_UINT_32_MAX
Definition: png.h:650
png_bytep
png_byte * png_bytep
Definition: pngconf.h:579
i
uint8_t i
Definition: screen_test_graph.c:72
PNG_INVERT_MONO
#define PNG_INVERT_MONO
Definition: pngpriv.h:647
PNG_COLOR_TYPE_RGB_ALPHA
#define PNG_COLOR_TYPE_RGB_ALPHA
Definition: png.h:671
NULL
#define NULL
Definition: usbd_def.h:53
png_row_info_struct::width
png_uint_32 width
Definition: png.h:756
png_ptr
png_structrp png_ptr
Definition: png.h:1083
PNG_COLOR_TYPE_RGB
#define PNG_COLOR_TYPE_RGB
Definition: png.h:670
createSpeedLookupTable.end
end
Definition: createSpeedLookupTable.py:33
PNG_SWAP_BYTES
#define PNG_SWAP_BYTES
Definition: pngpriv.h:646
png_uint_32
unsigned int png_uint_32
Definition: pngconf.h:511
png_uint_16
png_uint_16(PNGAPI png_get_uint_16)(png_const_bytep buf)
Definition: pngrutil.c:102
PNG_PACKSWAP
#define PNG_PACKSWAP
Definition: pngpriv.h:658
png_row_info_struct::channels
png_byte channels
Definition: png.h:760
PNG_COLOR_TYPE_GRAY
#define PNG_COLOR_TYPE_GRAY
Definition: png.h:668
png_row_info_struct::color_type
png_byte color_type
Definition: png.h:758
png_debug
#define png_debug(l, m)
Definition: pngdebug.h:145
PNG_INTERLACE
#define PNG_INTERLACE
Definition: pngpriv.h:643
PNG_FILLER
#define PNG_FILLER
Definition: pngpriv.h:657
fourbppswaptable
static const png_byte fourbppswaptable[256]
Definition: pngtrans.c:418
png_row_info_struct::pixel_depth
png_byte pixel_depth
Definition: png.h:761
png_set_filler
void PNGAPI png_set_filler(png_structrp png_ptr, png_uint_32 filler, int filler_loc)
Definition: pngtrans.c:120
PNG_ADD_ALPHA
#define PNG_ADD_ALPHA
Definition: pngpriv.h:667
PNG_SHIFT
#define PNG_SHIFT
Definition: pngpriv.h:645
PNG_FLAG_FILLER_AFTER
#define PNG_FLAG_FILLER_AFTER
Definition: pngpriv.h:686
PNG_COLOR_MASK_COLOR
#define PNG_COLOR_MASK_COLOR
Definition: png.h:664
createSpeedLookupTable.int
int
Definition: createSpeedLookupTable.py:15
PNG_PACK
#define PNG_PACK
Definition: pngpriv.h:644
png_row_info_struct::rowbytes
size_t rowbytes
Definition: png.h:757
png_app_error
void png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
Definition: pngerror.c:405
png_row_info_struct::bit_depth
png_byte bit_depth
Definition: png.h:759
PNG_COLOR_TYPE_GRAY_ALPHA
#define PNG_COLOR_TYPE_GRAY_ALPHA
Definition: png.h:672
PNG_SWAP_ALPHA
#define PNG_SWAP_ALPHA
Definition: pngpriv.h:659