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 .( , IList
1 , )
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 .( , IList
1 , )
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 .( , IList
1 , )
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)