[backend/drive] Fix LibVips autorot error

The error message said that the operation must be mutable, but it only works when the operation is not mutable. Oh well.
This commit is contained in:
Laura Hausmann 2024-08-11 21:33:32 +02:00
parent 871c20c3fa
commit f7a5d86326
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -112,9 +112,9 @@ public class VipsProcessor : ImageProcessorBase, IImageProcessor
private static Image StripMetadata(Image image) private static Image StripMetadata(Image image)
{ {
return image.Mutate(mutable => using var intermediate = image.Autorot();
return intermediate.Mutate(mutable =>
{ {
mutable.Autorot();
foreach (var field in mutable.GetFields()) foreach (var field in mutable.GetFields())
{ {
if (field is "icc-profile-data") continue; if (field is "icc-profile-data") continue;