mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Fix rotate-then-extract for EXIF orientation 2 (#3218)
This commit is contained in:
@@ -95,16 +95,18 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
if (baton->rotateBeforePreExtract) {
|
||||
if (rotation != VIPS_ANGLE_D0) {
|
||||
image = image.rot(rotation);
|
||||
if (flip) {
|
||||
image = image.flip(VIPS_DIRECTION_VERTICAL);
|
||||
flip = FALSE;
|
||||
}
|
||||
if (flop) {
|
||||
image = image.flip(VIPS_DIRECTION_HORIZONTAL);
|
||||
flop = FALSE;
|
||||
}
|
||||
}
|
||||
if (flip) {
|
||||
image = image.flip(VIPS_DIRECTION_VERTICAL);
|
||||
}
|
||||
if (flop) {
|
||||
image = image.flip(VIPS_DIRECTION_HORIZONTAL);
|
||||
}
|
||||
if (rotation != VIPS_ANGLE_D0 || flip || flop) {
|
||||
image = sharp::RemoveExifOrientation(image);
|
||||
}
|
||||
flop = FALSE;
|
||||
flip = FALSE;
|
||||
if (baton->rotationAngle != 0.0) {
|
||||
MultiPageUnsupported(nPages, "Rotate");
|
||||
std::vector<double> background;
|
||||
|
||||
Reference in New Issue
Block a user