How to insert PNG/JPG into PSD with Aspose.Psd



I’m trying to load and PNG/JPEG image and insert it on a layer of the PSD. I cannot however load the image. With the Aspose.Image library I can load the file without any problem but with the JpegImage class from the Aspose.Psd namespace I got an exception and the file format is undefined. I’m using the Aspose.PSD version 18.10.0. I am using the example ImportImageToPSDLayer but instead of filling the layer with solid color I want to insert an image.

Kind regards!

2018-10-26 16_03_52-DocxTests (Debugging) - Microsoft Visual Studio (Administrator).png (5.8 KB)



I have observed the image shared by you and request you to please share the sample project along with source files with which you are reproducing the issue. We will investigate the issue further on our end on provision of requested information.



sure I’ve attached the project with my psd and sample jpg file. (512.7 KB)

Thanks in advance!



Thank you for sharing the information with us. I have worked with the sample project shared by you and have been able to observe the issue specified. An issue with ID PSDNET-85 has been created in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.


Great, thanks!