Image.load () method can’t load “JPG”, “PNG” file format
Caused by: class com.aspose.psd.coreexceptions.ImageLoadException: Cannot open an image. The image file format may be not supported at the moment or cannot be opened in such way.
Image.load () method can’t load “JPG”, “PNG” file format
Caused by: class com.aspose.psd.coreexceptions.ImageLoadException: Cannot open an image. The image file format may be not supported at the moment or cannot be opened in such way.
Can you please share the details of what you are trying to do along with a working sample code reproducing it.
This is the line of code. I want to load an image file, but it reports an error. Is it currently not supported to load image files using Image.load()?
Image load = Image.load(dataDir + “/img/2.png”);
Exception in thread “main” class com.aspose.psd.coreexceptions.ImageLoadException: Image loading failed. —> class com.aspose.psd.coreexceptions.ImageLoadException: Cannot open an image. The image file format may be not supported at the moment or cannot be opened in such way. If you try to add Layer, please Open File as a Stream and use AddLayer method instead. Check the documentation Add Layer to PSD|Documentation
Aspose.PSD supports loading PSD files. In order to work with image formats like PNG, JPEG etc, please use Aspose.Imaging API on your end.
What should I do if I draw a picture in a layer?