1LIBPNGPF(3)                Library Functions Manual                LIBPNGPF(3)
2
3
4

NAME

6       libpng - Portable Network Graphics (PNG) Reference Library 1.2.46 (pri‐
7       vate functions)
8

SYNOPSIS

10       #include <png.h>
11
12
13
14       void png_64bit_product (long v1, long v2, unsigned long *hi_product,
15
16       unsigned long *lo_product);
17
18
19
20       void png_build_gamma_table (png_structp png_ptr);
21
22
23
24
25
26       void png_build_grayscale_palette (int bit_depth, png_colorp palette);
27
28
29
30
31
32       void png_calculate_crc (png_structp png_ptr, png_bytep ptr,  png_size_t
33       length);
34
35
36
37
38
39       int    png_check_cHRM_fixed   (png_structp   png_ptr,   png_fixed_point
40       int_white_x, png_fixed_point  int_white_y,  png_fixed_point  int_red_x,
41       png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point
42       int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y);
43
44
45
46
47
48       void   png_check_IHDR   (png_structp   png_ptr,   png_uint_32    width,
49       png_uint_32  height, int bit_depth, int color_type, int interlace_type,
50       int compression_type, int filter_type);
51
52
53
54
55
56       void png_check_chunk_name (png_structp png_ptr, png_bytep chunk_name);
57
58
59
60
61
62       png_size_t  png_check_keyword  (png_structp  png_ptr,  png_charp   key,
63       png_charpp new_key);
64
65
66
67
68
69       void png_combine_row (png_structp png_ptr, png_bytep row, int mask);
70
71
72
73
74
75       void  png_correct_palette (png_structp png_ptr, png_colorp palette, int
76       num_palette);
77
78
79
80
81
82       int png_crc_error (png_structp png_ptr);
83
84
85
86
87
88       int png_crc_finish (png_structp png_ptr, png_uint_32 skip);
89
90
91
92
93
94       void  png_crc_read  (png_structp  png_ptr,  png_bytep  buf,  png_size_t
95       length);
96
97
98
99
100
101       png_voidp png_create_struct (int type);
102
103
104
105
106
107       png_voidp  png_create_struct_2  (int  type,  png_malloc_ptr  malloc_fn,
108       png_voidp mem_ptr);
109
110
111
112
113
114       void  png_decompress_chunk   (png_structp   png_ptr,   int   comp_type,
115       png_charp  chunkdata, png_size_t chunklength, png_size_t prefix_length,
116       png_size_t *data_length);
117
118
119
120
121
122       void png_destroy_struct (png_voidp struct_ptr);
123
124
125
126
127
128       void png_destroy_struct_2 (png_voidp struct_ptr, png_free_ptr  free_fn,
129       png_voidp mem_ptr);
130
131
132
133
134
135       void   png_do_background   (png_row_infop   row_info,   png_bytep  row,
136       png_color_16p  trans_values,  png_color_16p  background,  png_color_16p
137       background_1,  png_bytep gamma_table, png_bytep gamma_from_1, png_bytep
138       gamma_to_1,  png_uint_16pp  gamma_16,  png_uint_16pp   gamma_16_from_1,
139       png_uint_16pp gamma_16_to_1, int gamma_shift);
140
141
142
143
144
145       void png_do_bgr (png_row_infop row_info, png_bytep row);
146
147
148
149
150
151       void png_do_chop (png_row_infop row_info, png_bytep row);
152
153
154
155
156
157       void  png_do_dither  (png_row_infop  row_info, png_bytep row, png_bytep
158       palette_lookup, png_bytep dither_lookup);
159
160
161
162
163
164       void   png_do_expand   (png_row_infop    row_info,    png_bytep    row,
165       png_color_16p trans_value);
166
167
168
169
170
171       void  png_do_expand_palette  (png_row_infop  row_info,  png_bytep  row,
172       png_colorp palette, png_bytep trans, int num_trans);
173
174
175
176
177
178       void png_do_gamma (png_row_infop  row_info,  png_bytep  row,  png_bytep
179       gamma_table, png_uint_16pp gamma_16_table, int gamma_shift);
180
181
182
183
184
185       void png_do_gray_to_rgb (png_row_infop row_info, png_bytep row);
186
187
188
189
190
191       void png_do_invert (png_row_infop row_info, png_bytep row);
192
193
194
195
196
197       void  png_do_pack  (png_row_infop  row_info, png_bytep row, png_uint_32
198       bit_depth);
199
200
201
202
203
204       void png_do_packswap (png_row_infop row_info, png_bytep row);
205
206
207
208
209
210       void  png_do_read_filler  (png_row_infop   row_info,   png_bytep   row,
211       png_uint_32 filler, png_uint_32 flags);
212
213
214
215
216
217       void  png_do_read_interlace (png_row_infop row_info, png_bytep row, int
218       pass, png_uint_32 transformations);
219
220
221
222
223
224       void png_do_read_invert_alpha (png_row_infop row_info, png_bytep row);
225
226
227
228
229
230       void png_do_read_swap_alpha (png_row_infop row_info, png_bytep row);
231
232
233
234
235
236       void png_do_read_transformations (png_structp png_ptr);
237
238
239
240
241
242       int png_do_rgb_to_gray (png_row_infop row_info, png_bytep row);
243
244
245
246
247
248       void png_do_shift (png_row_infop row_info, png_bytep row,  png_color_8p
249       bit_depth);
250
251
252
253
254
255       void   png_do_strip_filler   (png_row_infop  row_info,  png_bytep  row,
256       png_uint_32 flags);
257
258
259
260
261
262       void png_do_swap (png_row_infop row_info, png_bytep row);
263
264
265
266
267
268       void png_do_unpack (png_row_infop row_info, png_bytep row);
269
270
271
272
273
274       void   png_do_unshift   (png_row_infop   row_info,    png_bytep    row,
275       png_color_8p sig_bits);
276
277
278
279
280
281       void png_do_write_interlace (png_row_infop row_info, png_bytep row, int
282       pass);
283
284
285
286
287
288       void png_do_write_invert_alpha (png_row_infop row_info, png_bytep row);
289
290
291
292
293
294       void png_do_write_swap_alpha (png_row_infop row_info, png_bytep row);
295
296
297
298
299
300       void png_do_write_transformations (png_structp png_ptr);
301
302
303
304
305
306       void *png_far_to_near (png_structp png_ptr,png_voidp ptr, int check);
307
308
309
310
311
312       void png_flush (png_structp png_ptr);
313
314
315
316
317
318       void  png_handle_bKGD   (png_structp   png_ptr,   png_infop   info_ptr,
319       png_uint_32 length);
320
321
322
323
324
325       void   png_handle_cHRM   (png_structp   png_ptr,   png_infop  info_ptr,
326       png_uint_32 length);
327
328
329
330
331
332       void  png_handle_gAMA   (png_structp   png_ptr,   png_infop   info_ptr,
333       png_uint_32 length);
334
335
336
337
338
339       void   png_handle_hIST   (png_structp   png_ptr,   png_infop  info_ptr,
340       png_uint_32 length);
341
342
343
344
345
346       void  png_handle_IEND   (png_structp   png_ptr,   png_infop   info_ptr,
347       png_uint_32 length);
348
349
350
351
352
353       void   png_handle_IHDR   (png_structp   png_ptr,   png_infop  info_ptr,
354       png_uint_32 length);
355
356
357
358
359
360       void  png_handle_iCCP   (png_structp   png_ptr,   png_infop   info_ptr,
361       png_uint_32 length);
362
363
364
365
366
367       void   png_handle_iTXt   (png_structp   png_ptr,   png_infop  info_ptr,
368       png_uint_32 length);
369
370
371
372
373
374       void  png_handle_oFFs   (png_structp   png_ptr,   png_infop   info_ptr,
375       png_uint_32 length);
376
377
378
379
380
381       void   png_handle_pCAL   (png_structp   png_ptr,   png_infop  info_ptr,
382       png_uint_32 length);
383
384
385
386
387
388       void  png_handle_pHYs   (png_structp   png_ptr,   png_infop   info_ptr,
389       png_uint_32 length);
390
391
392
393
394
395       void   png_handle_PLTE   (png_structp   png_ptr,   png_infop  info_ptr,
396       png_uint_32 length);
397
398
399
400
401
402       void  png_handle_sBIT   (png_structp   png_ptr,   png_infop   info_ptr,
403       png_uint_32 length);
404
405
406
407
408
409       void   png_handle_sCAL   (png_structp   png_ptr,   png_infop  info_ptr,
410       png_uint_32 length);
411
412
413
414
415
416       void  png_handle_sPLT   (png_structp   png_ptr,   png_infop   info_ptr,
417       png_uint_32 length);
418
419
420
421
422
423       void   png_handle_sRGB   (png_structp   png_ptr,   png_infop  info_ptr,
424       png_uint_32 length);
425
426
427
428
429
430       void  png_handle_tEXt   (png_structp   png_ptr,   png_infop   info_ptr,
431       png_uint_32 length);
432
433
434
435
436
437       void   png_handle_tIME   (png_structp   png_ptr,   png_infop  info_ptr,
438       png_uint_32 length);
439
440
441
442
443
444       void  png_handle_tRNS   (png_structp   png_ptr,   png_infop   info_ptr,
445       png_uint_32 length);
446
447
448
449
450
451       void   png_handle_unknown  (png_structp  png_ptr,  png_infop  info_ptr,
452       png_uint_32 length);
453
454
455
456
457
458       void  png_handle_zTXt   (png_structp   png_ptr,   png_infop   info_ptr,
459       png_uint_32 length);
460
461
462
463
464
465       void png_info_destroy (png_structp png_ptr, png_infop info_ptr);
466
467
468
469
470
471       void png_init_mmx_flags (png_structp png_ptr);
472
473
474
475
476
477       void png_init_read_transformations (png_structp png_ptr);
478
479
480
481
482
483       void  png_process_IDAT_data  (png_structp  png_ptr,  png_bytep  buffer,
484       png_size_t buffer_length);
485
486
487
488
489
490       void png_process_some_data (png_structp png_ptr, png_infop info_ptr);
491
492
493
494
495
496       void png_push_check_crc (png_structp png_ptr);
497
498
499
500
501
502       void png_push_crc_finish (png_structp png_ptr);
503
504
505
506
507
508       void png_push_crc_skip (png_structp png_ptr, png_uint_32 length);
509
510
511
512
513
514       void  png_push_fill_buffer  (png_structp  png_ptr,  png_bytep   buffer,
515       png_size_t length);
516
517
518
519
520
521       void  png_push_handle_tEXt  (png_structp  png_ptr,  png_infop info_ptr,
522       png_uint_32 length);
523
524
525
526
527
528       void png_push_handle_unknown (png_structp png_ptr, png_infop  info_ptr,
529       png_uint_32 length);
530
531
532
533
534
535       void  png_push_handle_zTXt  (png_structp  png_ptr,  png_infop info_ptr,
536       png_uint_32 length);
537
538
539
540
541
542       void png_push_have_end (png_structp png_ptr, png_infop info_ptr);
543
544
545
546
547
548       void png_push_have_info (png_structp png_ptr, png_infop info_ptr);
549
550
551
552
553
554       void png_push_have_row (png_structp png_ptr, png_bytep row);
555
556
557
558
559
560       void png_push_process_row (png_structp png_ptr);
561
562
563
564
565
566       void png_push_read_chunk (png_structp png_ptr, png_infop info_ptr);
567
568
569
570
571
572       void png_push_read_end (png_structp png_ptr, png_infop info_ptr);
573
574
575
576
577
578       void png_push_read_IDAT (png_structp png_ptr);
579
580
581
582
583
584       void png_push_read_sig (png_structp png_ptr, png_infop info_ptr);
585
586
587
588
589
590       void png_push_read_tEXt (png_structp png_ptr, png_infop info_ptr);
591
592
593
594
595
596       void png_push_read_zTXt (png_structp png_ptr, png_infop info_ptr);
597
598
599
600
601
602       void png_push_restore_buffer (png_structp  png_ptr,  png_bytep  buffer,
603       png_size_t buffer_length);
604
605
606
607
608
609       void png_push_save_buffer (png_structp png_ptr);
610
611
612
613
614
615       png_uint_32 png_read_chunk_header (png_structp png_ptr);
616
617
618
619
620
621       void  png_read_data  (png_structp  png_ptr,  png_bytep data, png_size_t
622       length);
623
624
625
626
627
628       void png_read_filter_row (png_structp png_ptr, png_row_infop  row_info,
629       png_bytep row, png_bytep prev_row, int filter);
630
631
632
633
634
635       void png_read_finish_row (png_structp png_ptr);
636
637
638
639
640
641       void png_read_push_finish_row (png_structp png_ptr);
642
643
644
645
646
647       void png_read_start_row (png_structp png_ptr);
648
649
650
651
652
653       void png_read_transform_info (png_structp png_ptr, png_infop info_ptr);
654
655
656
657
658
659       void png_reset_crc (png_structp png_ptr);
660
661
662
663
664
665       int  png_set_text_2 (png_structp png_ptr, png_infop info_ptr, png_textp
666       text_ptr, int num_text);
667
668
669
670
671
672       void  png_write_cHRM  (png_structp  png_ptr,  double  white_x,   double
673       white_y,  double  red_x,  double red_y, double green_x, double green_y,
674       double blue_x, double blue_y);
675
676
677
678
679
680       void png_write_cHRM_fixed (png_structp  png_ptr,  png_uint_32  white_x,
681       png_uint_32  white_y, png_uint_32 red_x, png_uint_32 red_y, png_uint_32
682       green_x, png_uint_32 green_y, png_uint_32 blue_x, png_uint_32 blue_y);
683
684
685
686
687
688       void png_write_data (png_structp png_ptr,  png_bytep  data,  png_size_t
689       length);
690
691
692
693
694
695       void   png_write_filtered_row   (png_structp  png_ptr,  png_bytep  fil‐
696       tered_row);
697
698
699
700
701
702       void   png_write_find_filter   (png_structp   png_ptr,    png_row_infop
703       row_info);
704
705
706
707
708
709       void png_write_finish_row (png_structp png_ptr);
710
711
712
713
714
715       void png_write_gAMA (png_structp png_ptr, double file_gamma);
716
717
718
719
720
721       void    png_write_gAMA_fixed    (png_structp    png_ptr,    png_uint_32
722       int_file_gamma);
723
724
725
726
727
728       void  png_write_hIST  (png_structp  png_ptr,  png_uint_16p  hist,   int
729       num_hist);
730
731
732
733
734
735       void  png_write_iCCP (png_structp png_ptr, png_charp name, int compres‐
736       sion_type, png_charp profile, int proflen);
737
738
739
740
741
742       void png_write_IDAT (png_structp png_ptr,  png_bytep  data,  png_size_t
743       length);
744
745
746
747
748
749       void png_write_IEND (png_structp png_ptr);
750
751
752
753
754
755       void    png_write_IHDR   (png_structp   png_ptr,   png_uint_32   width,
756       png_uint_32  height,  int  bit_depth,  int  color_type,  int   compres‐
757       sion_type, int filter_type, int interlace_type);
758
759
760
761
762
763       void  png_write_iTXt  (png_structp  png_ptr, int compression, png_charp
764       key, png_charp lang, png_charp translated_key, png_charp text);
765
766
767
768
769
770       void  png_write_oFFs  (png_structp   png_ptr,   png_uint_32   x_offset,
771       png_uint_32 y_offset, int unit_type);
772
773
774
775
776
777       void png_write_pCAL (png_structp png_ptr, png_charp purpose, png_int_32
778       X0, png_int_32 X1, int type, int nparams, png_charp  units,  png_charpp
779       params);
780
781
782
783
784
785       void    png_write_pHYs   (png_structp   png_ptr,   png_uint_32   x_pix‐
786       els_per_unit, png_uint_32 y_pixels_per_unit, int unit_type);
787
788
789
790
791
792       void   png_write_PLTE   (png_structp   png_ptr,   png_colorp   palette,
793       png_uint_32 num_pal);
794
795
796
797
798
799       void   png_write_sBIT  (png_structp  png_ptr,  png_color_8p  sbit,  int
800       color_type);
801
802
803
804
805
806       void png_write_sCAL (png_structp png_ptr, png_charp unit, double width,
807       double height);
808
809
810
811
812
813       void  png_write_sCAL_s  (png_structp png_ptr, png_charp unit, png_charp
814       width, png_charp height);
815
816
817
818
819
820       void png_write_sig (png_structp png_ptr);
821
822
823
824
825
826       void png_write_sRGB (png_structp png_ptr, int intent);
827
828
829
830
831
832       void png_write_sPLT (png_structp png_ptr, png_spalette_p palette);
833
834
835
836
837
838       void png_write_start_row (png_structp png_ptr);
839
840
841
842
843
844       void png_write_tEXt  (png_structp  png_ptr,  png_charp  key,  png_charp
845       text, png_size_t text_len);
846
847
848
849
850
851       void png_write_tIME (png_structp png_ptr, png_timep mod_time);
852
853
854
855
856
857       void    png_write_tRNS    (png_structp    png_ptr,   png_bytep   trans,
858       png_color_16p values, int number, int color_type);
859
860
861
862
863
864       void png_write_zTXt  (png_structp  png_ptr,  png_charp  key,  png_charp
865       text, png_size_t text_len, int compression);
866
867
868
869
870
871       voidpf png_zalloc (voidpf png_ptr, uInt items, uInt size);
872
873
874
875
876
877       void png_zfree (voidpf png_ptr, voidpf ptr);
878
879
880
881
882
883

DESCRIPTION

885       The  functions  listed  above  are used privately by libpng and are not
886       recommended for use by applications.  They are not "exported" to appli‐
887       cations using shared libraries.  They are listed alphabetically here as
888       an aid to libpng maintainers.  See png.h for more information on  these
889       functions.
890
891

SEE ALSO

893       libpng(3), png(5)
894

AUTHOR

896       Glenn Randers-Pehrson
897
898
899
900                                 July 9, 2011                      LIBPNGPF(3)
Impressum