mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure autoOrient removes metadata after shrink-on-load #4431
This commit is contained in:
@@ -98,7 +98,6 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
if (baton->input->autoOrient) {
|
||||
// Rotate and flip image according to Exif orientation
|
||||
std::tie(autoRotation, autoFlip, autoFlop) = CalculateExifRotationAndFlip(sharp::ExifOrientation(image));
|
||||
image = sharp::RemoveExifOrientation(image);
|
||||
}
|
||||
|
||||
rotation = CalculateAngleRotation(baton->angle);
|
||||
@@ -294,6 +293,9 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
throw vips::VError("Input SVG image exceeds 32767x32767 pixel limit");
|
||||
}
|
||||
}
|
||||
if (baton->input->autoOrient) {
|
||||
image = sharp::RemoveExifOrientation(image);
|
||||
}
|
||||
|
||||
// Any pre-shrinking may already have been done
|
||||
inputWidth = image.width();
|
||||
|
||||
Reference in New Issue
Block a user