Go to the documentation of this file.
34 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
57 #define PNG_BYTES_TO_CHECK 4
58 int check_if_png(
char *file_name, FILE **
fp)
60 char buf[PNG_BYTES_TO_CHECK];
63 if ((*
fp = fopen(file_name,
"rb")) == NULL)
67 if (fread(
buf, 1, PNG_BYTES_TO_CHECK, *
fp) != PNG_BYTES_TO_CHECK)
83 void read_png(
char *file_name)
87 unsigned int sig_read = 0;
92 if ((
fp = fopen(file_name,
"rb")) == NULL)
95 void read_png(FILE *
fp,
unsigned int sig_read)
110 png_voidp user_error_ptr, user_error_fn, user_warning_fn);
240 else if ((gamma_str = getenv(
"SCREEN_GAMMA")) != NULL)
283 png_color std_color_cube[MAX_SCREEN_COLORS];
358 for (pass = 0; pass < number_passes; pass++)
361 for (y = 0; y <
height; y++)
367 for (y = 0; y <
height; y += number_of_rows)
412 png_voidp user_error_ptr, user_error_fn, user_warning_fn);
414 if (*png_ptr == NULL)
447 info_callback, row_callback, end_callback);
508 if ((row_num >= 0) && (row_num <
height))
559 void write_png(
char *file_name )
567 fp = fopen(file_name,
"wb");
578 png_voidp user_error_ptr, user_error_fn, user_warning_fn);
614 user_IO_flush_function);
651 sig_bit.red = true_red_bit_depth;
652 sig_bit.green = true_green_bit_depth;
653 sig_bit.blue = true_blue_bit_depth;
655 sig_bit.alpha = true_alpha_bit_depth;
669 text_ptr[1].text =
"Leonardo DaVinci";
674 #ifdef PNG_iTXt_SUPPORTED
752 png_error (png_ptr,
"Image is too tall to process in memory");
754 for (k = 0; k <
height; k++)
767 for (pass = 0; pass < number_passes; pass++)
773 for (y = 0; y <
height; y++)
png_uint_32 PNGAPI png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
void PNGAPI png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)
png_uint_32 PNGAPI png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
void PNGAPI png_process_data(png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)
png_infop png_textp * text_ptr
void PNGAPI png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)
png_infop png_uint_32 * width
void PNGAPI png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
#define PNG_TEXT_COMPRESSION_zTXt
void PNGAPI png_write_rows(png_structp png_ptr, png_bytepp row, png_uint_32 num_rows)
int PNGAPI png_set_interlace_handling(png_structp png_ptr)
void PNGAPI png_set_swap_alpha(png_structp png_ptr)
png_uint_32 PNGAPI png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
void PNGAPI png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)
png_uint_32 PNGAPI png_get_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p *background)
#define png_uint_16p_NULL
png_color_8 FAR * png_color_8p
png_infop png_bytep buffer
png_bytep png_bytep new_row
png_color FAR * png_colorp
#define PNG_FILTER_TYPE_BASE
void PNGAPI png_set_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)
png_voidp PNGAPI png_malloc(png_structp png_ptr, png_uint_32 size)
png_infop png_uint_32 png_uint_32 int * bit_depth
void PNGAPI png_set_swap(png_structp png_ptr)
void PNGAPI png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
png_infop PNGAPI png_create_info_struct(png_structp png_ptr)
void PNGAPI png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
void PNGAPI png_read_rows(png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)
void PNGAPI png_set_tRNS_to_alpha(png_structp png_ptr)
png_infop png_bytepp row_pointers
void PNGAPI png_set_packswap(png_structp png_ptr)
void PNGAPI png_read_end(png_structp png_ptr, png_infop info_ptr)
void PNGAPI png_set_sig_bytes(png_structp png_ptr, int num_bytes)
png_structp PNGAPI png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)
void PNGAPI png_set_dither(png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_dither)
#define PNG_TEXT_COMPRESSION_NONE
#define PNG_MAX_PALETTE_LENGTH
void PNGAPI png_set_strip_alpha(png_structp png_ptr)
int PNGAPI png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
void PNGAPI png_set_background(png_structp png_ptr, png_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma)
void PNGAPI png_set_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)
void PNGAPI png_set_strip_16(png_structp png_ptr)
#define PNG_COLOR_TYPE_GRAY
void PNGAPI png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)
void PNGAPI png_read_info(png_structp png_ptr, png_infop info_ptr)
void PNGAPI png_set_invert_mono(png_structp png_ptr)
void PNGAPI png_set_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)
void PNGAPI png_progressive_combine_row(png_structp png_ptr, png_bytep old_row, png_bytep new_row)
#define PNG_COMPRESSION_TYPE_BASE
#define png_jmpbuf(png_ptr)
png_struct FAR * png_structp
png_uint_32 PNGAPI png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
png_infop png_bytep * trans
png_colorp int int png_uint_16p histogram
png_uint_16 FAR * png_uint_16p
void PNGAPI png_init_io(png_structp png_ptr, png_FILE_p fp)
void PNGAPI png_set_palette_to_rgb(png_structp png_ptr)
#define PNG_FILLER_BEFORE
void PNGAPI png_set_shift(png_structp png_ptr, png_color_8p true_bits)
png_uint_32 PNGAPI png_get_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_type, int *compression_type, int *filter_type)
png_structp PNGAPI png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)
void PNGAPI png_set_bgr(png_structp png_ptr)
png_uint_32 PNGAPI png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette)
void PNGAPI png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
#define PNG_BACKGROUND_GAMMA_SCREEN
#define PNG_LIBPNG_VER_STRING
#define PNG_BACKGROUND_GAMMA_FILE
#define PNG_COLOR_MASK_COLOR
void PNGAPI png_write_png(png_structp png_ptr, png_infop info_ptr, int transforms, voidp params)
png_infop png_color_8p * sig_bit
unsigned long png_uint_32
png_infop png_uint_32 png_uint_32 * height
void PNGAPI png_set_packing(png_structp png_ptr)
png_bytep png_bytep png_size_t length
void PNGAPI png_write_end(png_structp png_ptr, png_infop info_ptr)
png_infop png_uint_32 png_uint_32 int int * color_type
void PNGAPI png_write_info(png_structp png_ptr, png_infop info_ptr)
void PNGAPI png_set_gray_1_2_4_to_8(png_structp png_ptr)
png_uint_32 PNGAPI png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
void PNGAPI png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
void PNGAPI png_write_image(png_structp png_ptr, png_bytepp image)
void PNGAPI png_error(png_structp png_ptr, png_const_charp error_message)
void PNGAPI png_read_image(png_structp png_ptr, png_bytepp image)
void PNGAPI png_read_png(png_structp png_ptr, png_infop info_ptr, int transforms, voidp params)
void PNGAPI png_free(png_structp png_ptr, png_voidp ptr)
#define PNG_COLOR_TYPE_PALETTE
png_uint_32 PNGAPI png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
void PNGAPI png_read_update_info(png_structp png_ptr, png_infop info_ptr)
png_colorp int num_palette
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:02