Lines Matching refs:pp
959 store_message(png_store *ps, png_const_structp pp, char *buffer, size_t bufsize, in store_message() argument
962 if (pp != NULL && pp == ps->pread) in store_message()
974 else if (pp != NULL && pp == ps->pwrite) in store_message()
999 store_verbose(png_store *ps, png_const_structp pp, png_const_charp prefix, in store_verbose() argument
1007 (void)store_message(ps, pp, buffer, sizeof buffer, 0, message); in store_verbose()
1014 store_log(png_store* ps, png_const_structp pp, png_const_charp message, in store_log() argument
1023 store_message(ps, pp, ps->error, sizeof ps->error, 0, message); in store_log()
1026 store_verbose(ps, pp, is_error ? "error: " : "warning: ", message); in store_log()
1048 png_const_structp pp = ppIn; in store_error() local
1049 png_store *ps = voidcast(png_store*, png_get_error_ptr(pp)); in store_error()
1052 store_log(ps, pp, message, 1 /* error */); in store_error()
1064 png_const_structp pp = ppIn; in store_warning() local
1065 png_store *ps = voidcast(png_store*, png_get_error_ptr(pp)); in store_warning()
1068 store_log(ps, pp, message, 0 /* warning */); in store_warning()
1078 store_image_row(const png_store* ps, png_const_structp pp, int nImage, in store_image_row() argument
1084 png_error(pp, "no allocated image"); in store_image_row()
1087 png_error(pp, "image too small"); in store_image_row()
1093 store_image_free(png_store *ps, png_const_structp pp) in store_image_free() argument
1101 if (pp != NULL) in store_image_free()
1102 png_error(pp, "png_store image overwrite (1)"); in store_image_free()
1115 store_ensure_image(png_store *ps, png_const_structp pp, int nImages, in store_ensure_image() argument
1124 store_image_free(ps, pp); in store_ensure_image()
1131 if (pp == NULL) in store_ensure_image()
1134 png_error(pp, "OOM allocating image buffer"); in store_ensure_image()
1168 png_bytep row = store_image_row(ps, pp, nImages, y); in store_ensure_image()
1182 store_image_check(const png_store* ps, png_const_structp pp, int iImage) in store_image_check() argument
1187 png_error(pp, "image overwrite"); in store_image_check()
1200 png_error(pp, "row start overwritten"); in store_image_check()
1204 png_error(pp, "row end overwritten"); in store_image_check()
1215 png_const_structp pp = ppIn; in store_write() local
1216 png_store *ps = voidcast(png_store*, png_get_io_ptr(pp)); in store_write()
1218 if (ps->pwrite != pp) in store_write()
1219 png_error(pp, "store state damaged"); in store_write()
1337 png_const_structp pp = ppIn; in store_read() local
1338 png_store *ps = voidcast(png_store*, png_get_io_ptr(pp)); in store_read()
1340 if (ps == NULL || ps->pread != pp) in store_read()
1341 png_error(pp, "bad store read call"); in store_read()
1347 store_progressive_read(png_store *ps, png_structp pp, png_infop pi) in store_progressive_read() argument
1352 if (ps->pread != pp || ps->current == NULL || ps->next == NULL) in store_progressive_read()
1353 png_error(pp, "store state damaged (progressive)"); in store_progressive_read()
1358 png_error(pp, "store_read called during progressive read"); in store_progressive_read()
1360 png_process_data(pp, pi, ps->next->buffer, store_read_buffer_size(ps)); in store_progressive_read()
1432 store_pool_error(png_store *ps, png_const_structp pp, const char *msg) in store_pool_error() argument
1434 if (pp != NULL) in store_pool_error()
1435 png_error(pp, msg); in store_pool_error()
1441 store_log(ps, pp, msg, 1 /* error */); in store_pool_error()
1445 store_memory_free(png_const_structp pp, store_pool *pool, store_memory *memory) in store_memory_free() argument
1452 store_pool_error(pool->store, pp, "memory corrupted (pool)"); in store_memory_free()
1455 store_pool_error(pool->store, pp, "memory corrupted (start)"); in store_memory_free()
1463 store_pool_error(pool->store, pp, "memory corrupted (size)"); in store_memory_free()
1467 store_pool_error(pool->store, pp, "memory corrupted (end)"); in store_memory_free()
1533 png_const_structp pp = ppIn; in store_malloc() local
1534 store_pool *pool = voidcast(store_pool*, png_get_mem_ptr(pp)); in store_malloc()
1573 store_log(pool->store, pp, "out of memory", 1 /* is_error */); in store_malloc()
1582 png_const_structp pp = ppIn; in store_free() local
1583 store_pool *pool = voidcast(store_pool*, png_get_mem_ptr(pp)); in store_free()
1591 if (pp != pool->store->pread && pp != pool->store->pwrite) in store_free()
1592 pp = NULL; in store_free()
1602 store_pool_error(pool->store, pp, "bad pointer to free"); in store_free()
1610 store_memory_free(pp, pool, this); in store_free()
2829 png_const_structp pp = ppIn; in modifier_read() local
2830 png_modifier *pm = voidcast(png_modifier*, png_get_io_ptr(pp)); in modifier_read()
2832 if (pm == NULL || pm->this.pread != pp) in modifier_read()
2833 png_error(pp, "bad modifier_read call"); in modifier_read()
2842 modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi) in modifier_progressive_read() argument
2844 if (pm->this.pread != pp || pm->this.current == NULL || in modifier_progressive_read()
2846 png_error(pp, "store state damaged (progressive)"); in modifier_progressive_read()
2883 png_process_data(pp, pi, buffer, cb); in modifier_progressive_read()
2892 png_error(pp, "progressive read implementation error"); in modifier_progressive_read()
3272 init_standard_palette(png_store *ps, png_structp pp, png_infop pi, int npalette, in init_standard_palette() argument
3293 png_set_PLTE(pp, pi, palette, npalette); in init_standard_palette()
3312 png_set_tRNS(pp, pi, tRNS, j, 0/*color*/); in init_standard_palette()
3319 set_random_tRNS(png_structp pp, png_infop pi, const png_byte colour_type, in set_random_tRNS() argument
3358 png_set_tRNS(pp, pi, NULL, 0, &tRNS); in set_random_tRNS()
3366 npasses_from_interlace_type(png_const_structp pp, int interlace_type) in npasses_from_interlace_type() argument
3371 png_error(pp, "invalid interlace type"); in npasses_from_interlace_type()
3382 bit_size(png_const_structp pp, png_byte colour_type, png_byte bit_depth) in bit_size() argument
3386 default: png_error(pp, "invalid color type"); in bit_size()
3407 transform_rowsize(png_const_structp pp, png_byte colour_type, in transform_rowsize() argument
3410 return (TRANSFORM_WIDTH * bit_size(pp, colour_type, bit_depth)) / 8; in transform_rowsize()
3416 #define transform_width(pp, colour_type, bit_depth) TRANSFORM_WIDTH argument
3419 transform_height(png_const_structp pp, png_byte colour_type, png_byte bit_depth) in transform_height() argument
3421 switch (bit_size(pp, colour_type, bit_depth)) in transform_height()
3453 standard_width(png_const_structp pp, png_uint_32 id) in standard_width() argument
3456 UNUSED(pp) in standard_width()
3459 width = transform_width(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id)); in standard_width()
3465 standard_height(png_const_structp pp, png_uint_32 id) in standard_height() argument
3470 height = transform_height(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id)); in standard_height()
3476 standard_rowsize(png_const_structp pp, png_uint_32 id) in standard_rowsize() argument
3478 png_uint_32 width = standard_width(pp, id); in standard_rowsize()
3481 width *= bit_size(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id)); in standard_rowsize()
3487 transform_row(png_const_structp pp, png_byte buffer[TRANSFORM_ROWMAX], in transform_row() argument
3493 switch (bit_size(pp, colour_type, bit_depth)) in transform_row()
3596 png_error(pp, "internal error"); in transform_row()
3611 # define set_write_interlace_handling(pp,type) png_set_interlace_handling(pp) argument
3614 # define set_write_interlace_handling(pp,type) (1) argument
3634 # define set_write_interlace_handling(pp,type)\ argument
3635 npasses_from_interlace_type(pp,type)
3709 choose_random_filter(png_structp pp, int start) in choose_random_filter() argument
3722 png_set_filter(pp, 0/*method*/, filters); in choose_random_filter()
3726 # define choose_random_filter(pp, start) ((void)0) argument
3741 png_structp pp = set_store_for_write(ps, &pi, name); in make_transform_image() local
3748 if (pp == NULL) in make_transform_image()
3751 w = transform_width(pp, colour_type, bit_depth); in make_transform_image()
3752 h = transform_height(pp, colour_type, bit_depth); in make_transform_image()
3754 png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, in make_transform_image()
3782 png_set_text(pp, pi, &text, 1); in make_transform_image()
3787 init_standard_palette(ps, pp, pi, 1U << bit_depth, 1/*do tRNS*/); in make_transform_image()
3791 set_random_tRNS(pp, pi, colour_type, bit_depth); in make_transform_image()
3794 png_write_info(pp, pi); in make_transform_image()
3796 if (png_get_rowbytes(pp, pi) != in make_transform_image()
3797 transform_rowsize(pp, colour_type, bit_depth)) in make_transform_image()
3798 png_error(pp, "transform row size incorrect"); in make_transform_image()
3806 int npasses = set_write_interlace_handling(pp, interlace_type); in make_transform_image()
3809 if (npasses != npasses_from_interlace_type(pp, interlace_type)) in make_transform_image()
3810 png_error(pp, "write: png_set_interlace_handling failed"); in make_transform_image()
3823 transform_row(pp, buffer, colour_type, bit_depth, y); in make_transform_image()
3840 bit_size(pp, colour_type, bit_depth), w, pass, in make_transform_image()
3847 choose_random_filter(pp, pass == 0 && y == 0); in make_transform_image()
3848 png_write_row(pp, buffer); in make_transform_image()
3870 png_set_text(pp, pi, &text, 1); in make_transform_image()
3874 png_write_end(pp, pi); in make_transform_image()
3961 png_structp pp; in make_size_image() local
3970 pp = set_store_for_write(ps, &pi, name); in make_size_image()
3976 if (pp == NULL) in make_size_image()
3979 png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, in make_size_image()
4002 png_set_text(pp, pi, &text, 1); in make_size_image()
4007 init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); in make_size_image()
4009 png_write_info(pp, pi); in make_size_image()
4015 pixel_size = bit_size(pp, colour_type, bit_depth); in make_size_image()
4016 if (png_get_rowbytes(pp, pi) != ((w * pixel_size) + 7) / 8) in make_size_image()
4017 png_error(pp, "size row size incorrect"); in make_size_image()
4021 int npasses = npasses_from_interlace_type(pp, interlace_type); in make_size_image()
4032 npasses != set_write_interlace_handling(pp, interlace_type)) in make_size_image()
4033 png_error(pp, "write: png_set_interlace_handling failed"); in make_size_image()
4097 png_set_filter(pp, 0/*method*/, filters); in make_size_image()
4101 png_write_row(pp, row); in make_size_image()
4123 png_set_text(pp, pi, &text, 1); in make_size_image()
4127 png_write_end(pp, pi); in make_size_image()
4201 standard_row(png_const_structp pp, png_byte std[STANDARD_ROWMAX], in standard_row() argument
4205 transform_row(pp, std, COL_FROM_ID(id), DEPTH_FROM_ID(id), y); in standard_row()
4207 size_row(std, WIDTH_FROM_ID(id) * bit_size(pp, COL_FROM_ID(id), in standard_row()
4222 sBIT0_error_fn(png_structp pp, png_infop pi) in sBIT0_error_fn() argument
4227 png_set_sBIT(pp, pi, &bad); in sBIT0_error_fn()
4231 sBIT_error_fn(png_structp pp, png_infop pi) in sBIT_error_fn() argument
4236 if (png_get_color_type(pp, pi) == PNG_COLOR_TYPE_PALETTE) in sBIT_error_fn()
4240 bit_depth = png_get_bit_depth(pp, pi); in sBIT_error_fn()
4245 png_set_sBIT(pp, pi, &bad); in sBIT_error_fn()
4274 const png_structp pp = set_store_for_write(ps, &pi, name); in make_error() local
4276 gnu_volatile(pp) in make_error()
4278 if (pp == NULL) in make_error()
4281 w = transform_width(pp, colour_type, bit_depth); in make_error()
4283 h = transform_height(pp, colour_type, bit_depth); in make_error()
4285 png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, in make_error()
4289 init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); in make_error()
4304 error_test[test].fn(pp, pi); in make_error()
4307 png_write_info(pp, pi); in make_error()
4316 store_log(ps, pp, error_test[test].msg, 1 /*error*/); in make_error()
4338 if (png_get_rowbytes(pp, pi) != in make_error()
4339 transform_rowsize(pp, colour_type, bit_depth)) in make_error()
4340 png_error(pp, "row size incorrect"); in make_error()
4344 int npasses = set_write_interlace_handling(pp, interlace_type); in make_error()
4347 if (npasses != npasses_from_interlace_type(pp, interlace_type)) in make_error()
4348 png_error(pp, "write: png_set_interlace_handling failed"); in make_error()
4358 transform_row(pp, buffer, colour_type, bit_depth, y); in make_error()
4377 bit_size(pp, colour_type, bit_depth), w, pass, in make_error()
4384 png_write_row(pp, buffer); in make_error()
4389 png_write_end(pp, pi); in make_error()
4479 png_structp pp; in perform_formatting_test() local
4482 pp = set_store_for_write(ps, NULL, "libpng formatting test"); in perform_formatting_test()
4484 if (pp == NULL) in perform_formatting_test()
4497 result = png_convert_to_rfc1123(pp, &pt); in perform_formatting_test()
4507 png_error(pp, "png_convert_to_rfc1123 failed"); in perform_formatting_test()
4520 png_error(pp, msg); in perform_formatting_test()
4669 read_palette(store_palette palette, int *npalette, png_const_structp pp, in read_palette() argument
4679 if (png_get_PLTE(pp, pi, &pal, npalette) & PNG_INFO_PLTE) in read_palette()
4684 png_error(pp, "validate: invalid PLTE count"); in read_palette()
4702 png_error(pp, "validate: invalid PLTE result"); in read_palette()
4710 if ((png_get_tRNS(pp, pi, &trans_alpha, &num, 0) & PNG_INFO_tRNS) != 0 && in read_palette()
4728 png_error(pp, "validate: unexpected png_get_tRNS (palette) result"); in read_palette()
4761 standard_palette_validate(standard_display *dp, png_const_structp pp, in standard_palette_validate() argument
4767 if (read_palette(palette, &npalette, pp, pi) != dp->is_transparent) in standard_palette_validate()
4768 png_error(pp, "validate: palette transparency changed"); in standard_palette_validate()
4779 png_error(pp, msg); in standard_palette_validate()
4790 png_error(pp, "validate: PLTE or tRNS chunk changed"); in standard_palette_validate()
4803 standard_info_part1(standard_display *dp, png_structp pp, png_infop pi) in standard_info_part1() argument
4805 if (png_get_bit_depth(pp, pi) != dp->bit_depth) in standard_info_part1()
4806 png_error(pp, "validate: bit depth changed"); in standard_info_part1()
4808 if (png_get_color_type(pp, pi) != dp->colour_type) in standard_info_part1()
4809 png_error(pp, "validate: color type changed"); in standard_info_part1()
4811 if (png_get_filter_type(pp, pi) != PNG_FILTER_TYPE_BASE) in standard_info_part1()
4812 png_error(pp, "validate: filter type changed"); in standard_info_part1()
4814 if (png_get_interlace_type(pp, pi) != dp->interlace_type) in standard_info_part1()
4815 png_error(pp, "validate: interlacing changed"); in standard_info_part1()
4817 if (png_get_compression_type(pp, pi) != PNG_COMPRESSION_TYPE_BASE) in standard_info_part1()
4818 png_error(pp, "validate: compression type changed"); in standard_info_part1()
4820 dp->w = png_get_image_width(pp, pi); in standard_info_part1()
4822 if (dp->w != standard_width(pp, dp->id)) in standard_info_part1()
4823 png_error(pp, "validate: image width changed"); in standard_info_part1()
4825 dp->h = png_get_image_height(pp, pi); in standard_info_part1()
4827 if (dp->h != standard_height(pp, dp->id)) in standard_info_part1()
4828 png_error(pp, "validate: image height changed"); in standard_info_part1()
4836 if (png_get_sBIT(pp, pi, &sBIT) & PNG_INFO_sBIT) in standard_info_part1()
4841 png_error(pp, "validate: unexpected png_get_sBIT result"); in standard_info_part1()
4881 png_error(pp, "validate: sBIT value out of range"); in standard_info_part1()
4890 if (png_get_rowbytes(pp, pi) != standard_rowsize(pp, dp->id)) in standard_info_part1()
4891 png_error(pp, "validate: row size changed"); in standard_info_part1()
4896 standard_palette_validate(dp, pp, pi); in standard_info_part1()
4905 if (png_get_tRNS(pp, pi, 0, 0, &trans_color) & PNG_INFO_tRNS) in standard_info_part1()
4908 png_error(pp, "validate: unexpected png_get_tRNS (color) result"); in standard_info_part1()
4929 png_error(pp, "validate: unexpected png_get_tRNS result"); in standard_info_part1()
4933 png_error(pp, "validate: invalid tRNS chunk with alpha image"); in standard_info_part1()
4942 dp->npasses = npasses_from_interlace_type(pp, dp->interlace_type); in standard_info_part1()
4946 if (dp->npasses != png_set_interlace_handling(pp)) in standard_info_part1()
4947 png_error(pp, "validate: file changed interlace type"); in standard_info_part1()
4953 png_error(pp, "validate: no libpng interlace support"); in standard_info_part1()
4967 standard_info_part2(standard_display *dp, png_const_structp pp, in standard_info_part2() argument
4972 png_byte ct = png_get_color_type(pp, pi); in standard_info_part2()
4973 png_byte bd = png_get_bit_depth(pp, pi); in standard_info_part2()
4979 dp->pixel_size = bit_size(pp, ct, bd); in standard_info_part2()
4981 dp->bit_width = png_get_image_width(pp, pi) * dp->pixel_size; in standard_info_part2()
4982 dp->cbRow = png_get_rowbytes(pp, pi); in standard_info_part2()
4986 png_error(pp, "bad png_get_rowbytes calculation"); in standard_info_part2()
4989 store_ensure_image(dp->ps, pp, nImages, dp->cbRow, dp->h); in standard_info_part2()
4993 standard_info_imp(standard_display *dp, png_structp pp, png_infop pi, in standard_info_imp() argument
4999 standard_info_part1(dp, pp, pi); in standard_info_imp()
5009 png_read_update_info(pp, pi); in standard_info_imp()
5013 png_start_read_image(pp); in standard_info_imp()
5018 standard_info_part2(dp, pp, pi, nImages); in standard_info_imp()
5022 standard_info(png_structp pp, png_infop pi) in standard_info() argument
5025 png_get_progressive_ptr(pp)); in standard_info()
5030 standard_info_imp(dp, pp, pi, 1 /*only one image*/); in standard_info()
5036 png_const_structp pp = ppIn; in progressive_row() local
5038 png_get_progressive_ptr(pp)); in progressive_row()
5056 if (y != png_get_current_row_number(pp)) in progressive_row()
5057 png_error(pp, "png_get_current_row_number is broken"); in progressive_row()
5059 if (pass != png_get_current_pass_number(pp)) in progressive_row()
5060 png_error(pp, "png_get_current_pass_number is broken"); in progressive_row()
5068 png_error(pp, "invalid y to progressive row callback"); in progressive_row()
5070 row = store_image_row(dp->ps, pp, 0, y); in progressive_row()
5085 png_progressive_combine_row(pp, row, new_row); in progressive_row()
5092 png_error(pp, "missing row in progressive de-interlacing"); in progressive_row()
5096 sequential_row(standard_display *dp, png_structp pp, png_infop pi, in sequential_row() argument
5102 const png_uint_32 height = standard_height(pp, dp->id); in sequential_row()
5103 const png_uint_32 width = standard_width(pp, dp->id); in sequential_row()
5135 png_read_row(pp, row, display); in sequential_row()
5138 deinterlace_row(store_image_row(ps, pp, iImage, y), row, in sequential_row()
5142 deinterlace_row(store_image_row(ps, pp, iDisplay, y), display, in sequential_row()
5147 png_read_row(pp, in sequential_row()
5148 iImage >= 0 ? store_image_row(ps, pp, iImage, y) : NULL, in sequential_row()
5149 iDisplay >= 0 ? store_image_row(ps, pp, iDisplay, y) : NULL); in sequential_row()
5156 png_read_end(pp, pi); in sequential_row()
5161 standard_check_text(png_const_structp pp, png_const_textp tp, in standard_check_text() argument
5237 png_error(pp, msg); in standard_check_text()
5242 standard_text_validate(standard_display *dp, png_const_structp pp, in standard_text_validate() argument
5246 png_uint_32 num_text = png_get_text(pp, pi, &tp, NULL); in standard_text_validate()
5250 standard_check_text(pp, tp, "image name", dp->ps->current->name); in standard_text_validate()
5257 standard_check_text(pp, tp+1, "end marker", "end"); in standard_text_validate()
5266 png_error(pp, msg); in standard_text_validate()
5270 # define standard_text_validate(dp,pp,pi,check_end) ((void)0) argument
5274 standard_row_validate(standard_display *dp, png_const_structp pp, in standard_row_validate() argument
5284 standard_row(pp, std, dp->id, y); in standard_row_validate()
5292 (where = pixel_cmp(std, store_image_row(dp->ps, pp, iImage, y), in standard_row_validate()
5298 store_image_row(dp->ps, pp, iImage, y)[where-1]); in standard_row_validate()
5299 png_error(pp, msg); in standard_row_validate()
5303 (where = pixel_cmp(std, store_image_row(dp->ps, pp, iDisplay, y), in standard_row_validate()
5309 store_image_row(dp->ps, pp, iDisplay, y)[where-1]); in standard_row_validate()
5310 png_error(pp, msg); in standard_row_validate()
5315 standard_image_validate(standard_display *dp, png_const_structp pp, int iImage, in standard_image_validate() argument
5321 store_image_check(dp->ps, pp, iImage); in standard_image_validate()
5324 store_image_check(dp->ps, pp, iDisplay); in standard_image_validate()
5327 standard_row_validate(dp, pp, iImage, iDisplay, y); in standard_image_validate()
5336 png_const_structp pp = ppIn; in standard_end() local
5338 png_get_progressive_ptr(pp)); in standard_end()
5345 standard_text_validate(dp, pp, pi, in standard_end()
5347 standard_image_validate(dp, pp, 0, -1); in standard_end()
5368 png_structp pp; in standard_test() local
5374 pp = set_store_for_read(d.ps, &pi, d.id, in standard_test()
5386 png_set_progressive_read_fn(pp, &d, standard_info, progressive_row, in standard_test()
5390 store_progressive_read(d.ps, pp, pi); in standard_test()
5395 png_set_read_fn(pp, d.ps, store_read); in standard_test()
5398 png_read_info(pp, pi); in standard_test()
5403 standard_info_imp(&d, pp, pi, 2 /*images*/); in standard_test()
5410 sequential_row(&d, pp, pi, 0, 1); in standard_test()
5417 standard_text_validate(&d, pp, pi, 1/*check_end*/); in standard_test()
5418 standard_image_validate(&d, pp, 0, 1); in standard_test()
5427 png_error(pp, "image read failed silently"); in standard_test()
5952 struct transform_display *that, png_structp pp, png_infop pi);
5961 png_const_structp pp, const struct transform_display *display);
6031 transform_display *that, png_structp pp, png_infop pi) in image_transform_set_end() argument
6035 UNUSED(pp) in image_transform_set_end()
6058 png_const_structp pp, const transform_display *display) in image_transform_mod_end() argument
6064 UNUSED(pp) in image_transform_mod_end()
6172 transform_info_imp(transform_display *dp, png_structp pp, png_infop pi) in transform_info_imp() argument
6175 standard_info_part1(&dp->this, pp, pi); in transform_info_imp()
6178 dp->transform_list->set(dp->transform_list, dp, pp, pi); in transform_info_imp()
6185 png_read_update_info(pp, pi); in transform_info_imp()
6190 standard_info_part2(&dp->this, pp, pi, 1/*images*/); in transform_info_imp()
6193 dp->output_colour_type = png_get_color_type(pp, pi); in transform_info_imp()
6194 dp->output_bit_depth = png_get_bit_depth(pp, pi); in transform_info_imp()
6233 png_error(pp, message); in transform_info_imp()
6258 dp->transform_list->mod(dp->transform_list, &test_pixel, pp, dp); in transform_info_imp()
6269 png_error(pp, message); in transform_info_imp()
6281 png_error(pp, message); in transform_info_imp()
6288 png_error(pp, "pngvalid: internal: palette sample depth not 8"); in transform_info_imp()
6290 png_error(pp, "pngvalid: internal: bad unpacked pixel depth"); in transform_info_imp()
6306 png_error(pp, message); in transform_info_imp()
6321 png_error(pp, message); in transform_info_imp()
6327 transform_info(png_structp pp, png_infop pi) in transform_info() argument
6329 transform_info_imp(voidcast(transform_display*, png_get_progressive_ptr(pp)), in transform_info()
6330 pp, pi); in transform_info()
6334 transform_range_check(png_const_structp pp, unsigned int r, unsigned int g, in transform_range_check() argument
6372 png_error(pp, message); in transform_range_check()
6379 transform_image_validate(transform_display *dp, png_const_structp pp, in transform_image_validate() argument
6405 store_image_check(dp->this.ps, pp, 0); in transform_image_validate()
6417 (void)read_palette(out_palette, &npalette, pp, pi); in transform_image_validate()
6419 png_error(pp, "unexpected change in palette size"); in transform_image_validate()
6451 png_const_bytep const pRow = store_image_row(ps, pp, 0, y); in transform_image_validate()
6457 transform_row(pp, std, in_ct, in_bd, y); in transform_image_validate()
6487 dp->transform_list->mod(dp->transform_list, &in_pixel, pp, dp); in transform_image_validate()
6503 png_error(pp, "unexpected transformed palette index"); in transform_image_validate()
6510 transform_range_check(pp, r, g, b, a, in_pixel.red, in_pixel.redf, in transform_image_validate()
6517 transform_range_check(pp, r, g, b, a, in_pixel.green, in transform_image_validate()
6524 transform_range_check(pp, r, g, b, a, in_pixel.blue, in_pixel.bluef, in transform_image_validate()
6531 transform_range_check(pp, r, g, b, a, in_pixel.alpha, in transform_image_validate()
6545 png_const_structp pp = ppIn; in transform_end() local
6547 png_get_progressive_ptr(pp)); in transform_end()
6550 transform_image_validate(dp, pp, pi); in transform_end()
6568 png_structp pp; in transform_test() local
6585 pp = set_modifier_for_read(d.pm, &pi, d.this.id, full_name); in transform_test()
6593 (void)store_message(&d.pm->this, pp, buffer, sizeof buffer, 0, in transform_test()
6604 png_set_progressive_read_fn(pp, &d, transform_info, progressive_row, in transform_test()
6608 modifier_progressive_read(d.pm, pp, pi); in transform_test()
6613 png_set_read_fn(pp, d.pm, modifier_read); in transform_test()
6616 png_read_info(pp, pi); in transform_test()
6619 transform_info_imp(&d, pp, pi); in transform_test()
6621 sequential_row(&d.this, pp, pi, -1, 0); in transform_test()
6624 transform_image_validate(&d, pp, pi); in transform_test()
6688 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_palette_to_rgb_set() argument
6690 png_set_palette_to_rgb(pp); in image_transform_png_set_palette_to_rgb_set()
6691 this->next->set(this->next, that, pp, pi); in image_transform_png_set_palette_to_rgb_set()
6696 image_pixel *that, png_const_structp pp, in image_transform_png_set_palette_to_rgb_mod() argument
6702 this->next->mod(this->next, that, pp, display); in image_transform_png_set_palette_to_rgb_mod()
6726 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_tRNS_to_alpha_set() argument
6728 png_set_tRNS_to_alpha(pp); in image_transform_png_set_tRNS_to_alpha_set()
6736 this->next->set(this->next, that, pp, pi); in image_transform_png_set_tRNS_to_alpha_set()
6741 image_pixel *that, png_const_structp pp, in image_transform_png_set_tRNS_to_alpha_mod() argument
6771 this->next->mod(this->next, that, pp, display); in image_transform_png_set_tRNS_to_alpha_mod()
6804 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_gray_to_rgb_set() argument
6806 png_set_gray_to_rgb(pp); in image_transform_png_set_gray_to_rgb_set()
6808 this->next->set(this->next, that, pp, pi); in image_transform_png_set_gray_to_rgb_set()
6813 image_pixel *that, png_const_structp pp, in image_transform_png_set_gray_to_rgb_mod() argument
6840 this->next->mod(this->next, that, pp, display); in image_transform_png_set_gray_to_rgb_mod()
6864 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_expand_set() argument
6866 png_set_expand(pp); in image_transform_png_set_expand_set()
6871 this->next->set(this->next, that, pp, pi); in image_transform_png_set_expand_set()
6876 image_pixel *that, png_const_structp pp, in image_transform_png_set_expand_mod() argument
6888 this->next->mod(this->next, that, pp, display); in image_transform_png_set_expand_mod()
6917 const image_transform *this, transform_display *that, png_structp pp, in image_transform_png_set_expand_gray_1_2_4_to_8_set() argument
6920 png_set_expand_gray_1_2_4_to_8(pp); in image_transform_png_set_expand_gray_1_2_4_to_8_set()
6922 this->next->set(this->next, that, pp, pi); in image_transform_png_set_expand_gray_1_2_4_to_8_set()
6927 const image_transform *this, image_pixel *that, png_const_structp pp, in image_transform_png_set_expand_gray_1_2_4_to_8_mod() argument
6931 image_transform_png_set_expand_mod(this, that, pp, display); in image_transform_png_set_expand_gray_1_2_4_to_8_mod()
6938 this->next->mod(this->next, that, pp, display); in image_transform_png_set_expand_gray_1_2_4_to_8_mod()
6971 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_expand_16_set() argument
6973 png_set_expand_16(pp); in image_transform_png_set_expand_16_set()
6981 this->next->set(this->next, that, pp, pi); in image_transform_png_set_expand_16_set()
6986 image_pixel *that, png_const_structp pp, in image_transform_png_set_expand_16_mod() argument
7001 this->next->mod(this->next, that, pp, display); in image_transform_png_set_expand_16_mod()
7026 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_scale_16_set() argument
7028 png_set_scale_16(pp); in image_transform_png_set_scale_16_set()
7033 this->next->set(this->next, that, pp, pi); in image_transform_png_set_scale_16_set()
7038 image_pixel *that, png_const_structp pp, in image_transform_png_set_scale_16_mod() argument
7050 this->next->mod(this->next, that, pp, display); in image_transform_png_set_scale_16_mod()
7074 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_strip_16_set() argument
7076 png_set_strip_16(pp); in image_transform_png_set_strip_16_set()
7081 this->next->set(this->next, that, pp, pi); in image_transform_png_set_strip_16_set()
7086 image_pixel *that, png_const_structp pp, in image_transform_png_set_strip_16_mod() argument
7121 this->next->mod(this->next, that, pp, display); in image_transform_png_set_strip_16_mod()
7145 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_strip_alpha_set() argument
7147 png_set_strip_alpha(pp); in image_transform_png_set_strip_alpha_set()
7148 this->next->set(this->next, that, pp, pi); in image_transform_png_set_strip_alpha_set()
7153 image_pixel *that, png_const_structp pp, in image_transform_png_set_strip_alpha_mod() argument
7164 this->next->mod(this->next, that, pp, display); in image_transform_png_set_strip_alpha_mod()
7392 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_rgb_to_gray_set() argument
7397 png_set_rgb_to_gray(pp, error_action, data.red_to_set, data.green_to_set); in image_transform_png_set_rgb_to_gray_set()
7399 png_set_rgb_to_gray_fixed(pp, error_action, data.red_to_set, in image_transform_png_set_rgb_to_gray_set()
7427 if ((API_function(pp, pi, &rX, &rY, &rZ, &gX, &gY, &gZ, &bX, &bY, &bZ) in image_transform_png_set_rgb_to_gray_set()
7448 png_error(pp, "internal pngvalid cHRM coefficient error"); in image_transform_png_set_rgb_to_gray_set()
7508 png_error(pp, buffer); in image_transform_png_set_rgb_to_gray_set()
7514 this->next->set(this->next, that, pp, pi); in image_transform_png_set_rgb_to_gray_set()
7519 image_pixel *that, png_const_structp pp, in image_transform_png_set_rgb_to_gray_mod() argument
7698 png_warning(pp, buffer); in image_transform_png_set_rgb_to_gray_mod()
7826 png_warning(pp, buffer); in image_transform_png_set_rgb_to_gray_mod()
7851 this->next->mod(this->next, that, pp, display); in image_transform_png_set_rgb_to_gray_mod()
7888 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_background_set() argument
7941 png_set_background(pp, &back, PNG_BACKGROUND_GAMMA_FILE, expand, 0); in image_transform_png_set_background_set()
7943 png_set_background_fixed(pp, &back, PNG_BACKGROUND_GAMMA_FILE, expand, 0); in image_transform_png_set_background_set()
7946 this->next->set(this->next, that, pp, pi); in image_transform_png_set_background_set()
7951 image_pixel *that, png_const_structp pp, in image_transform_png_set_background_mod() argument
8003 this->next->mod(this->next, that, pp, display); in image_transform_png_set_background_mod()
8036 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_invert_alpha_set() argument
8038 png_set_invert_alpha(pp); in image_transform_png_set_invert_alpha_set()
8039 this->next->set(this->next, that, pp, pi); in image_transform_png_set_invert_alpha_set()
8044 image_pixel *that, png_const_structp pp, in image_transform_png_set_invert_alpha_mod() argument
8050 this->next->mod(this->next, that, pp, display); in image_transform_png_set_invert_alpha_mod()
8082 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_bgr_set() argument
8084 png_set_bgr(pp); in image_transform_png_set_bgr_set()
8085 this->next->set(this->next, that, pp, pi); in image_transform_png_set_bgr_set()
8090 image_pixel *that, png_const_structp pp, in image_transform_png_set_bgr_mod() argument
8097 this->next->mod(this->next, that, pp, display); in image_transform_png_set_bgr_mod()
8129 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_swap_alpha_set() argument
8131 png_set_swap_alpha(pp); in image_transform_png_set_swap_alpha_set()
8132 this->next->set(this->next, that, pp, pi); in image_transform_png_set_swap_alpha_set()
8137 image_pixel *that, png_const_structp pp, in image_transform_png_set_swap_alpha_mod() argument
8144 this->next->mod(this->next, that, pp, display); in image_transform_png_set_swap_alpha_mod()
8174 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_swap_set() argument
8176 png_set_swap(pp); in image_transform_png_set_swap_set()
8177 this->next->set(this->next, that, pp, pi); in image_transform_png_set_swap_set()
8182 image_pixel *that, png_const_structp pp, in image_transform_png_set_swap_mod() argument
8188 this->next->mod(this->next, that, pp, display); in image_transform_png_set_swap_mod()
8228 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_filler_set() argument
8237 png_set_filler(pp, data.filler, data.flags); in image_transform_png_set_filler_set()
8244 this->next->set(this->next, that, pp, pi); in image_transform_png_set_filler_set()
8249 image_pixel *that, png_const_structp pp, in image_transform_png_set_filler_mod() argument
8271 this->next->mod(this->next, that, pp, display); in image_transform_png_set_filler_mod()
8301 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_add_alpha_set() argument
8310 png_set_add_alpha(pp, data.filler, data.flags); in image_transform_png_set_add_alpha_set()
8311 this->next->set(this->next, that, pp, pi); in image_transform_png_set_add_alpha_set()
8316 image_pixel *that, png_const_structp pp, in image_transform_png_set_add_alpha_mod() argument
8332 this->next->mod(this->next, that, pp, display); in image_transform_png_set_add_alpha_mod()
8364 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_packing_set() argument
8366 png_set_packing(pp); in image_transform_png_set_packing_set()
8368 this->next->set(this->next, that, pp, pi); in image_transform_png_set_packing_set()
8373 image_pixel *that, png_const_structp pp, in image_transform_png_set_packing_mod() argument
8383 this->next->mod(this->next, that, pp, display); in image_transform_png_set_packing_mod()
8414 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_packswap_set() argument
8416 png_set_packswap(pp); in image_transform_png_set_packswap_set()
8418 this->next->set(this->next, that, pp, pi); in image_transform_png_set_packswap_set()
8423 image_pixel *that, png_const_structp pp, in image_transform_png_set_packswap_mod() argument
8429 this->next->mod(this->next, that, pp, display); in image_transform_png_set_packswap_mod()
8459 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_invert_mono_set() argument
8461 png_set_invert_mono(pp); in image_transform_png_set_invert_mono_set()
8462 this->next->set(this->next, that, pp, pi); in image_transform_png_set_invert_mono_set()
8467 image_pixel *that, png_const_structp pp, in image_transform_png_set_invert_mono_mod() argument
8473 this->next->mod(this->next, that, pp, display); in image_transform_png_set_invert_mono_mod()
8506 transform_display *that, png_structp pp, png_infop pi) in image_transform_png_set_shift_set() argument
8522 png_set_shift(pp, &data); in image_transform_png_set_shift_set()
8523 this->next->set(this->next, that, pp, pi); in image_transform_png_set_shift_set()
8528 image_pixel *that, png_const_structp pp, in image_transform_png_set_shift_mod() argument
8555 this->next->mod(this->next, that, pp, display); in image_transform_png_set_shift_mod()
8579 transform_display *that, png_structp pp, png_infop pi) in _set() argument
8581 png_set_@(pp); in _set()
8582 this->next->set(this->next, that, pp, pi); in _set()
8587 image_pixel *that, png_const_structp pp, in _mod() argument
8590 this->next->mod(this->next, that, pp, display); in _mod()
8892 gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi) in gamma_info_imp() argument
8895 standard_info_part1(&dp->this, pp, pi); in gamma_info_imp()
8904 png_set_scale_16(pp); in gamma_info_imp()
8908 png_set_strip_16(pp); in gamma_info_imp()
8910 png_error(pp, "scale16 (16 to 8 bit conversion) not supported"); in gamma_info_imp()
8916 png_set_expand_16(pp); in gamma_info_imp()
8918 png_error(pp, "expand16 (8 to 16 bit conversion) not supported"); in gamma_info_imp()
8938 png_set_alpha_mode(pp, mode, sg); in gamma_info_imp()
8940 png_set_alpha_mode_fixed(pp, mode, g); in gamma_info_imp()
8950 png_set_gamma(pp, sg, dp->file_gamma); in gamma_info_imp()
8953 png_set_gamma_fixed(pp, g, f); in gamma_info_imp()
8958 png_error(pp, "alpha mode handling not supported"); in gamma_info_imp()
8966 png_set_gamma(pp, dp->screen_gamma, dp->file_gamma); in gamma_info_imp()
8971 png_set_gamma_fixed(pp, s, f); in gamma_info_imp()
8986 png_set_background(pp, &dp->background_color, dp->do_background, in gamma_info_imp()
8989 png_set_background_fixed(pp, &dp->background_color, in gamma_info_imp()
8993 png_error(pp, "png_set_background not supported"); in gamma_info_imp()
9002 png_read_update_info(pp, pi); in gamma_info_imp()
9007 standard_info_part2(&dp->this, pp, pi, 1 /*images*/); in gamma_info_imp()
9011 gamma_info(png_structp pp, png_infop pi) in gamma_info() argument
9013 gamma_info_imp(voidcast(gamma_display*, png_get_progressive_ptr(pp)), pp, in gamma_info()
9023 png_const_structp pp; member
9053 init_validate_info(validate_info *vi, gamma_display *dp, png_const_structp pp, in init_validate_info() argument
9058 vi->pp = pp; in init_validate_info()
9641 png_error(vi->pp, "internal error (compose)"); in gamma_component_validate()
9770 png_warning(vi->pp, msg); in gamma_component_validate()
9772 store_warning(vi->pp, msg); in gamma_component_validate()
9777 store_verbose(&vi->dp->pm->this, vi->pp, pass, msg); in gamma_component_validate()
9786 gamma_image_validate(gamma_display *dp, png_const_structp pp, in gamma_image_validate() argument
9796 const png_byte out_ct = png_get_color_type(pp, pi); in gamma_image_validate()
9797 const png_byte out_bd = png_get_bit_depth(pp, pi); in gamma_image_validate()
9850 store_image_check(dp->this.ps, pp, 0); in gamma_image_validate()
9855 init_validate_info(&vi, dp, pp, in_ct==3?8:in_bd, out_ct==3?8:out_bd); in gamma_image_validate()
9872 out_is_transparent = read_palette(out_palette, &out_npalette, pp, pi); in gamma_image_validate()
9876 png_const_bytep pRow = store_image_row(ps, pp, 0, y); in gamma_image_validate()
9879 transform_row(pp, std, in_ct, in_bd, y); in gamma_image_validate()
10000 png_error(pp, msg); in gamma_image_validate()
10010 png_const_structp pp = ppIn; in gamma_end() local
10011 gamma_display *dp = voidcast(gamma_display*, png_get_progressive_ptr(pp)); in gamma_end()
10014 gamma_image_validate(dp, pp, pi); in gamma_end()
10047 png_structp pp; in gamma_test() local
10070 pp = set_modifier_for_read(d.pm, &pi, d.this.id, name); in gamma_test()
10077 png_set_progressive_read_fn(pp, &d, gamma_info, progressive_row, in gamma_test()
10081 modifier_progressive_read(d.pm, pp, pi); in gamma_test()
10086 png_set_read_fn(pp, d.pm, modifier_read); in gamma_test()
10089 png_read_info(pp, pi); in gamma_test()
10092 gamma_info_imp(&d, pp, pi); in gamma_test()
10094 sequential_row(&d.this, pp, pi, -1, 0); in gamma_test()
10097 gamma_image_validate(&d, pp, pi); in gamma_test()
10142 png_error(pp, "bad bit depth (internal: 1)"); in gamma_test()
10165 png_error(pp, "bad bit depth (internal: 2)"); in gamma_test()