.NET: Certain PSD files cannot be loaded or saved, several different errors occur

We are attempting to use the Aspose.PSD .NET library to load/save PSD and PSB files in order to set XMP metadata. This generally works as expected for most files. We’ve encountered a few files that cannot be loaded or saved without the library throwing an exceptions. So far we’ve encountered four different errors across six PSD files.

Three of the four error messages indicate Aspose.PSD doesn’t support PSD files with certain colour mode / compression configurations.

First question: Does the Aspose.PSD .NET library lack support for these PSD property configurations due to these configurations not being valid by PSD specification? Or are there other reasons for these configurations not being supported? Or are these simply bugs?

Second question: If these files are simply not supported by the Aspose.PSD .NET library (either due to not being valid by PSD specification or for another reason), are there other instances of PSD files with certain property configurations (color mode, compression, …) which are unsupported by the Aspose.PSD .NET library? If so, can information be provided about which property configurations?

The PSD files have been zipped and can be downloaded here: PSD.zip
Here are the error messages/stack traces for each file:

Error 1 (Lab16.psd and Lab162.psd):

Aspose.PSD.CoreExceptions.ImageFormats.PsdImageException: The current color converter doesn’t implement IColorToRawChannelConverter interface.
at . (Rectangle )
at .( , IList1 , ) at .(Rectangle , , Int32 , Int32 , ) at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader ) at . (Rectangle ) at .( , IList1 , )
at .(Rectangle , , Int32 , Int32 , )
at . (Rectangle , IPartialArgb32PixelLoader )
at AsposePSD.RasterImage…(Rectangle , IPartialArgb32PixelLoader )
at Aspose.PSD.RasterImage.LoadPartialArgb32Pixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)
at Aspose.PSD.FileFormats.Psd.PsdImage.SaveData(Stream stream)
at Aspose.PSD.DataStreamSupporter.Save(Stream stream)
at Aspose.PSD.DataStreamSupporter.Save(String filePath)

Error 2 (Multichannel.psd and Duotone.psd):

Aspose.PSD.CoreExceptions.ImageLoadException: Image loading failed.
—> Aspose.PSD.CoreExceptions.ImageFormats.PsdImageException: The specified combination of color mode and compression method are not supported.
at .(Object )
at .()
at . (Boolean )
at .(Object )
at .()
at .(Object , UInt32 )
at . (Boolean )
at .(Object[] , Type[] , Type[] , Object[] )
at .( )
at .( , StreamContainer , Int64 , , IColorPalette , StreamSource , StreamSource , LoadOptions )
at AsposePSD.FileFormats.Psd.PsdImage…( , , , , , Int32 , LoadOptions , Boolean )
at .Load(StreamContainer , LoadOptions )
at AsposePSD.Image…(StreamContainer , LoadOptions )
— End of inner exception stack trace —
at AsposePSD.Image…(StreamContainer , LoadOptions )

Error 3 (02_alpha-channels.psd):

Aspose.PSD.CoreExceptions.ImageFormats.PsdImageException: Rgb and Lab modes can not contain less than 3 channels and more than 4 channels
at …()
at …()
at …Process(Rectangle , Int32[] , Point , Point )
at … (Rectangle )
at .( , IList1 , ) at .(Rectangle , , Int32 , Int32 , ) at .(Rectangle , , ) at .(Object ) at .(MethodBase , Boolean ) at .() at . (Boolean ) at .(Object ) at .() at .(Object , UInt32 ) at . (Boolean ) at .(Object[] , Type[] , Type[] , Object[] ) at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader ) at . (Rectangle ) at .( , IList1 , )
at .(Rectangle , , Int32 , Int32 , )
at . (Rectangle , IPartialArgb32PixelLoader )
at .(Int32 , IColorPalette , , Int32 )
at .(StreamContainer , Int32 , IColorPalette , , Int32 )
at Aspose.PSD.FileFormats.Psd.PsdImage.SaveData(Stream stream)
at Aspose.PSD.DataStreamSupporter.Save(Stream stream)
at Aspose.PSD.DataStreamSupporter.Save(String filePath)

Error 4 (10_TV_za_022_single_RCKrt.psd):

Aspose.PSD.CoreExceptions.ImageFormats.PsdImageException: Cmyk and multichannel modes can not contain less than 4 channels and more than 5 channels
at …()
at …()
at …Process(Rectangle , Int32[] , Point , Point )
at … (Rectangle )
at .( , IList1 , ) at .(Rectangle , , Int32 , Int32 , ) at .(Rectangle , , ) at .(Object ) at .(MethodBase , Boolean ) at .() at . (Boolean ) at .(Object ) at .() at .(Object , UInt32 ) at . (Boolean ) at .(Object[] , Type[] , Type[] , Object[] ) at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader ) at . (Rectangle ) at .( , IList1 , )
at .(Rectangle , , Int32 , Int32 , )
at . (Rectangle , IPartialArgb32PixelLoader )
at .(Int32 , IColorPalette , , Int32 )
at .(StreamContainer , Int32 , IColorPalette , , Int32 )
at Aspose.PSD.FileFormats.Psd.PsdImage.SaveData(Stream stream)
at Aspose.PSD.DataStreamSupporter.Save(Stream stream)
at Aspose.PSD.DataStreamSupporter.Save(String filePath)

@amytant

  1. Error 1. Aspose.PSD doesn’t support Lab / 16 bit (Color Mode / Bit Depth) Combination. It will be added, but the priority is lower than medium. After your reporting, we will increase this priority. You can track this issue by the following id: PSDNET-291 Add support of 16 bit Lab mode PSD
  2. Error 2. Aspose.PSD doesn’t support these two modes: Multichannel and Duotone. You can track this issue by id: PSDNET-289
  3. Error 3 looks like a bug. Was created the following issue - PSDNET-1124: Exception on loading of specific PSD file with alpha-channels
  4. Error 4 looks like a bug too. Can be tracked by this ID: PSDNET-1125: Exception on loading of specific PSD file with CMYK color mode.
1 Like

The issues you have found earlier (filed as PSDNET-1125) have been fixed in this update. This message was posted using Bugs notification tool by Yaroslav.Lisovskyi

I see PSDNET-1125 has been closed is in the release notes for Aspose.PSD for .NET 22.6.

But PSDNET-1124 has also been closed and is not in the release notes.
What is the status for PSDNET-1124 ?

@amytant PSDNET-1124 and PSDNET-1125 were the same issues. So, all of them are fixed.

@DmitriySorokin Could you provide an update about the status of PSDNET-289 and PSDNET-291?

We have been waiting for resolution on these issues since March 2022 and they are still showing “New” status.

When can we expect these issues to be fixed?

@amytant these issues are planned for the beginning of 2023 only, because of the small number of requests

@Dmitriy.Sorokin I see PSDNET-291 and PSDNET-289 are still on New status, can we expect these issues to be resolved in the foreseeable future?

We have been waiting on these fixes for 1.5 year already. This is a serious issue for us that limits our ability to use Aspose.PSD for processing many PSD files.

@amytant 8 bit Duotone and 16 bit Lab are rare used formats. Support of them are added to our backlog, but there are tasks with a higher priority.

Could you please describe use cases for what do you want to use these color modes? Maybe we miss something, and with the better description this task will be prioritized.

And could please additionaly update status of your license if it was changed. For the rare cases is better to use paid plans with the priority support Pricing - Purchase - aspose.com