Fix tint op by ensuring LAB and allowing negative values #1235

Add test cases for more tint colours and input interpretations
This commit is contained in:
Lovell Fuller
2018-05-23 20:51:47 +01:00
parent b1a9bf10a2
commit 54a71fc142
9 changed files with 55 additions and 9 deletions

View File

@@ -683,7 +683,7 @@ class PipelineWorker : public Nan::AsyncWorker {
}
// Tint the image
if (baton->tintA > 0 || baton->tintB > 0) {
if (baton->tintA < 128.0 || baton->tintB < 128.0) {
image = sharp::Tint(image, baton->tintA, baton->tintB);
}