mirror of
https://github.com/lovell/sharp.git
synced 2026-02-05 14:16:17 +01:00
Refactor internal 'resize' to more apt 'pipeline'
Refactor 'composite' C to C++ 'operations'
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
#include "nan.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "operations.h"
|
||||
#include "utilities.h"
|
||||
#include "composite.h"
|
||||
|
||||
using v8::Local;
|
||||
using v8::Object;
|
||||
@@ -13,13 +13,6 @@ using v8::Number;
|
||||
using v8::String;
|
||||
using v8::Boolean;
|
||||
|
||||
using sharp::DetermineImageType;
|
||||
using sharp::ImageType;
|
||||
using sharp::InitImage;
|
||||
using sharp::HasAlpha;
|
||||
using sharp::counterQueue;
|
||||
using sharp::counterProcess;
|
||||
|
||||
/*
|
||||
Get and set cache memory and item limits
|
||||
*/
|
||||
@@ -68,6 +61,9 @@ NAN_METHOD(concurrency) {
|
||||
Get internal counters (queued tasks, processing tasks)
|
||||
*/
|
||||
NAN_METHOD(counters) {
|
||||
using sharp::counterProcess;
|
||||
using sharp::counterQueue;
|
||||
|
||||
NanScope();
|
||||
Local<Object> counters = NanNew<Object>();
|
||||
counters->Set(NanNew<String>("queue"), NanNew<Number>(counterQueue));
|
||||
@@ -154,6 +150,12 @@ NAN_METHOD(format) {
|
||||
between two images of the same dimensions and number of channels.
|
||||
*/
|
||||
NAN_METHOD(_maxColourDistance) {
|
||||
using sharp::Premultiply;
|
||||
using sharp::DetermineImageType;
|
||||
using sharp::ImageType;
|
||||
using sharp::InitImage;
|
||||
using sharp::HasAlpha;
|
||||
|
||||
NanScope();
|
||||
|
||||
// Create "hook" VipsObject to hang image references from
|
||||
|
||||
Reference in New Issue
Block a user