mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Allow seq read for EXIF-based auto-orient #3725
This commit is contained in:
parent
38c760cdd7
commit
2f67823c3d
@ -19,6 +19,9 @@ Requires libvips v8.14.2
|
|||||||
* Prevent over-compute in affine-based rotate before resize.
|
* Prevent over-compute in affine-based rotate before resize.
|
||||||
[#3722](https://github.com/lovell/sharp/issues/3722)
|
[#3722](https://github.com/lovell/sharp/issues/3722)
|
||||||
|
|
||||||
|
* Allow sequential read for EXIF-based auto-orientation.
|
||||||
|
[#3725](https://github.com/lovell/sharp/issues/3725)
|
||||||
|
|
||||||
### v0.32.1 - 27th April 2023
|
### v0.32.1 - 27th April 2023
|
||||||
|
|
||||||
* Add experimental `unflatten` operation.
|
* Add experimental `unflatten` operation.
|
||||||
|
@ -79,6 +79,9 @@ class PipelineWorker : public Napi::AsyncWorker {
|
|||||||
// Rotate and flip image according to Exif orientation
|
// Rotate and flip image according to Exif orientation
|
||||||
std::tie(autoRotation, autoFlip, autoFlop) = CalculateExifRotationAndFlip(sharp::ExifOrientation(image));
|
std::tie(autoRotation, autoFlip, autoFlop) = CalculateExifRotationAndFlip(sharp::ExifOrientation(image));
|
||||||
image = sharp::RemoveExifOrientation(image);
|
image = sharp::RemoveExifOrientation(image);
|
||||||
|
if (baton->input->access == VIPS_ACCESS_SEQUENTIAL && (autoRotation != VIPS_ANGLE_D0 || autoFlip)) {
|
||||||
|
image = image.copy_memory();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rotation = CalculateAngleRotation(baton->angle);
|
rotation = CalculateAngleRotation(baton->angle);
|
||||||
}
|
}
|
||||||
@ -1676,7 +1679,6 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
|||||||
baton->angle != 0 ||
|
baton->angle != 0 ||
|
||||||
baton->rotationAngle != 0.0 ||
|
baton->rotationAngle != 0.0 ||
|
||||||
baton->tileAngle != 0 ||
|
baton->tileAngle != 0 ||
|
||||||
baton->useExifOrientation ||
|
|
||||||
baton->flip ||
|
baton->flip ||
|
||||||
baton->claheWidth != 0 ||
|
baton->claheWidth != 0 ||
|
||||||
!baton->affineMatrix.empty()
|
!baton->affineMatrix.empty()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user