Switch from libvips' C to C++ binding

Requires upgrade to libvips 8.2.1
This commit is contained in:
Lovell Fuller
2016-01-14 18:40:59 +00:00
parent 11329d5e09
commit 5c9c17f1f6
21 changed files with 4348 additions and 1178 deletions

18
src/operations.h Executable file → Normal file
View File

@@ -1,34 +1,32 @@
#ifndef SRC_OPERATIONS_H_
#define SRC_OPERATIONS_H_
#include <vips/vips8>
using vips::VImage;
namespace sharp {
/*
Composite images `src` and `dst` with premultiplied alpha channel and output
image with premultiplied alpha.
*/
int Composite(VipsObject *context, VipsImage *src, VipsImage *dst, VipsImage **out);
VImage Composite(VImage src, VImage dst);
/*
* Stretch luminance to cover full dynamic range.
*/
int Normalize(VipsObject *context, VipsImage *image, VipsImage **out);
VImage Normalize(VImage image);
/*
* Gaussian blur. Use sigma of -1 for fast blur.
*/
int Blur(VipsObject *context, VipsImage *image, VipsImage **out, double sigma);
VImage Blur(VImage image, double const sigma);
/*
* Sharpen flat and jagged areas. Use radius of -1 for fast sharpen.
*/
int Sharpen(VipsObject *context, VipsImage *image, VipsImage **out, int radius, double flat, double jagged);
/*
* Perform thresholding on an image. If the image is not greyscale, will convert before thresholding.
* Pixels with a greyscale value greater-than-or-equal-to `threshold` will be pure white. All others will be pure black.
*/
int Threshold(VipsObject *context, VipsImage *image, VipsImage **out, int threshold);
VImage Sharpen(VImage image, int const radius, double const flat, double const jagged);
} // namespace sharp
#endif // SRC_OPERATIONS_H_