Exception while creating "Aspose.PSD.FileFormats.Jpeg.JpegImage" class instance


#1

Hi,

I am getting the exception in below code - “Image loading failed.” -> “Cannot open an image. The image file format may be not supported at the moment.”

using (Aspose.PSD.FileFormats.Jpeg.JpegImage drawImage = new Aspose.PSD.FileFormats.Jpeg.JpegImage(@“c:\shutterstock_269101838.jpg”))
{
psdImage.Layers.FirstOrDefault(l => l.Name.StartsWith(“Image”)).DrawImage(new Aspose.PSD.Point(10, 10), drawImage);
}

please help.


#2

@se.nitinjain,

Can you please share source file so that we may further investigate to help you out.


#3

Just create a instance of JpegImage class and pass any jpg file in constructor, it throws the exception


#4

@se.nitinjain,

Can you please share file on which you are facing issue so that we may add in our issue tracking system.