• Home
  • Raw
  • Download

Lines Matching refs:png_ptr

26 png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)  in png_set_bKGD()  argument
30 if (png_ptr == NULL || info_ptr == NULL) in png_set_bKGD()
41 png_set_cHRM(png_structp png_ptr, png_infop info_ptr, in png_set_cHRM() argument
47 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM()
74 png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, in png_set_cHRM_fixed() argument
81 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_fixed()
85 if (png_check_cHRM_fixed(png_ptr, in png_set_cHRM_fixed()
116 png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) in png_set_gAMA() argument
122 if (png_ptr == NULL || info_ptr == NULL) in png_set_gAMA()
128 png_warning(png_ptr, "Limiting gamma to 21474.83"); in png_set_gAMA()
139 png_warning(png_ptr, "Setting gamma=0"); in png_set_gAMA()
143 png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point in png_set_gAMA_fixed() argument
150 if (png_ptr == NULL || info_ptr == NULL) in png_set_gAMA_fixed()
155 png_warning(png_ptr, "Limiting gamma to 21474.83"); in png_set_gAMA_fixed()
162 png_warning(png_ptr, "Setting negative gamma to zero"); in png_set_gAMA_fixed()
176 png_warning(png_ptr, "Setting gamma=0"); in png_set_gAMA_fixed()
182 png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) in png_set_hIST() argument
188 if (png_ptr == NULL || info_ptr == NULL) in png_set_hIST()
194 png_warning(png_ptr, in png_set_hIST()
200 png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); in png_set_hIST()
205 png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, in png_set_hIST()
207 if (png_ptr->hist == NULL) in png_set_hIST()
209 png_warning(png_ptr, "Insufficient memory for hIST chunk data."); in png_set_hIST()
214 png_ptr->hist[i] = hist[i]; in png_set_hIST()
215 info_ptr->hist = png_ptr->hist; in png_set_hIST()
221 png_ptr->flags |= PNG_FLAG_FREE_HIST; in png_set_hIST()
227 png_set_IHDR(png_structp png_ptr, png_infop info_ptr, in png_set_IHDR() argument
234 if (png_ptr == NULL || info_ptr == NULL) in png_set_IHDR()
245 png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height, in png_set_IHDR()
273 png_set_oFFs(png_structp png_ptr, png_infop info_ptr, in png_set_oFFs() argument
278 if (png_ptr == NULL || info_ptr == NULL) in png_set_oFFs()
290 png_set_pCAL(png_structp png_ptr, png_infop info_ptr, in png_set_pCAL() argument
299 if (png_ptr == NULL || info_ptr == NULL) in png_set_pCAL()
305 info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); in png_set_pCAL()
308 png_warning(png_ptr, "Insufficient memory for pCAL purpose."); in png_set_pCAL()
322 info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); in png_set_pCAL()
325 png_warning(png_ptr, "Insufficient memory for pCAL units."); in png_set_pCAL()
330 info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr, in png_set_pCAL()
334 png_warning(png_ptr, "Insufficient memory for pCAL params."); in png_set_pCAL()
345 info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); in png_set_pCAL()
348 png_warning(png_ptr, "Insufficient memory for pCAL parameter."); in png_set_pCAL()
364 png_set_sCAL(png_structp png_ptr, png_infop info_ptr, in png_set_sCAL() argument
369 if (png_ptr == NULL || info_ptr == NULL) in png_set_sCAL()
381 png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, in png_set_sCAL_s() argument
388 if (png_ptr == NULL || info_ptr == NULL) in png_set_sCAL_s()
396 info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, length); in png_set_sCAL_s()
399 png_warning(png_ptr, in png_set_sCAL_s()
408 info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, length); in png_set_sCAL_s()
411 png_free (png_ptr, info_ptr->scal_s_width); in png_set_sCAL_s()
413 png_warning(png_ptr, in png_set_sCAL_s()
429 png_set_pHYs(png_structp png_ptr, png_infop info_ptr, in png_set_pHYs() argument
434 if (png_ptr == NULL || info_ptr == NULL) in png_set_pHYs()
445 png_set_PLTE(png_structp png_ptr, png_infop info_ptr, in png_set_PLTE() argument
451 if (png_ptr == NULL || info_ptr == NULL) in png_set_PLTE()
457 png_error(png_ptr, "Invalid palette length"); in png_set_PLTE()
460 png_warning(png_ptr, "Invalid palette length"); in png_set_PLTE()
470 png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); in png_set_PLTE()
477 png_ptr->palette = (png_colorp)png_calloc(png_ptr, in png_set_PLTE()
479 png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color)); in png_set_PLTE()
480 info_ptr->palette = png_ptr->palette; in png_set_PLTE()
481 info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; in png_set_PLTE()
486 png_ptr->flags |= PNG_FLAG_FREE_PLTE; in png_set_PLTE()
494 png_set_sBIT(png_structp png_ptr, png_infop info_ptr, in png_set_sBIT() argument
499 if (png_ptr == NULL || info_ptr == NULL) in png_set_sBIT()
509 png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) in png_set_sRGB() argument
513 if (png_ptr == NULL || info_ptr == NULL) in png_set_sRGB()
521 png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, in png_set_sRGB_gAMA_and_cHRM() argument
541 if (png_ptr == NULL || info_ptr == NULL) in png_set_sRGB_gAMA_and_cHRM()
544 png_set_sRGB(png_ptr, info_ptr, intent); in png_set_sRGB_gAMA_and_cHRM()
549 png_set_gAMA(png_ptr, info_ptr, file_gamma); in png_set_sRGB_gAMA_and_cHRM()
553 png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); in png_set_sRGB_gAMA_and_cHRM()
579 png_set_cHRM_fixed(png_ptr, info_ptr, in png_set_sRGB_gAMA_and_cHRM()
584 png_set_cHRM(png_ptr, info_ptr, in png_set_sRGB_gAMA_and_cHRM()
594 png_set_iCCP(png_structp png_ptr, png_infop info_ptr, in png_set_iCCP() argument
604 if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) in png_set_iCCP()
608 new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length); in png_set_iCCP()
611 png_warning(png_ptr, "Insufficient memory to process iCCP chunk."); in png_set_iCCP()
615 new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen); in png_set_iCCP()
618 png_free (png_ptr, new_iccp_name); in png_set_iCCP()
619 png_warning(png_ptr, in png_set_iCCP()
625 png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0); in png_set_iCCP()
643 png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, in png_set_text() argument
647 ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text); in png_set_text()
649 png_error(png_ptr, "Insufficient memory to store text"); in png_set_text()
653 png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, in png_set_text_2() argument
658 png_debug1(1, "in %s storage function", ((png_ptr == NULL || in png_set_text_2()
659 png_ptr->chunk_name[0] == '\0') ? in png_set_text_2()
660 "text" : (png_const_charp)png_ptr->chunk_name)); in png_set_text_2()
662 if (png_ptr == NULL || info_ptr == NULL || num_text == 0) in png_set_text_2()
680 info_ptr->text = (png_textp)png_malloc_warn(png_ptr, in png_set_text_2()
691 png_free(png_ptr, old_text); in png_set_text_2()
697 info_ptr->text = (png_textp)png_malloc_warn(png_ptr, in png_set_text_2()
747 png_warning(png_ptr, "iTXt chunk not supported."); in png_set_text_2()
769 textp->key = (png_charp)png_malloc_warn(png_ptr, in png_set_text_2()
830 png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) in png_set_tIME() argument
834 if (png_ptr == NULL || info_ptr == NULL || in png_set_tIME()
835 (png_ptr->mode & PNG_WROTE_tIME)) in png_set_tIME()
845 png_set_tRNS(png_structp png_ptr, png_infop info_ptr, in png_set_tRNS() argument
850 if (png_ptr == NULL || info_ptr == NULL) in png_set_tRNS()
861 png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); in png_set_tRNS()
865 png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr, in png_set_tRNS()
880 png_warning(png_ptr, in png_set_tRNS()
895 png_ptr->flags |= PNG_FLAG_FREE_TRNS; in png_set_tRNS()
903 png_set_sPLT(png_structp png_ptr, in png_set_sPLT() argument
916 if (png_ptr == NULL || info_ptr == NULL) in png_set_sPLT()
919 np = (png_sPLT_tp)png_malloc_warn(png_ptr, in png_set_sPLT()
924 png_warning(png_ptr, "No memory for sPLT palettes."); in png_set_sPLT()
930 png_free(png_ptr, info_ptr->splt_palettes); in png_set_sPLT()
940 to->name = (png_charp)png_malloc_warn(png_ptr, length); in png_set_sPLT()
943 png_warning(png_ptr, in png_set_sPLT()
948 to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, in png_set_sPLT()
952 png_warning(png_ptr, in png_set_sPLT()
954 png_free(png_ptr, to->name); in png_set_sPLT()
975 png_set_unknown_chunks(png_structp png_ptr, in png_set_unknown_chunks() argument
981 if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0) in png_set_unknown_chunks()
984 np = (png_unknown_chunkp)png_malloc_warn(png_ptr, in png_set_unknown_chunks()
989 png_warning(png_ptr, in png_set_unknown_chunks()
996 png_free(png_ptr, info_ptr->unknown_chunks); in png_set_unknown_chunks()
1009 to->location = (png_byte)(png_ptr->mode & 0xff); in png_set_unknown_chunks()
1015 to->data = (png_bytep)png_malloc_warn(png_ptr, in png_set_unknown_chunks()
1019 png_warning(png_ptr, in png_set_unknown_chunks()
1035 png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, in png_set_unknown_chunk_location() argument
1038 if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < in png_set_unknown_chunk_location()
1048 png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted) in png_permit_empty_plte() argument
1055 if (png_ptr == NULL) in png_permit_empty_plte()
1057 png_ptr->mng_features_permitted = (png_byte) in png_permit_empty_plte()
1058 ((png_ptr->mng_features_permitted & (~PNG_FLAG_MNG_EMPTY_PLTE)) | in png_permit_empty_plte()
1066 png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) in png_permit_mng_features() argument
1070 if (png_ptr == NULL) in png_permit_mng_features()
1072 png_ptr->mng_features_permitted = in png_permit_mng_features()
1074 return (png_uint_32)png_ptr->mng_features_permitted; in png_permit_mng_features()
1080 png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep in png_set_keep_unknown_chunks() argument
1085 if (png_ptr == NULL) in png_set_keep_unknown_chunks()
1090 png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS; in png_set_keep_unknown_chunks()
1092 png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS; in png_set_keep_unknown_chunks()
1095 png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS; in png_set_keep_unknown_chunks()
1097 png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS; in png_set_keep_unknown_chunks()
1102 old_num_chunks = png_ptr->num_chunk_list; in png_set_keep_unknown_chunks()
1103 new_list=(png_bytep)png_malloc(png_ptr, in png_set_keep_unknown_chunks()
1106 if (png_ptr->chunk_list != NULL) in png_set_keep_unknown_chunks()
1108 png_memcpy(new_list, png_ptr->chunk_list, in png_set_keep_unknown_chunks()
1110 png_free(png_ptr, png_ptr->chunk_list); in png_set_keep_unknown_chunks()
1111 png_ptr->chunk_list=NULL; in png_set_keep_unknown_chunks()
1117 png_ptr->num_chunk_list = old_num_chunks + num_chunks; in png_set_keep_unknown_chunks()
1118 png_ptr->chunk_list = new_list; in png_set_keep_unknown_chunks()
1120 png_ptr->free_me |= PNG_FREE_LIST; in png_set_keep_unknown_chunks()
1127 png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr, in png_set_read_user_chunk_fn() argument
1132 if (png_ptr == NULL) in png_set_read_user_chunk_fn()
1135 png_ptr->read_user_chunk_fn = read_user_chunk_fn; in png_set_read_user_chunk_fn()
1136 png_ptr->user_chunk_ptr = user_chunk_ptr; in png_set_read_user_chunk_fn()
1142 png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers) in png_set_rows() argument
1146 if (png_ptr == NULL || info_ptr == NULL) in png_set_rows()
1150 png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); in png_set_rows()
1158 png_set_compression_buffer_size(png_structp png_ptr, in png_set_compression_buffer_size() argument
1161 if (png_ptr == NULL) in png_set_compression_buffer_size()
1163 png_free(png_ptr, png_ptr->zbuf); in png_set_compression_buffer_size()
1164 png_ptr->zbuf_size = (png_size_t)size; in png_set_compression_buffer_size()
1165 png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); in png_set_compression_buffer_size()
1166 png_ptr->zstream.next_out = png_ptr->zbuf; in png_set_compression_buffer_size()
1167 png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; in png_set_compression_buffer_size()
1171 png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) in png_set_invalid() argument
1173 if (png_ptr && info_ptr) in png_set_invalid()
1182 png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags) in png_set_asm_flags() argument
1185 if (png_ptr != NULL) in png_set_asm_flags()
1186 png_ptr->asm_flags = 0; in png_set_asm_flags()
1192 png_set_mmx_thresholds (png_structp png_ptr, in png_set_mmx_thresholds() argument
1197 if (png_ptr == NULL) in png_set_mmx_thresholds()
1208 png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max, in png_set_user_limits() argument
1215 if (png_ptr == NULL) in png_set_user_limits()
1217 png_ptr->user_width_max = user_width_max; in png_set_user_limits()
1218 png_ptr->user_height_max = user_height_max; in png_set_user_limits()
1225 png_set_benign_errors(png_structp png_ptr, int allowed) in png_set_benign_errors() argument
1230 png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; in png_set_benign_errors()
1232 png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN; in png_set_benign_errors()