Hardcoded color level values in deepfry, default to quantum depth of 8

This commit is contained in:
Essem 2021-08-31 15:35:27 -05:00
parent b6db4a869e
commit c6589dd507
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,7 @@
"libraries": [ "libraries": [
"<!(pkg-config --libs Magick++)", "<!(pkg-config --libs Magick++)",
], ],
"defines": ["NAPI_CPP_EXCEPTIONS", "MAGICKCORE_HDRI_ENABLE=false", "MAGICKCORE_QUANTUM_DEPTH=16"] "defines": ["NAPI_CPP_EXCEPTIONS", "MAGICKCORE_HDRI_ENABLE=0", "MAGICKCORE_QUANTUM_DEPTH=8"]
} }
] ]
} }

View file

@ -28,7 +28,7 @@ Napi::Value Deepfry(const Napi::CallbackInfo &info) {
for (Image &image : coalesced) { for (Image &image : coalesced) {
Blob temp; Blob temp;
image.colorSpace(Magick::sRGBColorspace); image.colorSpace(Magick::sRGBColorspace);
image.level(QuantumRange * 0.25, QuantumRange * 0.60); image.level(16383.75, 39321);
image.quality(1); image.quality(1);
image.magick("JPEG"); image.magick("JPEG");
image.write(&temp); image.write(&temp);