2017-09-27 10:42:49 +02:00
|
|
|
#include <stdlib.h>
|
2019-02-09 14:06:26 +02:00
|
|
|
|
2017-09-27 10:42:49 +02:00
|
|
|
#include <vips/vips.h>
|
|
|
|
#include <vips/vips7compat.h>
|
2019-09-10 14:46:26 +02:00
|
|
|
#include <vips/vector.h>
|
2018-01-10 12:10:20 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
enum ImgproxyImageTypes {
|
|
|
|
UNKNOWN = 0,
|
|
|
|
JPEG,
|
|
|
|
PNG,
|
|
|
|
WEBP,
|
|
|
|
GIF,
|
|
|
|
ICO,
|
2019-06-03 18:07:03 +02:00
|
|
|
SVG,
|
2019-09-27 13:49:52 +02:00
|
|
|
HEIC,
|
2019-09-30 13:30:20 +02:00
|
|
|
BMP,
|
2019-09-27 13:49:52 +02:00
|
|
|
TIFF
|
2019-02-09 14:06:26 +02:00
|
|
|
};
|
2017-10-16 13:40:24 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_initialize();
|
2017-10-16 13:40:24 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
void clear_image(VipsImage **in);
|
|
|
|
void g_free_go(void **buf);
|
2017-09-27 21:17:17 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
void swap_and_clear(VipsImage **in, VipsImage *out);
|
2017-09-27 21:17:17 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_type_find_load_go(int imgtype);
|
|
|
|
int vips_type_find_save_go(int imgtype);
|
2018-09-07 16:46:16 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_jpegload_go(void *buf, size_t len, int shrink, VipsImage **out);
|
|
|
|
int vips_pngload_go(void *buf, size_t len, VipsImage **out);
|
2019-06-03 12:53:47 +02:00
|
|
|
int vips_webpload_go(void *buf, size_t len, double scale, int pages, VipsImage **out);
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_gifload_go(void *buf, size_t len, int pages, VipsImage **out);
|
|
|
|
int vips_svgload_go(void *buf, size_t len, double scale, VipsImage **out);
|
2019-06-03 18:07:03 +02:00
|
|
|
int vips_heifload_go(void *buf, size_t len, VipsImage **out);
|
2019-09-30 13:30:20 +02:00
|
|
|
int vips_bmpload_go(void *buf, size_t len, VipsImage **out);
|
2019-09-27 13:49:52 +02:00
|
|
|
int vips_tiffload_go(void *buf, size_t len, VipsImage **out);
|
2018-09-07 16:46:16 +02:00
|
|
|
|
2019-09-19 15:44:11 +02:00
|
|
|
int vips_get_orientation(VipsImage *image);
|
2019-03-22 16:57:10 +02:00
|
|
|
void vips_strip_meta(VipsImage *image);
|
2018-10-02 14:20:23 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_support_smartcrop();
|
2017-09-27 21:17:17 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
VipsBandFormat vips_band_format(VipsImage *in);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-06-03 12:53:47 +02:00
|
|
|
gboolean vips_support_webp_animation();
|
|
|
|
gboolean vips_is_animated(VipsImage * in);
|
2019-02-09 14:06:26 +02:00
|
|
|
gboolean vips_image_hasalpha_go(VipsImage * in);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_copy_go(VipsImage *in, VipsImage **out);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_cast_go(VipsImage *in, VipsImage **out, VipsBandFormat format);
|
2019-03-22 16:57:10 +02:00
|
|
|
int vips_rad2float_go(VipsImage *in, VipsImage **out);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_resize_go(VipsImage *in, VipsImage **out, double scale);
|
|
|
|
int vips_resize_with_premultiply(VipsImage *in, VipsImage **out, double scale);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-05-06 09:09:12 +02:00
|
|
|
int vips_icc_is_srgb_iec61966(VipsImage *in);
|
2019-05-30 13:26:30 +02:00
|
|
|
int vips_has_embedded_icc(VipsImage *in);
|
|
|
|
int vips_support_builtin_icc();
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_icc_import_go(VipsImage *in, VipsImage **out, char *profile);
|
|
|
|
int vips_colourspace_go(VipsImage *in, VipsImage **out, VipsInterpretation cs);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_rot_go(VipsImage *in, VipsImage **out, VipsAngle angle);
|
|
|
|
int vips_flip_horizontal_go(VipsImage *in, VipsImage **out);
|
2018-10-19 11:47:11 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_extract_area_go(VipsImage *in, VipsImage **out, int left, int top, int width, int height);
|
|
|
|
int vips_smartcrop_go(VipsImage *in, VipsImage **out, int width, int height);
|
2020-04-07 14:06:28 +02:00
|
|
|
int vips_trim(VipsImage *in, VipsImage **out, double threshold,
|
|
|
|
gboolean smart, double r, double g, double b,
|
|
|
|
gboolean equal_hor, gboolean equal_ver);
|
2018-11-08 12:34:21 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_gaussblur_go(VipsImage *in, VipsImage **out, double sigma);
|
|
|
|
int vips_sharpen_go(VipsImage *in, VipsImage **out, double sigma);
|
2017-09-27 10:42:49 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_flatten_go(VipsImage *in, VipsImage **out, double r, double g, double b);
|
2018-11-29 12:30:59 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_replicate_go(VipsImage *in, VipsImage **out, int across, int down);
|
2019-06-17 12:13:34 +02:00
|
|
|
int vips_embed_go(VipsImage *in, VipsImage **out, int x, int y, int width, int height, double *bg, int bgn);
|
2017-09-27 10:42:49 +02:00
|
|
|
|
2019-02-21 17:55:20 +02:00
|
|
|
int vips_ensure_alpha(VipsImage *in, VipsImage **out);
|
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_apply_watermark(VipsImage *in, VipsImage *watermark, VipsImage **out, double opacity);
|
2017-09-27 21:17:17 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_arrayjoin_go(VipsImage **in, VipsImage **out, int n);
|
2018-11-08 12:34:21 +02:00
|
|
|
|
2020-01-30 17:43:08 +02:00
|
|
|
int vips_jpegsave_go(VipsImage *in, void **buf, size_t *len, int quality, int interlace, gboolean strip);
|
2019-04-05 12:30:16 +02:00
|
|
|
int vips_pngsave_go(VipsImage *in, void **buf, size_t *len, int interlace, int quantize, int colors);
|
2020-01-30 17:43:08 +02:00
|
|
|
int vips_webpsave_go(VipsImage *in, void **buf, size_t *len, int quality, gboolean strip);
|
2019-02-09 14:06:26 +02:00
|
|
|
int vips_gifsave_go(VipsImage *in, void **buf, size_t *len);
|
|
|
|
int vips_icosave_go(VipsImage *in, void **buf, size_t *len);
|
2019-09-30 13:36:38 +02:00
|
|
|
int vips_bmpsave_go(VipsImage *in, void **buf, size_t *len);
|
2019-09-27 13:49:52 +02:00
|
|
|
int vips_tiffsave_go(VipsImage *in, void **buf, size_t *len, int quality);
|
2018-12-02 15:02:19 +02:00
|
|
|
|
2019-02-09 14:06:26 +02:00
|
|
|
void vips_cleanup();
|