/external/libpng/ |
D | pngpread.c | 29 if (png_ptr->push_length + 4 > png_ptr->buffer_size) \ 30 { png_push_save_buffer(png_ptr); return; } 32 if (png_ptr->buffer_size < N) \ 33 { png_push_save_buffer(png_ptr); return; } 36 png_process_data(png_structrp png_ptr, png_inforp info_ptr, in png_process_data() argument 39 if (png_ptr == NULL || info_ptr == NULL) in png_process_data() 42 png_push_restore_buffer(png_ptr, buffer, buffer_size); in png_process_data() 44 while (png_ptr->buffer_size) in png_process_data() 46 png_process_some_data(png_ptr, info_ptr); in png_process_data() 51 png_process_data_pause(png_structrp png_ptr, int save) in png_process_data_pause() argument [all …]
|
D | pngrutil.c | 22 png_get_uint_31(png_const_structrp png_ptr, png_const_bytep buf) in png_get_uint_31() argument 27 png_error(png_ptr, "PNG unsigned integer out of range"); in png_get_uint_31() 41 png_get_fixed_point(png_structrp png_ptr, png_const_bytep buf) in png_get_fixed_point() argument 49 if (png_ptr != NULL) in png_get_fixed_point() 50 png_warning(png_ptr, "PNG fixed point integer out of range"); in png_get_fixed_point() 121 png_read_sig(png_structrp png_ptr, png_inforp info_ptr) in png_read_sig() argument 126 if (png_ptr->sig_bytes >= 8) in png_read_sig() 129 num_checked = png_ptr->sig_bytes; in png_read_sig() 133 png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; in png_read_sig() 137 png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); in png_read_sig() [all …]
|
D | pngwutil.c | 51 png_write_sig(png_structrp png_ptr) in png_write_sig() argument 57 png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE; in png_write_sig() 61 png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], in png_write_sig() 62 (png_size_t)(8 - png_ptr->sig_bytes)); in png_write_sig() 64 if (png_ptr->sig_bytes < 3) in png_write_sig() 65 png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; in png_write_sig() 73 png_write_chunk_header(png_structrp png_ptr, png_uint_32 chunk_name, in png_write_chunk_header() argument 83 if (png_ptr == NULL) in png_write_chunk_header() 90 png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR; in png_write_chunk_header() 96 png_write_data(png_ptr, buf, 8); in png_write_chunk_header() [all …]
|
D | pngwrite.c | 24 write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr, in write_unknown_chunks() argument 42 int keep = png_handle_as_unknown(png_ptr, up->name); in write_unknown_chunks() 60 png_ptr->unknown_default == PNG_HANDLE_CHUNK_ALWAYS))) in write_unknown_chunks() 65 png_warning(png_ptr, "Writing zero-length unknown chunk"); in write_unknown_chunks() 67 png_write_chunk(png_ptr, up->name, up->data, up->size); in write_unknown_chunks() 84 png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr) in png_write_info_before_PLTE() argument 88 if (png_ptr == NULL || info_ptr == NULL) in png_write_info_before_PLTE() 91 if ((png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE) == 0) in png_write_info_before_PLTE() 94 png_write_sig(png_ptr); in png_write_info_before_PLTE() 97 if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && \ in png_write_info_before_PLTE() [all …]
|
D | pngread.c | 30 png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, variable 45 png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, 49 if (png_ptr != NULL) 51 png_ptr->mode = PNG_IS_READ_STRUCT; 57 png_ptr->IDAT_read_size = PNG_IDAT_READ_SIZE; 61 png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; 67 png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN; 75 png_set_read_fn(png_ptr, NULL, NULL); 78 return png_ptr; 92 png_read_info(png_structrp png_ptr, png_inforp info_ptr) in png_read_info() argument [all …]
|
D | pngrtran.c | 25 png_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action) in png_set_crc_action() argument 29 if (png_ptr == NULL) in png_set_crc_action() 39 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 40 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; in png_set_crc_action() 44 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 45 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | in png_set_crc_action() 50 png_warning(png_ptr, in png_set_crc_action() 57 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 68 png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; in png_set_crc_action() 69 png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; in png_set_crc_action() [all …]
|
D | example.c | 221 # define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf) 272 png_structp png_ptr; 285 png_structp png_ptr; 297 png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 300 if (png_ptr == NULL) 307 info_ptr = png_create_info_struct(png_ptr); 311 png_destroy_read_struct(&png_ptr, NULL, NULL); 320 if (setjmp(png_jmpbuf(png_ptr))) 323 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 332 png_init_io(png_ptr, fp); [all …]
|
D | pngerror.c | 23 static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr, 28 png_default_warning PNGARG((png_const_structrp png_ptr, 39 png_error,(png_const_structrp png_ptr, png_const_charp error_message), 44 if (png_ptr != NULL) 46 if ((png_ptr->flags & 57 if ((png_ptr->flags & PNG_FLAG_STRIP_ERROR_TEXT) != 0) 72 if ((png_ptr->flags & PNG_FLAG_STRIP_ERROR_TEXT) != 0) 82 if (png_ptr != NULL && png_ptr->error_fn != NULL) 83 (*(png_ptr->error_fn))(png_constcast(png_structrp,png_ptr), 88 png_default_error(png_ptr, error_message); [all …]
|
D | pngset.c | 25 png_set_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_bKGD() argument 30 if (png_ptr == NULL || info_ptr == NULL || background == NULL) in png_set_bKGD() 40 png_set_cHRM_fixed(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_cHRM_fixed() argument 49 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_fixed() 61 if (png_colorspace_set_chromaticities(png_ptr, &info_ptr->colorspace, &xy, in png_set_cHRM_fixed() 65 png_colorspace_sync_info(png_ptr, info_ptr); in png_set_cHRM_fixed() 69 png_set_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_cHRM_XYZ_fixed() argument 80 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_XYZ_fixed() 93 if (png_colorspace_set_endpoints(png_ptr, &info_ptr->colorspace, in png_set_cHRM_XYZ_fixed() 97 png_colorspace_sync_info(png_ptr, info_ptr); in png_set_cHRM_XYZ_fixed() [all …]
|
D | pngtrans.c | 21 png_set_bgr(png_structrp png_ptr) in png_set_bgr() argument 25 if (png_ptr == NULL) in png_set_bgr() 28 png_ptr->transformations |= PNG_BGR; in png_set_bgr() 35 png_set_swap(png_structrp png_ptr) in png_set_swap() argument 39 if (png_ptr == NULL) in png_set_swap() 42 if (png_ptr->bit_depth == 16) in png_set_swap() 43 png_ptr->transformations |= PNG_SWAP_BYTES; in png_set_swap() 50 png_set_packing(png_structrp png_ptr) in png_set_packing() argument 54 if (png_ptr == NULL) in png_set_packing() 57 if (png_ptr->bit_depth < 8) in png_set_packing() [all …]
|
D | pngmem.c | 25 png_destroy_png_struct(png_structrp png_ptr) in png_destroy_png_struct() argument 27 if (png_ptr != NULL) in png_destroy_png_struct() 32 png_struct dummy_struct = *png_ptr; in png_destroy_png_struct() 33 memset(png_ptr, 0, (sizeof *png_ptr)); in png_destroy_png_struct() 34 png_free(&dummy_struct, png_ptr); in png_destroy_png_struct() 50 png_calloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) 54 ret = png_malloc(png_ptr, size); 68 png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), 77 PNG_UNUSED(png_ptr) 90 if (png_ptr != NULL && png_ptr->malloc_fn != NULL) [all …]
|
D | pngget.c | 20 png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr, in png_get_valid() argument 23 if (png_ptr != NULL && info_ptr != NULL) in png_get_valid() 30 png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_rowbytes() argument 32 if (png_ptr != NULL && info_ptr != NULL) in png_get_rowbytes() 40 png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_rows() argument 42 if (png_ptr != NULL && info_ptr != NULL) in png_get_rows() 52 png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_image_width() argument 54 if (png_ptr != NULL && info_ptr != NULL) in png_get_image_width() 61 png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_image_height() argument 63 if (png_ptr != NULL && info_ptr != NULL) in png_get_image_height() [all …]
|
D | png.c | 47 png_set_sig_bytes(png_structrp png_ptr, int num_bytes) in png_set_sig_bytes() argument 53 if (png_ptr == NULL) in png_set_sig_bytes() 60 png_error(png_ptr, "Too many bytes for PNG signature"); in png_set_sig_bytes() 62 png_ptr->sig_bytes = (png_byte)nb; in png_set_sig_bytes() 98 png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED) 102 if (png_ptr == NULL) 107 png_warning (png_voidcast(png_structrp, png_ptr), 113 return png_malloc_warn(png_voidcast(png_structrp, png_ptr), num_bytes); 118 png_zfree(voidpf png_ptr, voidpf ptr) in png_zfree() argument 120 png_free(png_voidcast(png_const_structrp,png_ptr), ptr); in png_zfree() [all …]
|
/external/pdfium/third_party/libpng16/ |
D | pngpread.c | 29 if (png_ptr->push_length + 4 > png_ptr->buffer_size) \ 30 { png_push_save_buffer(png_ptr); return; } 32 if (png_ptr->buffer_size < N) \ 33 { png_push_save_buffer(png_ptr); return; } 36 png_process_data(png_structrp png_ptr, png_inforp info_ptr, in png_process_data() argument 39 if (png_ptr == NULL || info_ptr == NULL) in png_process_data() 42 png_push_restore_buffer(png_ptr, buffer, buffer_size); in png_process_data() 44 while (png_ptr->buffer_size) in png_process_data() 46 png_process_some_data(png_ptr, info_ptr); in png_process_data() 51 png_process_data_pause(png_structrp png_ptr, int save) in png_process_data_pause() argument [all …]
|
D | pngrutil.c | 22 png_get_uint_31(png_const_structrp png_ptr, png_const_bytep buf) in png_get_uint_31() argument 27 png_error(png_ptr, "PNG unsigned integer out of range"); in png_get_uint_31() 41 png_get_fixed_point(png_structrp png_ptr, png_const_bytep buf) in png_get_fixed_point() argument 49 if (png_ptr != NULL) in png_get_fixed_point() 50 png_warning(png_ptr, "PNG fixed point integer out of range"); in png_get_fixed_point() 121 png_read_sig(png_structrp png_ptr, png_inforp info_ptr) in png_read_sig() argument 126 if (png_ptr->sig_bytes >= 8) in png_read_sig() 129 num_checked = png_ptr->sig_bytes; in png_read_sig() 133 png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; in png_read_sig() 137 png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); in png_read_sig() [all …]
|
D | pngwutil.c | 51 png_write_sig(png_structrp png_ptr) in png_write_sig() argument 57 png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE; in png_write_sig() 61 png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], in png_write_sig() 62 (png_size_t)(8 - png_ptr->sig_bytes)); in png_write_sig() 64 if (png_ptr->sig_bytes < 3) in png_write_sig() 65 png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; in png_write_sig() 73 png_write_chunk_header(png_structrp png_ptr, png_uint_32 chunk_name, in png_write_chunk_header() argument 83 if (png_ptr == NULL) in png_write_chunk_header() 90 png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR; in png_write_chunk_header() 96 png_write_data(png_ptr, buf, 8); in png_write_chunk_header() [all …]
|
D | pngwrite.c | 24 write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr, in write_unknown_chunks() argument 42 int keep = png_handle_as_unknown(png_ptr, up->name); in write_unknown_chunks() 60 png_ptr->unknown_default == PNG_HANDLE_CHUNK_ALWAYS))) in write_unknown_chunks() 65 png_warning(png_ptr, "Writing zero-length unknown chunk"); in write_unknown_chunks() 67 png_write_chunk(png_ptr, up->name, up->data, up->size); in write_unknown_chunks() 84 png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr) in png_write_info_before_PLTE() argument 88 if (png_ptr == NULL || info_ptr == NULL) in png_write_info_before_PLTE() 91 if ((png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE) == 0) in png_write_info_before_PLTE() 94 png_write_sig(png_ptr); in png_write_info_before_PLTE() 97 if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && \ in png_write_info_before_PLTE() [all …]
|
D | pngrtran.c | 25 png_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action) in png_set_crc_action() argument 29 if (png_ptr == NULL) in png_set_crc_action() 39 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 40 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; in png_set_crc_action() 44 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 45 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | in png_set_crc_action() 50 png_warning(png_ptr, in png_set_crc_action() 56 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 67 png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; in png_set_crc_action() 68 png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; in png_set_crc_action() [all …]
|
D | pngread.c | 30 png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, variable 45 png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, 49 if (png_ptr != NULL) 51 png_ptr->mode = PNG_IS_READ_STRUCT; 57 png_ptr->IDAT_read_size = PNG_IDAT_READ_SIZE; 61 png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; 67 png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN; 75 png_set_read_fn(png_ptr, NULL, NULL); 78 return png_ptr; 92 png_read_info(png_structrp png_ptr, png_inforp info_ptr) in png_read_info() argument [all …]
|
D | pngset.c | 25 png_set_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_bKGD() argument 30 if (png_ptr == NULL || info_ptr == NULL || background == NULL) in png_set_bKGD() 40 png_set_cHRM_fixed(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_cHRM_fixed() argument 49 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_fixed() 61 if (png_colorspace_set_chromaticities(png_ptr, &info_ptr->colorspace, &xy, in png_set_cHRM_fixed() 65 png_colorspace_sync_info(png_ptr, info_ptr); in png_set_cHRM_fixed() 69 png_set_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_cHRM_XYZ_fixed() argument 80 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_XYZ_fixed() 93 if (png_colorspace_set_endpoints(png_ptr, &info_ptr->colorspace, in png_set_cHRM_XYZ_fixed() 97 png_colorspace_sync_info(png_ptr, info_ptr); in png_set_cHRM_XYZ_fixed() [all …]
|
D | pngerror.c | 23 static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr, 28 png_default_warning PNGARG((png_const_structrp png_ptr, 39 png_error,(png_const_structrp png_ptr, png_const_charp error_message), 44 if (png_ptr != NULL) 46 if ((png_ptr->flags & 57 if ((png_ptr->flags & PNG_FLAG_STRIP_ERROR_TEXT) != 0) 72 if ((png_ptr->flags & PNG_FLAG_STRIP_ERROR_TEXT) != 0) 82 if (png_ptr != NULL && png_ptr->error_fn != NULL) 83 (*(png_ptr->error_fn))(png_constcast(png_structrp,png_ptr), 88 png_default_error(png_ptr, error_message); [all …]
|
D | pngtrans.c | 21 png_set_bgr(png_structrp png_ptr) in png_set_bgr() argument 25 if (png_ptr == NULL) in png_set_bgr() 28 png_ptr->transformations |= PNG_BGR; in png_set_bgr() 35 png_set_swap(png_structrp png_ptr) in png_set_swap() argument 39 if (png_ptr == NULL) in png_set_swap() 42 if (png_ptr->bit_depth == 16) in png_set_swap() 43 png_ptr->transformations |= PNG_SWAP_BYTES; in png_set_swap() 50 png_set_packing(png_structrp png_ptr) in png_set_packing() argument 54 if (png_ptr == NULL) in png_set_packing() 57 if (png_ptr->bit_depth < 8) in png_set_packing() [all …]
|
D | pngmem.c | 28 png_destroy_png_struct(png_structrp png_ptr) in png_destroy_png_struct() argument 30 if (png_ptr != NULL) in png_destroy_png_struct() 35 png_struct dummy_struct = *png_ptr; in png_destroy_png_struct() 36 memset(png_ptr, 0, (sizeof *png_ptr)); in png_destroy_png_struct() 37 png_free(&dummy_struct, png_ptr); in png_destroy_png_struct() 53 png_calloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) 57 ret = png_malloc(png_ptr, size); 71 png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), 80 PNG_UNUSED(png_ptr) 93 if (png_ptr != NULL && png_ptr->malloc_fn != NULL) [all …]
|
D | pngget.c | 20 png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr, in png_get_valid() argument 23 if (png_ptr != NULL && info_ptr != NULL) in png_get_valid() 30 png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_rowbytes() argument 32 if (png_ptr != NULL && info_ptr != NULL) in png_get_rowbytes() 40 png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_rows() argument 42 if (png_ptr != NULL && info_ptr != NULL) in png_get_rows() 52 png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_image_width() argument 54 if (png_ptr != NULL && info_ptr != NULL) in png_get_image_width() 61 png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_image_height() argument 63 if (png_ptr != NULL && info_ptr != NULL) in png_get_image_height() [all …]
|
/external/libpng/contrib/gregbook/ |
D | readpng2.c | 73 static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr); 74 static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, 76 static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr); 77 static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg); 78 static void readpng2_warning_handler(png_structp png_ptr, png_const_charp msg); 107 png_structp png_ptr; /* note: temporary variables! */ in readpng2_init() local 113 png_ptr = png_create_read_struct(png_get_libpng_ver(NULL), mainprog_ptr, in readpng2_init() 115 if (!png_ptr) in readpng2_init() 118 info_ptr = png_create_info_struct(png_ptr); in readpng2_init() 120 png_destroy_read_struct(&png_ptr, NULL, NULL); in readpng2_init() [all …]
|