Hi Aspose team,
We’re using Aspose.Imaging.dll v20.3 to manipulate images. However, when we crop an .webp image to 1*1 size, and save it, an exception is thrown with messaging “ConvertRowsToUv assign pixel error!”. JPEG2000 files works no problem.
Our code is simple :
var image = Image.Load(path) as WebPImage; image.Crop(rect); // after crop, we can see image size has changed to 1*1 when debug image.Save(destPath); // exception throws here
Here is the Stack trace
" at \u0003 .\u0002(Int32[] \u0002, Int32 \u0003, Int32 \u0005, Int32 \b, \u0005 \u0006)\r\n at \u0003 .\u0002(Int32[] \u0002, Int32 \u0003, Int32 \u0005, Single \b)\r\n at \u000f .\u0002(Int32[] \u0002, Int32 \u0003, Int32 \u0005, Boolean \b)\r\n at \u0006 .\u0005()\r\n at \u0006 .\u0002()\r\n at Aspose.Imaging.FileFormats.Webp.WebPImage.SaveData(Stream stream)\r\n at Aspose.Imaging.DataStreamSupporter.Save(Stream stream)\r\n at Aspose.Imaging.DataStreamSupporter.Save(String filePath)\r\n at .....(our code)
PS : we also found that image.Rotate() and image.Crop() will throw exceptions when rotate/crop small pixels of image, for example, 1x10, 2x5 …
PS2: image.Load() seem to have the same issue when manipulating low resolution images