ImageMagick - Image keeps getting corrupt when trying to annotate

Viewed 13

With this code I can load an image, save it and it's fine.

using var image = new MagickImage(tifPaths[0]);
await image.WriteAsync("image.tif", MagickFormat.Tif);

But when I add an annotation line the image is corrupt and cannot be opened anymore.

using var image = new MagickImage(tifPaths[0]);
image.Annotate("example test annotation", Gravity.West);
await image.WriteAsync("image.tif", MagickFormat.Tif);
0 Answers
Related