Error on PSD file with many layers

Hi we are experienceing a problem convertin a PSD file: this is very strange because with previous versions of Aspose.Imaging dll we had absolutely no problems with the same file!
Now we are using 3.2.0.0 version of dll
We investigated the problem and it seems to raise when the number of hiddel layers are over a certain number.
Please make some check with the example file we attach, this is the exeption:

Aspose.Imaging.Exceptions.ImageLoadException: Image loading failed. —> System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array’s lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
at Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader.ReadBytes(Byte[] array, Int32 arrayIndex, Int64 position, Int64 count)
at Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader.ReadSShortArray(Int64 position, Int64 count)
at Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader.ReadSShort(Int64 position)
at .(StreamContainer , Int32 , , IColorPalette )
at ​ .Load(StreamContainer , LoadOptions )
at Aspose.Imaging.Image.(StreamContainer , LoadOptions )
— End of inner exception stack trace —
at Aspose.Imaging.Image.(StreamContainer , LoadOptions )
at a2…ctor(a A_0, Stream A_1) — System.NullReferenceException: Object reference not set to an instance of an object.
at a2.b(MemoryStream A_0, String& A_1) Value cannot be null.

same error on 3.3.0.0 version…

Hi Valerio,

Thank you for your inquiry and providing sample file.

To which format you are trying to convert PSD file? Further, please send us the sample code that you used for converting PSD file. We will investigate the issue at our end and will update you about our findings.

Hi, this is the row code where the exeption is thrown:
m_oDocument = Aspose.Imaging.Image.Load(_oInputStream); (with stream)
"Source array was not long enough. Check srcIndex and length, and the array’s lower bounds."

we didn’t change it but the same file with previous version of aspose.imaging worked
moreover if you delete some of layers in pds file it starts to work

Hi Valerio,

Thank you for writing us back.

We have tested the scenario at our end. We are able to notice that the issue persists. The issue has been logged into our issue tracking system with ID IMAGING-35235. Our product team will further look into it. We will update you with the progress via this thread.

The issues you have found earlier (filed as IMAGING-35235) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

it is not fixed!
with our original file it throws the exeption:
{“Source array was not long enough. Check srcIndex and length, and the array’s lower bounds.”}
" at Aspose.Imaging.Image.(StreamContainer , LoadOptions )\r\n at Aspose.Imaging.Image.Load(Stream stream)\r\n at Boole4.BooleConvert…ctor(eFileType _FileType, Stream _oInputStream)

Please do some tests with our original psd file (just tell us when downloaded so we can drop the public link)
Dropbox - Error - Simplify your life

thank you

Hi Valerio,

Thank you for providing sample file.

We have downloaded the sample file. We will forward the sample file to our product team for further investigation. We will update you about the progress via this forum thread.

We are sorry for the inconvenience caused.

hello, any news about it?

Hi Valerio,

This is to update you that the issue has been resolved. The fix to this issue will be available in the next release i.e. Aspose.Imaging for .Net 3.7.0. We will update you via this forum thread once the release is available.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.