I am facing an issue with wmf vector image files embedded in Excel files.
I am trying to crop such a wmf embedded vector file however the cropping does not work, but throws the following exception
Unhandled exception. System.ArgumentOutOfRangeException: The rectangle must entirely contained within the image bounds. (Parameter 'rectangle') at Aspose.Imaging.FileFormats.Wmf.WmfImage.Crop(Rectangle rectangle) at Aspose.Imaging.FileFormats.Emf.MetaImage.Crop(Int32 leftShift, Int32 rightShift, Int32 topShift, Int32 bottomShift)
I’ve tried it on windows platform with Aspose.Imaging 21.11 and Aspose.Cells 21.11
I have implemented an example solution to demonstrate this.
Please find it attached.
WmfCropppingInExcelException.zip (347.4 KB)