Hi,
Getting error while saving image after resizing. It works for jpg images and other png files. Java.
Code
// THUMB_WIDTH = 400 - any value for attached image
com.aspose.imaging.Image image = com.aspose.imaging.Image.load(inputStream);
double k = (double) image.getWidth() / (double) THUMB_WIDTH;
image.resize(THUMB_WIDTH, (int) (image.getHeight() / k));
image.save(outputStream);
image.close();
Exception
com.aspose.imaging.internal.Exceptions.ArgumentNullException: Value cannot be null.
Parameter name: pixels
at com.aspose.imaging.internal.aJ.bR.process(Unknown Source)
at com.aspose.imaging.internal.fr.h.a(Unknown Source)
at com.aspose.imaging.internal.fr.h.b(Unknown Source)
at com.aspose.imaging.internal.fr.h.a(Unknown Source)
at com.aspose.imaging.internal.fr.h$b.loadPartialArgb32Pixels(Unknown Source)
at com.aspose.imaging.internal.aJ.bx.a(Unknown Source)
at com.aspose.imaging.internal.aJ.bA.a(Unknown Source)
at com.aspose.imaging.internal.aJ.bA.a(Unknown Source)
at com.aspose.imaging.internal.aJ.bA.a(Unknown Source)
at com.aspose.imaging.internal.fr.e.loadPartialArgb32Pixels(Unknown Source)```
Png file
[png image](https://drive.google.com/file/d/1WpaHwR_5dmYmMcZGjga4Ldd7fR_iKJQk/view?usp=sharing)