Hi, I tried following the provided example of converting HEIC images to JPG. (Convert HEIC to JPG via C# | products.aspose.com)
Versions:
Aspose.Imaging: 24.9.0
Aspose.Imaging.HEIC.Adapter: 24.9.0
Stacktrace:
Aspose.Imaging.CoreExceptions.ImageSaveException : Image saving failed.
----> Aspose.Imaging.CoreExceptions.ImageSaveException : Image export failed.
----> System.Collections.Generic.KeyNotFoundException : The given key ‘1’ was not present in the dictionary.
at Aspose.Imaging.Image.Save(String filePath, ImageOptionsBase options, Rectangle boundsRectangle)
at Aspose.Imaging.Image.Save(String filePath, ImageOptionsBase options)
Code:
HEICImage.Register();
await using var stream = File.OpenRead(path);
using var image = Aspose.Imaging.Image.Load(stream);
// Save image to jpg
var path = Path.Combine(Path.GetTempPath(), "output.jpeg");
using var options = new JpegOptions();
image.Save(path, options);
I have 3 files where 1 is successfylly converted, one is partially converted, and one fail with stacktrace above. See attached files.
images.zip (4.5 MB)