mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
committed by
GitHub
parent
5a9f89fe06
commit
7eb5efa3a3
@@ -184,7 +184,7 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
|
||||
if (inputImageType == sharp::ImageType::JPEG) {
|
||||
// Leave at least a factor of two for the final resize step, when fastShrinkOnLoad: false
|
||||
// for more consistent results and avoid occasional small image shifting
|
||||
// for more consistent results and to avoid extra sharpness to the image
|
||||
int factor = baton->fastShrinkOnLoad ? 1 : 2;
|
||||
if (shrink >= 8 * factor) {
|
||||
jpegShrinkOnLoad = 8;
|
||||
@@ -193,7 +193,7 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
} else if (shrink >= 2 * factor) {
|
||||
jpegShrinkOnLoad = 2;
|
||||
}
|
||||
// Skip shrink-on-load for known libjpeg rounding errors
|
||||
// Lower shrink-on-load for known libjpeg rounding errors
|
||||
if (jpegShrinkOnLoad > 1 && static_cast<int>(shrink) == jpegShrinkOnLoad) {
|
||||
jpegShrinkOnLoad /= 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user