mirror of
https://github.com/lovell/sharp.git
synced 2026-02-05 14:16:17 +01:00
Premultiply alpha channel to avoid dark artifacts during tranformation
Add `Sharp.compare(file1, file2, callback)` function for comparing images using mean squared error (MSE). This is useful for unit tests. See: - https://github.com/jcupitt/libvips/issues/291 - http://entropymine.com/imageworsener/resizealpha/
This commit is contained in:
committed by
Lovell Fuller
parent
c792a047b1
commit
ef8db1eebf
@@ -4,6 +4,7 @@
|
||||
#include "nan.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "compare.h"
|
||||
#include "metadata.h"
|
||||
#include "resize.h"
|
||||
#include "utilities.h"
|
||||
@@ -19,6 +20,7 @@ extern "C" void init(v8::Handle<v8::Object> target) {
|
||||
// Methods available to JavaScript
|
||||
NODE_SET_METHOD(target, "metadata", metadata);
|
||||
NODE_SET_METHOD(target, "resize", resize);
|
||||
NODE_SET_METHOD(target, "compare", compare);
|
||||
NODE_SET_METHOD(target, "cache", cache);
|
||||
NODE_SET_METHOD(target, "concurrency", concurrency);
|
||||
NODE_SET_METHOD(target, "counters", counters);
|
||||
|
||||
Reference in New Issue
Block a user