#include <stdbool.h>
#include <stdlib.h>
-#include <glib.h>
#include "mm_util_type.h"
mm_util_completed_callback completed_cb;
} mm_util_cb_s;
-typedef struct {
- mm_image_info_s *src;
- mm_image_info_s *dst;
-
- /* for converting colorspace */
- mm_util_color_format_e dst_format;
- /* for image crop */
- /* for resize */
- unsigned int start_x;
- unsigned int start_y;
- unsigned int dst_width;
- unsigned int dst_height;
-
- /* for rotation */
- mm_util_img_rotate_type rotation;
-
- bool set_convert;
- bool set_crop;
- bool set_resize;
- bool set_rotate;
-
- /* for multi instance */
- mm_util_cb_s *_util_cb;
- bool is_completed;
- bool is_finish;
- GThread* thread;
- GAsyncQueue *queue;
-} mm_util_s;
-
int mm_util_get_image_size(mm_util_color_format_e format, unsigned int width, unsigned int height, size_t *imgsize);
-//int mm_util_create(mm_util_imgp_h *imgp_handle);
-//int mm_util_set_colorspace_convert(mm_util_imgp_h imgp_handle, mm_util_color_format_e colorspace);
-//int mm_util_set_resolution(mm_util_imgp_h imgp_handle, unsigned int width, unsigned int height);
-//int mm_util_set_rotation(mm_util_imgp_h imgp_handle, mm_util_img_rotate_type rotation);
-//int mm_util_set_crop_area(mm_util_imgp_h imgp_handle, unsigned int start_x, unsigned int start_y, unsigned int end_x, unsigned int end_y);
-int mm_util_transform(mm_util_imgp_h imgp_handle, mm_util_color_image_h image, mm_util_completed_callback completed_callback, void * user_data);
-//int mm_util_destroy(mm_util_imgp_h imgp_handle);
int mm_util_convert_colorspace(const unsigned char *src, unsigned int src_width, unsigned int src_height, mm_util_color_format_e src_format, mm_util_color_format_e dst_format, unsigned char **dst, unsigned int *result_buf_width, unsigned int *result_buf_height, size_t *result_buf_size);
int mm_util_resize_image(const unsigned char *src, unsigned int src_width, unsigned int src_height, mm_util_color_format_e src_format, unsigned int dst_width, unsigned int dst_height, unsigned char **dst, unsigned int *result_buf_width, unsigned int *result_buf_height, size_t *result_buf_size);
int mm_util_rotate_image(const unsigned char *src, unsigned int src_width, unsigned int src_height, mm_util_color_format_e src_format, mm_util_img_rotate_type angle, unsigned char **dst, unsigned int *result_buf_width, unsigned int *result_buf_height, size_t *result_buf_size);