Upgrade to libvips v8.8.0, remove deprecated overlayWith

This commit is contained in:
Lovell Fuller
2019-05-21 23:11:27 +01:00
parent cfa4f7d45c
commit 631a3597c7
43 changed files with 3064 additions and 3563 deletions

View File

@@ -25,8 +25,8 @@
// Verify platform and compiler compatibility
#if (VIPS_MAJOR_VERSION < 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 7))
#error libvips version 8.7.0+ is required - see sharp.pixelplumbing.com/page/install
#if (VIPS_MAJOR_VERSION < 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 8))
#error libvips version 8.8.0+ is required - see sharp.pixelplumbing.com/page/install
#endif
#if ((!defined(__clang__)) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)))

View File

@@ -32,8 +32,6 @@
#endif /*HAVE_CONFIG_H*/
#include <vips/intl.h>
#include <iostream>
#include <vips/vips8>
VIPS_NAMESPACE_START

View File

@@ -563,7 +563,7 @@ VImage::new_from_file( const char *name, VOption *options )
}
VImage
VImage::new_from_buffer( void *buf, size_t len, const char *option_string,
VImage::new_from_buffer( const void *buf, size_t len, const char *option_string,
VOption *options )
{
const char *operation_name;
@@ -588,6 +588,13 @@ VImage::new_from_buffer( void *buf, size_t len, const char *option_string,
return( out );
}
VImage
VImage::new_from_buffer( const std::string &buf, const char *option_string,
VOption *options )
{
return( new_from_buffer( buf.c_str(), buf.size(), option_string, options ) );
}
VImage
VImage::new_matrix( int width, int height )
{

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,8 @@
#include <tuple>
#include <utility>
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
#include <vips/vips8>
#include <node.h>
@@ -30,6 +32,17 @@
#include "operations.h"
#include "pipeline.h"
#if defined(WIN32)
#define STAT64_STRUCT __stat64
#define STAT64_FUNCTION _stat64
#elif defined(__APPLE__)
#define STAT64_STRUCT stat
#define STAT64_FUNCTION stat
#else
#define STAT64_STRUCT stat64
#define STAT64_FUNCTION stat64
#endif
class PipelineWorker : public Nan::AsyncWorker {
public:
PipelineWorker(
@@ -1005,8 +1018,8 @@ class PipelineWorker : public Nan::AsyncWorker {
argv[2] = info;
} else {
// Add file size to info
GStatBuf st;
if (g_stat(baton->fileOut.data(), &st) == 0) {
struct STAT64_STRUCT st;
if (STAT64_FUNCTION(baton->fileOut.data(), &st) == 0) {
Set(info, New("size").ToLocalChecked(), New<v8::Uint32>(static_cast<uint32_t>(st.st_size)));
}
argv[1] = info;

View File

@@ -194,7 +194,7 @@ struct PipelineBaton {
blurSigma(0.0),
brightness(1.0),
saturation(1.0),
hue(0.0),
hue(0),
medianSize(0),
sharpenSigma(0.0),
sharpenFlat(1.0),

View File

@@ -115,7 +115,7 @@ class StatsWorker : public Nan::AsyncWorker {
std::vector<ChannelStats>::iterator it;
int i = 0;
for (it=baton->channelStats.begin() ; it < baton->channelStats.end(); it++, i++) {
for (it = baton->channelStats.begin(); it < baton->channelStats.end(); it++, i++) {
v8::Local<v8::Object> channelStat = New<v8::Object>();
Set(channelStat, New("min").ToLocalChecked(), New<v8::Number>(it->min));
Set(channelStat, New("max").ToLocalChecked(), New<v8::Number>(it->max));
@@ -127,7 +127,7 @@ class StatsWorker : public Nan::AsyncWorker {
Set(channelStat, New("minY").ToLocalChecked(), New<v8::Number>(it->minY));
Set(channelStat, New("maxX").ToLocalChecked(), New<v8::Number>(it->maxX));
Set(channelStat, New("maxY").ToLocalChecked(), New<v8::Number>(it->maxY));
channels->Set(i, channelStat);
Set(channels, i, channelStat);
}
Set(info, New("channels").ToLocalChecked(), channels);