Lines Matching refs:ping
1697 static void MagickPNGErrorHandler(png_struct *ping,png_const_charp message) in MagickPNGErrorHandler() argument
1708 error_info=(PNGErrorInfo *) png_get_error_ptr(ping); in MagickPNGErrorHandler()
1722 longjmp(ping->jmpbuf,1); in MagickPNGErrorHandler()
1724 png_longjmp(ping,1); in MagickPNGErrorHandler()
1728 static void MagickPNGWarningHandler(png_struct *ping,png_const_charp message) in MagickPNGWarningHandler() argument
1740 png_error(ping, message); in MagickPNGWarningHandler()
1742 error_info=(PNGErrorInfo *) png_get_error_ptr(ping); in MagickPNGWarningHandler()
1779 Magick_png_read_raw_profile(png_struct *ping,Image *image, in Magick_png_read_raw_profile() argument
1817 png_warning(ping,"invalid profile length"); in Magick_png_read_raw_profile()
1830 png_warning(ping,"invalid profile length"); in Magick_png_read_raw_profile()
1844 png_warning(ping,"missing profile length"); in Magick_png_read_raw_profile()
1851 png_warning(ping,"invalid profile length"); in Magick_png_read_raw_profile()
1859 png_warning(ping, "unable to copy profile"); in Magick_png_read_raw_profile()
1873 png_warning(ping, "ran out of profile data"); in Magick_png_read_raw_profile()
1961 static void read_eXIf_chunk(Image *image,png_struct *ping,png_info *info, in read_eXIf_chunk() argument
1971 if (png_get_eXIf_1(ping,info,&size,&data)) in read_eXIf_chunk()
1979 static int read_user_chunk_callback(png_struct *ping, png_unknown_chunkp chunk) in read_user_chunk_callback() argument
2014 image=(Image *) png_get_user_chunk_ptr(ping); in read_user_chunk_callback()
2016 error_info=(PNGErrorInfo *) png_get_error_ptr(ping); in read_user_chunk_callback()
2032 image=(Image *) png_get_user_chunk_ptr(ping); in read_user_chunk_callback()
2054 image=(Image *) png_get_user_chunk_ptr(ping); in read_user_chunk_callback()
2073 image=(Image *) png_get_user_chunk_ptr(ping); in read_user_chunk_callback()
2087 image=(Image *) png_get_user_chunk_ptr(ping); in read_user_chunk_callback()
2088 error_info=(PNGErrorInfo *) png_get_error_ptr(ping); in read_user_chunk_callback()
2101 static void read_tIME_chunk(Image *image,png_struct *ping,png_info *info, in read_tIME_chunk() argument
2107 if (png_get_tIME(ping,info,&time)) in read_tIME_chunk()
2210 *ping; in ReadOnePNGImage() local
2378 ping=png_create_read_struct_2(PNG_LIBPNG_VER_STRING,&error_info, in ReadOnePNGImage()
2382 ping=png_create_read_struct(PNG_LIBPNG_VER_STRING,&error_info, in ReadOnePNGImage()
2385 if (ping == (png_struct *) NULL) in ReadOnePNGImage()
2388 ping_info=png_create_info_struct(ping); in ReadOnePNGImage()
2392 png_destroy_read_struct(&ping,(png_info **) NULL,(png_info **) NULL); in ReadOnePNGImage()
2396 end_info=png_create_info_struct(ping); in ReadOnePNGImage()
2400 png_destroy_read_struct(&ping,&ping_info,(png_info **) NULL); in ReadOnePNGImage()
2408 if (setjmp(png_jmpbuf(ping))) in ReadOnePNGImage()
2413 png_destroy_read_struct(&ping,&ping_info,&end_info); in ReadOnePNGImage()
2447 png_set_benign_errors(ping, 1); in ReadOnePNGImage()
2456 png_set_user_limits(ping,(png_uint_32) MagickMin(PNG_UINT_31_MAX, in ReadOnePNGImage()
2463 png_set_chunk_cache_max(ping,(png_uint_32) MagickMin(PNG_UINT_32_MAX, in ReadOnePNGImage()
2466 png_set_chunk_cache_max(ping,32767); in ReadOnePNGImage()
2472 png_set_chunk_malloc_max(ping,(png_alloc_size_t) MagickMin(PNG_SIZE_MAX, in ReadOnePNGImage()
2475 png_set_chunk_malloc_max(ping,(png_alloc_size_t) GetMaxMemoryRequest()); in ReadOnePNGImage()
2485 png_set_sig_bytes(ping,8); in ReadOnePNGImage()
2490 (void) png_permit_mng_features(ping,PNG_ALL_MNG_FEATURES); in ReadOnePNGImage()
2491 png_set_read_fn(ping,image,png_get_data); in ReadOnePNGImage()
2494 png_permit_empty_plte(ping,MagickTrue); in ReadOnePNGImage()
2495 png_set_read_fn(ping,image,png_get_data); in ReadOnePNGImage()
2501 png_set_read_fn(ping,mng_info,mng_get_data); in ReadOnePNGImage()
2507 png_set_read_fn(ping,image,png_get_data); in ReadOnePNGImage()
2517 png_set_crc_action(ping, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE); in ReadOnePNGImage()
2520 png_set_option(ping, PNG_IGNORE_ADLER32, PNG_OPTION_ON); in ReadOnePNGImage()
2543 png_set_option(ping, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON); in ReadOnePNGImage()
2549 png_set_keep_unknown_chunks(ping, 1, (png_bytep) mng_iCCP, 1); in ReadOnePNGImage()
2556 png_set_keep_unknown_chunks(ping, 2, NULL, 0); in ReadOnePNGImage()
2558 png_set_keep_unknown_chunks(ping, 1, NULL, 0); in ReadOnePNGImage()
2560 png_set_keep_unknown_chunks(ping, 2, (png_bytep) mng_caNv, 1); in ReadOnePNGImage()
2561 png_set_keep_unknown_chunks(ping, 2, (png_bytep) mng_vpAg, 1); in ReadOnePNGImage()
2562 png_set_keep_unknown_chunks(ping, 1, unused_chunks, in ReadOnePNGImage()
2565 png_set_read_user_chunk_fn(ping, image, read_user_chunk_callback); in ReadOnePNGImage()
2570 png_set_check_for_invalid_index (ping, 0); in ReadOnePNGImage()
2586 asm_flags=png_get_asm_flags(ping); in ReadOnePNGImage()
2587 png_set_asm_flags(ping, asm_flags & ~mmx_disable_mask); in ReadOnePNGImage()
2592 png_read_info(ping,ping_info); in ReadOnePNGImage()
2594 png_get_IHDR(ping,ping_info,&ping_width,&ping_height, in ReadOnePNGImage()
2613 png_set_swap(ping); in ReadOnePNGImage()
2630 (void) png_get_tRNS(ping, ping_info, &ping_trans_alpha, &ping_num_trans, in ReadOnePNGImage()
2633 (void) png_get_bKGD(ping, ping_info, &ping_background); in ReadOnePNGImage()
2637 png_set_packing(ping); in ReadOnePNGImage()
2668 if (png_get_valid(ping,ping_info, PNG_INFO_iCCP)) in ReadOnePNGImage()
2676 if (png_get_valid(ping,ping_info,PNG_INFO_gAMA)) in ReadOnePNGImage()
2684 if (png_get_valid(ping,ping_info,PNG_INFO_cHRM)) in ReadOnePNGImage()
2692 if (ping_found_iCCP != MagickTrue && png_get_valid(ping,ping_info, in ReadOnePNGImage()
2704 png_get_valid(ping,ping_info, PNG_INFO_iCCP)) in ReadOnePNGImage()
2712 if (png_get_valid(ping,ping_info,PNG_INFO_iCCP)) in ReadOnePNGImage()
2731 (void) png_get_iCCP(ping,ping_info,&name,(int *) &compression,&info, in ReadOnePNGImage()
2747 png_warning(ping, "ICC profile is NULL"); in ReadOnePNGImage()
2822 if (ping_found_iCCP==MagickFalse && png_get_valid(ping,ping_info, in ReadOnePNGImage()
2825 if (png_get_sRGB(ping,ping_info,&intent)) in ReadOnePNGImage()
2849 if (!png_get_gAMA(ping,ping_info,&file_gamma)) in ReadOnePNGImage()
2851 png_set_gAMA(ping,ping_info,mng_info->global_gamma); in ReadOnePNGImage()
2853 if (png_get_gAMA(ping,ping_info,&file_gamma)) in ReadOnePNGImage()
2862 if (!png_get_valid(ping,ping_info,PNG_INFO_cHRM)) in ReadOnePNGImage()
2866 (void) png_set_cHRM(ping,ping_info, in ReadOnePNGImage()
2878 if (png_get_valid(ping,ping_info,PNG_INFO_cHRM)) in ReadOnePNGImage()
2880 (void) png_get_cHRM(ping,ping_info, in ReadOnePNGImage()
2920 png_set_sRGB(ping,ping_info, in ReadOnePNGImage()
2931 if (png_get_valid(ping,ping_info,PNG_INFO_oFFs)) in ReadOnePNGImage()
2933 image->page.x=(ssize_t) png_get_x_offset_pixels(ping, ping_info); in ReadOnePNGImage()
2934 image->page.y=(ssize_t) png_get_y_offset_pixels(ping, ping_info); in ReadOnePNGImage()
2944 if (!png_get_valid(ping,ping_info,PNG_INFO_pHYs)) in ReadOnePNGImage()
2948 png_set_pHYs(ping,ping_info, in ReadOnePNGImage()
2958 if (png_get_valid(ping,ping_info,PNG_INFO_pHYs)) in ReadOnePNGImage()
2963 (void) png_get_pHYs(ping,ping_info,&x_resolution,&y_resolution, in ReadOnePNGImage()
2982 if (png_get_valid(ping,ping_info,PNG_INFO_PLTE)) in ReadOnePNGImage()
2987 (void) png_get_PLTE(ping,ping_info,&palette,&number_colors); in ReadOnePNGImage()
2994 png_set_PLTE(ping,ping_info,mng_info->global_plte, in ReadOnePNGImage()
2997 if (!png_get_valid(ping,ping_info,PNG_INFO_tRNS)) in ReadOnePNGImage()
3001 png_warning(ping, in ReadOnePNGImage()
3006 png_set_tRNS(ping,ping_info,mng_info->global_trns, in ReadOnePNGImage()
3015 png_get_valid(ping,ping_info,PNG_INFO_bKGD)) in ReadOnePNGImage()
3024 if (png_get_valid(ping, ping_info, PNG_INFO_bKGD)) in ReadOnePNGImage()
3039 png_set_bKGD(ping,ping_info,&background); in ReadOnePNGImage()
3044 png_error(ping,"No global PLTE in file"); in ReadOnePNGImage()
3050 (!png_get_valid(ping,ping_info,PNG_INFO_bKGD))) in ReadOnePNGImage()
3053 if (png_get_valid(ping,ping_info,PNG_INFO_bKGD)) in ReadOnePNGImage()
3109 if ((png_get_valid(ping,ping_info,PNG_INFO_tRNS)) && in ReadOnePNGImage()
3137 png_free_data(ping, ping_info, PNG_FREE_TRNS, 0); in ReadOnePNGImage()
3138 png_set_invalid(ping,ping_info,PNG_INFO_tRNS); in ReadOnePNGImage()
3172 if (!png_get_valid(ping,ping_info,PNG_INFO_sBIT)) in ReadOnePNGImage()
3173 png_set_sBIT(ping,ping_info,&mng_info->global_sbit); in ReadOnePNGImage()
3176 num_passes=png_set_interlace_handling(ping); in ReadOnePNGImage()
3178 png_read_update_info(ping,ping_info); in ReadOnePNGImage()
3180 ping_rowbytes=png_get_rowbytes(ping,ping_info); in ReadOnePNGImage()
3292 (void) png_get_PLTE(ping,ping_info,&palette,&number_colors); in ReadOnePNGImage()
3307 png_error(ping,"Memory allocation failed"); in ReadOnePNGImage()
3314 (void) png_get_PLTE(ping,ping_info,&palette,&number_colors); in ReadOnePNGImage()
3377 read_tIME_chunk(image,ping,ping_info,exception); in ReadOnePNGImage()
3380 read_eXIf_chunk(image,ping,ping_info,exception); in ReadOnePNGImage()
3390 if ((mng_info->mng_type == 0 && (image->ping != MagickFalse)) || ( in ReadOnePNGImage()
3395 if (png_get_valid(ping,ping_info,PNG_INFO_tRNS)) in ReadOnePNGImage()
3400 (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ? in ReadOnePNGImage()
3407 png_destroy_read_struct(&ping,&ping_info,&end_info); in ReadOnePNGImage()
3429 png_destroy_read_struct(&ping,&ping_info,&end_info); in ReadOnePNGImage()
3443 png_error(ping,"Memory allocation failed"); in ReadOnePNGImage()
3455 png_error(ping,"Failed to allocate quantum_info"); in ReadOnePNGImage()
3477 (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ? in ReadOnePNGImage()
3488 png_read_row(ping,ping_pixels+row_offset,NULL); in ReadOnePNGImage()
3602 png_error(ping,"Memory allocation failed"); in ReadOnePNGImage()
3615 png_read_row(ping,ping_pixels+row_offset,NULL); in ReadOnePNGImage()
3781 png_read_end(ping,end_info); in ReadOnePNGImage()
3792 png_destroy_read_struct(&ping,&ping_info,&end_info); in ReadOnePNGImage()
3806 if (png_get_valid(ping,ping_info,PNG_INFO_tRNS)) in ReadOnePNGImage()
3896 status = png_get_text(ping,ping_info,&text,&num_text) != 0 ? in ReadOnePNGImage()
3899 status = png_get_text(ping,end_info,&text,&num_text) != 0 ? in ReadOnePNGImage()
3921 (void) Magick_png_read_raw_profile(ping,image,image_info,text, in ReadOnePNGImage()
3946 png_error(ping,"Memory allocation failed"); in ReadOnePNGImage()
3955 if (!png_get_valid(ping,ping_info,PNG_INFO_pHYs) || in ReadOnePNGImage()
4011 png_error(ping,"Memory allocation failed"); in ReadOnePNGImage()
4014 png_error(ping,"Cannot overwrite frozen MNG object buffer"); in ReadOnePNGImage()
4031 png_error(ping, "Cloning image for object buffer failed"); in ReadOnePNGImage()
4034 png_error(ping,"PNG Image dimensions are too large."); in ReadOnePNGImage()
4045 if (png_get_valid(ping,ping_info,PNG_INFO_PLTE)) in ReadOnePNGImage()
4053 png_get_PLTE(ping,ping_info,&plte,&number_colors); in ReadOnePNGImage()
4074 (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ? in ReadOnePNGImage()
4135 if (png_get_valid(ping,ping_info,PNG_INFO_bKGD)) in ReadOnePNGImage()
4151 if (png_get_valid(ping,ping_info,PNG_INFO_tRNS)) in ReadOnePNGImage()
4177 if (png_get_valid(ping,ping_info,PNG_INFO_pHYs)) in ReadOnePNGImage()
4188 if (png_get_valid(ping,ping_info,PNG_INFO_oFFs)) in ReadOnePNGImage()
4198 read_tIME_chunk(image,ping,end_info,exception); in ReadOnePNGImage()
4201 read_eXIf_chunk(image,ping,end_info,exception); in ReadOnePNGImage()
4220 png_destroy_read_struct(&ping,&ping_info,&end_info); in ReadOnePNGImage()
4719 if ((image_info->ping == MagickFalse) && (jng_color_type >= 12)) in ReadOneJNGImage()
4815 if (alpha_image != NULL && image_info->ping == MagickFalse) in ReadOneJNGImage()
4839 if ((alpha_image != NULL) && (image_info->ping == MagickFalse) && in ReadOneJNGImage()
5035 color_image_info->ping=MagickFalse; /* To do: avoid this */ in ReadOneJNGImage()
5093 if ((image_info->ping == MagickFalse) && (alpha_image != (Image *) NULL) && in ReadOneJNGImage()
7550 if (image_info->ping == MagickFalse) in ReadOneMNGImage()
8164 Magick_png_write_raw_profile(const ImageInfo *image_info,png_struct *ping, in Magick_png_write_raw_profile() argument
8207 text=(png_textp) png_malloc(ping,(png_alloc_size_t) sizeof(png_text)); in Magick_png_write_raw_profile()
8209 text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); in Magick_png_write_raw_profile()
8212 text[0].text=(png_charp) png_malloc(ping,(png_alloc_size_t) in Magick_png_write_raw_profile()
8214 text[0].key=(png_charp) png_malloc(ping,(png_alloc_size_t) 80); in Magick_png_write_raw_profile()
8216 text[0].text=(png_charp) png_malloc(ping,(png_size_t) allocated_length); in Magick_png_write_raw_profile()
8217 text[0].key=(png_charp) png_malloc(ping,(png_size_t) 80); in Magick_png_write_raw_profile()
8250 png_set_text(ping,ping_info,text,1); in Magick_png_write_raw_profile()
8252 png_free(ping,text[0].text); in Magick_png_write_raw_profile()
8253 png_free(ping,text[0].key); in Magick_png_write_raw_profile()
8254 png_free(ping,text); in Magick_png_write_raw_profile()
8276 static void write_tIME_chunk(Image *image,png_struct *ping,png_info *info, in write_tIME_chunk() argument
8386 png_set_tIME(ping,info,&ptime); in write_tIME_chunk()
8437 *ping; in WriteOnePNGImage() local
9882 ping=png_create_write_struct_2(PNG_LIBPNG_VER_STRING,&error_info, in WriteOnePNGImage()
9887 ping=png_create_write_struct(PNG_LIBPNG_VER_STRING,&error_info, in WriteOnePNGImage()
9891 if (ping == (png_struct *) NULL) in WriteOnePNGImage()
9894 ping_info=png_create_info_struct(ping); in WriteOnePNGImage()
9898 png_destroy_write_struct(&ping,(png_info **) NULL); in WriteOnePNGImage()
9902 png_set_write_fn(ping,image,png_put_data,png_flush_data); in WriteOnePNGImage()
9905 if (setjmp(png_jmpbuf(ping))) in WriteOnePNGImage()
9914 png_destroy_write_struct(&ping,&ping_info); in WriteOnePNGImage()
9943 png_set_benign_errors(ping, 1); in WriteOnePNGImage()
9948 png_set_user_limits(ping, in WriteOnePNGImage()
9962 (void) png_permit_mng_features(ping,PNG_ALL_MNG_FEATURES); in WriteOnePNGImage()
9967 png_set_check_for_invalid_index (ping, 0); in WriteOnePNGImage()
9974 png_permit_empty_plte(ping,MagickTrue); in WriteOnePNGImage()
10321 png_error(ping,"image has 0 colors"); in WriteOnePNGImage()
10779 png_set_compression_buffer_size(ping,32768L); in WriteOnePNGImage()
10785 png_set_compression_mem_level(ping, 9); in WriteOnePNGImage()
10887 png_set_compression_level(ping,mng_info->write_png_compression_level-1); in WriteOnePNGImage()
10894 png_set_filter(ping,PNG_FILTER_TYPE_BASE,PNG_NO_FILTERS); in WriteOnePNGImage()
10896 png_set_filter(ping,PNG_FILTER_TYPE_BASE,PNG_ALL_FILTERS); in WriteOnePNGImage()
10900 png_set_filter(ping,PNG_FILTER_TYPE_BASE,PNG_ALL_FILTERS); in WriteOnePNGImage()
10912 png_set_filter(ping,PNG_FILTER_TYPE_BASE,PNG_NO_FILTERS); in WriteOnePNGImage()
10916 png_set_filter(ping,PNG_FILTER_TYPE_BASE,PNG_NO_FILTERS); in WriteOnePNGImage()
10919 png_set_filter(ping,PNG_FILTER_TYPE_BASE, in WriteOnePNGImage()
10923 png_set_compression_strategy(ping, in WriteOnePNGImage()
10929 png_set_sig_bytes(ping,8); in WriteOnePNGImage()
10982 png_warning(ping, in WriteOnePNGImage()
11012 png_set_IHDR(ping,ping_info,ping_width,ping_height, in WriteOnePNGImage()
11019 png_set_PLTE(ping,ping_info,palette,number_colors); in WriteOnePNGImage()
11047 (!png_get_valid(ping,ping_info,PNG_INFO_sRGB))) in WriteOnePNGImage()
11070 png_set_iCCP(ping,ping_info,(png_charp) name,0, in WriteOnePNGImage()
11098 Magick_png_write_raw_profile(image_info,ping,ping_info, in WriteOnePNGImage()
11112 png_get_valid(ping,ping_info,PNG_INFO_sRGB))) in WriteOnePNGImage()
11123 (void) png_set_sRGB(ping,ping_info,( in WriteOnePNGImage()
11131 if ((!mng_info->write_mng) || (!png_get_valid(ping,ping_info,PNG_INFO_sRGB))) in WriteOnePNGImage()
11150 png_set_gAMA(ping,ping_info,image->gamma); in WriteOnePNGImage()
11178 png_set_cHRM(ping,ping_info,wp.x,wp.y,rp.x,rp.y,gp.x,gp.y, in WriteOnePNGImage()
11188 png_set_bKGD(ping,ping_info,&ping_background); in WriteOnePNGImage()
11210 png_set_pHYs(ping,ping_info, in WriteOnePNGImage()
11255 write_tIME_chunk(image,ping,ping_info,timestamp,exception); in WriteOnePNGImage()
11263 png_error(ping,"WriteBlob Failed"); in WriteOnePNGImage()
11268 png_write_info_before_PLTE(ping, ping_info); in WriteOnePNGImage()
11279 (void) png_set_tRNS(ping, ping_info, in WriteOnePNGImage()
11286 (void) png_set_tRNS(ping, ping_info, in WriteOnePNGImage()
11302 png_write_info(ping,ping_info); in WriteOnePNGImage()
11348 png_set_oFFs(ping,ping_info,(png_int_32) image->page.x, in WriteOnePNGImage()
11362 ping->mode |= PNG_HAVE_IDAT; in WriteOnePNGImage()
11366 png_set_packing(ping); in WriteOnePNGImage()
11402 png_error(ping,"Allocation of memory for pixels failed"); in WriteOnePNGImage()
11411 png_error(ping,"Memory allocation for quantum_info failed"); in WriteOnePNGImage()
11415 num_passes=png_set_interlace_handling(ping); in WriteOnePNGImage()
11468 png_write_row(ping,ping_pixels); in WriteOnePNGImage()
11530 png_write_row(ping,ping_pixels); in WriteOnePNGImage()
11597 png_write_row(ping,ping_pixels); in WriteOnePNGImage()
11672 png_write_row(ping,ping_pixels); in WriteOnePNGImage()
11755 text=(png_textp) png_malloc(ping, in WriteOnePNGImage()
11758 text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); in WriteOnePNGImage()
11787 png_set_text(ping,ping_info,text,1); in WriteOnePNGImage()
11788 png_free(ping,text); in WriteOnePNGImage()
11858 png_write_end(ping,ping_info); in WriteOnePNGImage()
11900 png_error(ping, "Cannot convert GIF with disposal method 3 to MNG-LC"); in WriteOnePNGImage()
11906 png_destroy_write_struct(&ping,&ping_info); in WriteOnePNGImage()