/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 (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 | pngrtran.c | 36 png_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action) in png_set_crc_action() argument 40 if (png_ptr == NULL) in png_set_crc_action() 50 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 51 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; in png_set_crc_action() 55 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 56 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | in png_set_crc_action() 61 png_warning(png_ptr, in png_set_crc_action() 68 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 79 png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; in png_set_crc_action() 80 png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; in png_set_crc_action() [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 | example.c | 225 # define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf) 276 png_structp png_ptr; 289 png_structp png_ptr; 301 png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 304 if (png_ptr == NULL) 311 info_ptr = png_create_info_struct(png_ptr); 315 png_destroy_read_struct(&png_ptr, NULL, NULL); 323 if (setjmp(png_jmpbuf(png_ptr))) 326 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 335 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 …]
|
D | pngwio.c | 33 png_write_data(png_structrp png_ptr, png_const_bytep data, size_t length) in png_write_data() argument 36 if (png_ptr->write_data_fn != NULL ) in png_write_data() 37 (*(png_ptr->write_data_fn))(png_ptr, png_constcast(png_bytep,data), in png_write_data() 41 png_error(png_ptr, "Call to NULL write function"); in png_write_data() 51 png_default_write_data(png_structp png_ptr, png_bytep data, size_t length) in png_default_write_data() argument 55 if (png_ptr == NULL) in png_default_write_data() 58 check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); in png_default_write_data() 61 png_error(png_ptr, "Write Error"); in png_default_write_data() 71 png_flush(png_structrp png_ptr) in png_flush() argument 73 if (png_ptr->output_flush_fn != NULL) in png_flush() [all …]
|
D | png.h | 906 PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); 934 (png_const_structrp png_ptr)); 936 PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, 950 PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, 952 # define png_jmpbuf(png_ptr) \ argument 953 (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) 955 # define png_jmpbuf(png_ptr) \ argument 963 PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), 968 PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); 986 PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); [all …]
|
D | pngrio.c | 32 png_read_data(png_structrp png_ptr, png_bytep data, size_t length) in png_read_data() argument 36 if (png_ptr->read_data_fn != NULL) in png_read_data() 37 (*(png_ptr->read_data_fn))(png_ptr, data, length); in png_read_data() 40 png_error(png_ptr, "Call to NULL read function"); in png_read_data() 50 png_default_read_data(png_structp png_ptr, png_bytep data, size_t length) in png_default_read_data() argument 54 if (png_ptr == NULL) in png_default_read_data() 60 check = fread(data, 1, length, png_voidcast(png_FILE_p, png_ptr->io_ptr)); in png_default_read_data() 63 png_error(png_ptr, "Read Error"); in png_default_read_data() 87 png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr, in png_set_read_fn() argument 90 if (png_ptr == NULL) in png_set_read_fn() [all …]
|
D | pngpriv.h | 772 #define png_float(png_ptr, fixed, s) (.00001 * (fixed)) argument 791 #define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ argument 792 ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) 965 PNG_INTERNAL_FUNCTION(void, png_zstream_error,(png_structrp png_ptr, int ret), 972 PNG_INTERNAL_FUNCTION(void,png_free_buffer_list,(png_structrp png_ptr, 984 PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr, 991 PNG_INTERNAL_FUNCTION(int,png_user_version_check,(png_structrp png_ptr, 998 PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_base,(png_const_structrp png_ptr, 1006 PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_array,(png_const_structrp png_ptr, 1013 PNG_INTERNAL_FUNCTION(png_voidp,png_realloc_array,(png_const_structrp png_ptr, [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 …]
|
D | readpng.c | 65 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) argument 69 static png_structp png_ptr = NULL; variable 103 png_ptr = png_create_read_struct(png_get_libpng_ver(NULL), NULL, NULL, in readpng_init() 105 if (!png_ptr) in readpng_init() 108 info_ptr = png_create_info_struct(png_ptr); in readpng_init() 110 png_destroy_read_struct(&png_ptr, NULL, NULL); in readpng_init() 123 if (setjmp(png_jmpbuf(png_ptr))) { in readpng_init() 124 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in readpng_init() 129 png_init_io(png_ptr, infile); in readpng_init() 130 png_set_sig_bytes(png_ptr, 8); /* we already read the 8 signature bytes */ in readpng_init() [all …]
|
D | writepng.c | 66 static void writepng_error_handler(png_structp png_ptr, png_const_charp msg); 86 png_structp png_ptr; /* note: temporary variables! */ in writepng_init() local 93 png_ptr = png_create_write_struct(png_get_libpng_ver(NULL), mainprog_ptr, in writepng_init() 95 if (!png_ptr) in writepng_init() 98 info_ptr = png_create_info_struct(png_ptr); in writepng_init() 100 png_destroy_write_struct(&png_ptr, NULL); in writepng_init() 112 png_destroy_write_struct(&png_ptr, &info_ptr); in writepng_init() 119 png_init_io(png_ptr, mainprog_ptr->outfile); in writepng_init() 129 png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); in writepng_init() 149 png_destroy_write_struct(&png_ptr, &info_ptr); in writepng_init() [all …]
|
/external/libpng/contrib/oss-fuzz/ |
D | libpng_read_fuzzer.cc | 27 if(png_handler.png_ptr) \ 30 png_free(png_handler.png_ptr, png_handler.row_ptr); \ 32 png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,\ 35 png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,\ 38 png_destroy_read_struct(&png_handler.png_ptr, nullptr, nullptr); \ 39 png_handler.png_ptr = nullptr; \ 52 png_structp png_ptr = nullptr; member 59 png_free(png_ptr, row_ptr); in ~PngObjectHandler() 61 png_destroy_read_struct(&png_ptr, &info_ptr, &end_info_ptr); in ~PngObjectHandler() 63 png_destroy_read_struct(&png_ptr, &info_ptr, nullptr); in ~PngObjectHandler() [all …]
|
/external/libpng/contrib/visupng/ |
D | PngFile.c | 29 static png_structp png_ptr = NULL; variable 36 png_cexcept_error(png_structp png_ptr, png_const_charp msg) in png_cexcept_error() argument 38 if(png_ptr) in png_cexcept_error() 139 png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, 141 if (!png_ptr) 147 info_ptr = png_create_info_struct(png_ptr); 150 png_destroy_read_struct(&png_ptr, NULL, NULL); 161 png_init_io(png_ptr, pfFile); 163 png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data); 166 png_set_sig_bytes(png_ptr, 8); [all …]
|
/external/tensorflow/tensorflow/core/lib/png/ |
D | png_io.cc | 78 void ErrorHandler(png_structp png_ptr, png_const_charp msg) { in ErrorHandler() argument 80 absl::bit_cast<DecodeContext*>(png_get_io_ptr(png_ptr)); in ErrorHandler() 84 longjmp(png_jmpbuf(png_ptr), 1); in ErrorHandler() 87 void WarningHandler(png_structp png_ptr, png_const_charp msg) { in WarningHandler() argument 91 void StringReader(png_structp png_ptr, png_bytep data, png_size_t length) { in StringReader() argument 93 absl::bit_cast<DecodeContext*>(png_get_io_ptr(png_ptr)); in StringReader() 100 png_error(png_ptr, "More bytes requested to read than available"); in StringReader() 109 void StringWriter(png_structp png_ptr, png_bytep data, png_size_t length) { in StringWriter() argument 110 T* const s = absl::bit_cast<T*>(png_get_io_ptr(png_ptr)); in StringWriter() 114 void StringWriterFlush(png_structp png_ptr) {} in StringWriterFlush() argument [all …]
|
/external/pdfium/core/fxcodec/png/ |
D | png_decoder.cpp | 38 void _png_error_data(png_structp png_ptr, png_const_charp error_msg) { in _png_error_data() argument 39 if (png_get_error_ptr(png_ptr)) { in _png_error_data() 40 strncpy(static_cast<char*>(png_get_error_ptr(png_ptr)), error_msg, in _png_error_data() 44 longjmp(png_jmpbuf(png_ptr), 1); in _png_error_data() 47 void _png_warning_data(png_structp png_ptr, png_const_charp error_msg) {} in _png_warning_data() argument 49 void _png_load_bmp_attribute(png_structp png_ptr, in _png_load_bmp_attribute() argument 54 pAttribute->m_nXDPI = png_get_x_pixels_per_meter(png_ptr, info_ptr); in _png_load_bmp_attribute() 55 pAttribute->m_nYDPI = png_get_y_pixels_per_meter(png_ptr, info_ptr); in _png_load_bmp_attribute() 58 png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, &unit_type); in _png_load_bmp_attribute() 72 png_get_iCCP(png_ptr, info_ptr, &icc_name, &compress_type, &icc_profile, in _png_load_bmp_attribute() [all …]
|
/external/libpng/contrib/libtests/ |
D | readpng.c | 36 png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0); in read_png() local 40 if (png_ptr == NULL) in read_png() 43 if (setjmp(png_jmpbuf(png_ptr))) in read_png() 45 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in read_png() 51 png_init_io(png_ptr, fp); in read_png() 53 info_ptr = png_create_info_struct(png_ptr); in read_png() 55 png_error(png_ptr, "OOM allocating info structure"); in read_png() 57 png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_ALWAYS, NULL, 0); in read_png() 59 png_read_info(png_ptr, info_ptr); in read_png() 62 size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); in read_png() [all …]
|