|
|
@@ -20,9 +20,15 @@ |
|
|
|
#ifndef __PIPI_H__ |
|
|
|
#define __PIPI_H__ |
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
#include <string.h> |
|
|
|
#include <stdint.h> |
|
|
|
#include <pipi_types.h> |
|
|
|
|
|
|
|
#undef __extern |
|
|
|
#if defined(_DOXYGEN_SKIP_ME) |
|
|
|
#elif defined(_WIN32) && defined(__LIBPIPI__) |
|
|
|
# define __extern extern __declspec(dllexport) |
|
|
|
#else |
|
|
|
# define __extern extern |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
extern "C" |
|
|
@@ -112,103 +118,102 @@ typedef struct |
|
|
|
} |
|
|
|
pipi_command_t; |
|
|
|
|
|
|
|
extern pipi_pixel_t *pipi_get_color_from_string(const char* s); |
|
|
|
__extern pipi_pixel_t *pipi_get_color_from_string(const char* s); |
|
|
|
|
|
|
|
char const * pipi_get_version(void); |
|
|
|
|
|
|
|
extern pipi_context_t *pipi_create_context(void); |
|
|
|
extern void pipi_destroy_context(pipi_context_t *); |
|
|
|
extern pipi_command_t const *pipi_get_command_list(void); |
|
|
|
extern int pipi_command(pipi_context_t *, char const *, ...); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_load(char const *); |
|
|
|
extern pipi_image_t *pipi_load_stock(char const *); |
|
|
|
extern pipi_image_t *pipi_new(int, int); |
|
|
|
extern pipi_image_t *pipi_copy(pipi_image_t *); |
|
|
|
extern void pipi_free(pipi_image_t *); |
|
|
|
extern int pipi_save(pipi_image_t *, const char *); |
|
|
|
|
|
|
|
extern void pipi_set_gamma(double); |
|
|
|
extern pipi_pixels_t *pipi_getpixels(pipi_image_t *, pipi_format_t); |
|
|
|
extern int pipi_get_image_width(pipi_image_t *img); |
|
|
|
extern int pipi_get_image_height(pipi_image_t *img); |
|
|
|
extern int pipi_get_image_pitch(pipi_image_t *img); |
|
|
|
extern int pipi_get_image_last_modified(pipi_image_t *img); |
|
|
|
extern const char* pipi_get_format_name(int format); |
|
|
|
|
|
|
|
|
|
|
|
extern double pipi_measure_msd(pipi_image_t *, pipi_image_t *); |
|
|
|
extern double pipi_measure_rmsd(pipi_image_t *, pipi_image_t *); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_resize(pipi_image_t *, int, int); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_render_random(int, int); |
|
|
|
extern pipi_image_t *pipi_render_bayer(int, int); |
|
|
|
extern pipi_image_t *pipi_render_halftone(int, int); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_rgb(pipi_image_t *, pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_red(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_green(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_blue(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_mean(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_min(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_max(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_add(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_sub(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_difference(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_multiply(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_divide(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_screen(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_overlay(pipi_image_t *, pipi_image_t *); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_convolution(pipi_image_t *, int, int, double[]); |
|
|
|
extern pipi_image_t *pipi_gaussian_blur(pipi_image_t *, float); |
|
|
|
extern pipi_image_t *pipi_gaussian_blur_ext(pipi_image_t *, |
|
|
|
__extern pipi_context_t *pipi_create_context(void); |
|
|
|
__extern void pipi_destroy_context(pipi_context_t *); |
|
|
|
__extern pipi_command_t const *pipi_get_command_list(void); |
|
|
|
__extern int pipi_command(pipi_context_t *, char const *, ...); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_load(char const *); |
|
|
|
__extern pipi_image_t *pipi_load_stock(char const *); |
|
|
|
__extern pipi_image_t *pipi_new(int, int); |
|
|
|
__extern pipi_image_t *pipi_copy(pipi_image_t *); |
|
|
|
__extern void pipi_free(pipi_image_t *); |
|
|
|
__extern int pipi_save(pipi_image_t *, const char *); |
|
|
|
|
|
|
|
__extern void pipi_set_gamma(double); |
|
|
|
__extern pipi_pixels_t *pipi_getpixels(pipi_image_t *, pipi_format_t); |
|
|
|
__extern int pipi_get_image_width(pipi_image_t *img); |
|
|
|
__extern int pipi_get_image_height(pipi_image_t *img); |
|
|
|
__extern int pipi_get_image_pitch(pipi_image_t *img); |
|
|
|
__extern int pipi_get_image_last_modified(pipi_image_t *img); |
|
|
|
__extern const char* pipi_get_format_name(int format); |
|
|
|
|
|
|
|
|
|
|
|
__extern double pipi_measure_msd(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern double pipi_measure_rmsd(pipi_image_t *, pipi_image_t *); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_resize(pipi_image_t *, int, int); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_render_random(int, int); |
|
|
|
__extern pipi_image_t *pipi_render_bayer(int, int); |
|
|
|
__extern pipi_image_t *pipi_render_halftone(int, int); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_rgb(pipi_image_t *, pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_red(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_green(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_blue(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_mean(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_min(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_max(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_add(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_sub(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_difference(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_multiply(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_divide(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_screen(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_overlay(pipi_image_t *, pipi_image_t *); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_convolution(pipi_image_t *, int, int, double[]); |
|
|
|
__extern pipi_image_t *pipi_gaussian_blur(pipi_image_t *, float); |
|
|
|
__extern pipi_image_t *pipi_gaussian_blur_ext(pipi_image_t *, |
|
|
|
float, float, float, float, float); |
|
|
|
extern pipi_image_t *pipi_box_blur(pipi_image_t *, int); |
|
|
|
extern pipi_image_t *pipi_box_blur_ext(pipi_image_t *, int, int); |
|
|
|
extern pipi_image_t *pipi_brightness(pipi_image_t *, double); |
|
|
|
extern pipi_image_t *pipi_contrast(pipi_image_t *, double); |
|
|
|
extern pipi_image_t *pipi_autocontrast(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_invert(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_threshold(pipi_image_t *, double); |
|
|
|
extern pipi_image_t *pipi_hflip(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_vflip(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_rotate90(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_rotate180(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_rotate270(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_median(pipi_image_t *, int); |
|
|
|
extern pipi_image_t *pipi_median_ext(pipi_image_t *, int, int); |
|
|
|
extern pipi_image_t *pipi_dilate(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_erode(pipi_image_t *); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_order(pipi_image_t *); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_tile(pipi_image_t *, int, int); |
|
|
|
extern int pipi_flood_fill(pipi_image_t *, |
|
|
|
__extern pipi_image_t *pipi_box_blur(pipi_image_t *, int); |
|
|
|
__extern pipi_image_t *pipi_box_blur_ext(pipi_image_t *, int, int); |
|
|
|
__extern pipi_image_t *pipi_brightness(pipi_image_t *, double); |
|
|
|
__extern pipi_image_t *pipi_contrast(pipi_image_t *, double); |
|
|
|
__extern pipi_image_t *pipi_autocontrast(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_invert(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_threshold(pipi_image_t *, double); |
|
|
|
__extern pipi_image_t *pipi_hflip(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_vflip(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_rotate90(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_rotate180(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_rotate270(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_median(pipi_image_t *, int); |
|
|
|
__extern pipi_image_t *pipi_median_ext(pipi_image_t *, int, int); |
|
|
|
__extern pipi_image_t *pipi_dilate(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_erode(pipi_image_t *); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_order(pipi_image_t *); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_tile(pipi_image_t *, int, int); |
|
|
|
__extern int pipi_flood_fill(pipi_image_t *, |
|
|
|
int, int, float, float, float, float); |
|
|
|
extern int pipi_draw_line(pipi_image_t *, int, int, int, int, uint32_t, int); |
|
|
|
extern int pipi_draw_polyline(pipi_image_t *, int const[], int const[], |
|
|
|
__extern int pipi_draw_line(pipi_image_t *, int, int, int, int, uint32_t, int); |
|
|
|
__extern int pipi_draw_polyline(pipi_image_t *, int const[], int const[], |
|
|
|
int , uint32_t, int); |
|
|
|
extern int pipi_draw_bezier4(pipi_image_t *,int, int, int, int, int, int, int, int, uint32_t, int, int); |
|
|
|
extern pipi_image_t *pipi_reduce(pipi_image_t *, int, double const *); |
|
|
|
__extern int pipi_draw_bezier4(pipi_image_t *,int, int, int, int, int, int, int, int, uint32_t, int, int); |
|
|
|
__extern pipi_image_t *pipi_reduce(pipi_image_t *, int, double const *); |
|
|
|
|
|
|
|
extern pipi_image_t *pipi_dither_ediff(pipi_image_t *, pipi_image_t *, |
|
|
|
__extern pipi_image_t *pipi_dither_ediff(pipi_image_t *, pipi_image_t *, |
|
|
|
pipi_scan_t); |
|
|
|
extern pipi_image_t *pipi_dither_ordered(pipi_image_t *, pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_dither_ordered_ext(pipi_image_t *, pipi_image_t *, |
|
|
|
__extern pipi_image_t *pipi_dither_ordered(pipi_image_t *, pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_dither_ordered_ext(pipi_image_t *, pipi_image_t *, |
|
|
|
double, double); |
|
|
|
extern pipi_image_t *pipi_dither_halftone(pipi_image_t *, double, double); |
|
|
|
extern pipi_image_t *pipi_dither_random(pipi_image_t *); |
|
|
|
extern pipi_image_t *pipi_dither_ostromoukhov(pipi_image_t *, pipi_scan_t); |
|
|
|
extern pipi_image_t *pipi_dither_dbs(pipi_image_t *); |
|
|
|
extern void pipi_dither_24to16(pipi_image_t *); |
|
|
|
|
|
|
|
extern pipi_histogram_t* pipi_new_histogram(void); |
|
|
|
extern int pipi_get_image_histogram(pipi_image_t *, pipi_histogram_t *, int); |
|
|
|
extern int pipi_free_histogram(pipi_histogram_t*); |
|
|
|
extern int pipi_render_histogram(pipi_image_t *, pipi_histogram_t*, int); |
|
|
|
|
|
|
|
__extern pipi_image_t *pipi_dither_halftone(pipi_image_t *, double, double); |
|
|
|
__extern pipi_image_t *pipi_dither_random(pipi_image_t *); |
|
|
|
__extern pipi_image_t *pipi_dither_ostromoukhov(pipi_image_t *, pipi_scan_t); |
|
|
|
__extern pipi_image_t *pipi_dither_dbs(pipi_image_t *); |
|
|
|
__extern void pipi_dither_24to16(pipi_image_t *); |
|
|
|
|
|
|
|
__extern pipi_histogram_t* pipi_new_histogram(void); |
|
|
|
__extern int pipi_get_image_histogram(pipi_image_t *, pipi_histogram_t *, int); |
|
|
|
__extern int pipi_free_histogram(pipi_histogram_t*); |
|
|
|
__extern int pipi_render_histogram(pipi_image_t *, pipi_histogram_t*, int); |
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
} |
|
|
|