We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

.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