✨ Auto rotate the uploaded image according to EXIF
This commit is contained in:
parent
2f9df8009b
commit
1f01a4088c
@ -194,6 +194,7 @@ public class FileService(
|
||||
|
||||
using var vipsImage = NetVips.Image.NewFromFile(ogFilePath);
|
||||
var imagePath = Path.Join(Path.GetTempPath(), $"{TempFilePrefix}#{file.Id}");
|
||||
vipsImage.Autorot();
|
||||
vipsImage.WriteToFile(imagePath + ".webp",
|
||||
new VOption { { "lossless", true } });
|
||||
result.Add((imagePath + ".webp", string.Empty));
|
||||
|
Loading…
x
Reference in New Issue
Block a user