Hi,
I’m running into some troubles manipulating/saving a specific PSD file using Aspose.Psd for .NET.
The file works correctly in Photoshop, but it cannot be handled by Aspose.Psd.
After some tests I was able to identify a single layer that, if removed, allows Aspose.Psd to manipulate the file.
Here’s a code sample that triggers the error (which is very basic):
public static void func(string filePath)
{
using (Aspose.PSD.FileFormats.Psd.PsdImage image = (Aspose.PSD.FileFormats.Psd.PsdImage)Aspose.PSD.Image.Load(filePath))
{
image.Save();
}
}
This is the error message:
Index was outside the bounds of the array.
And the StackTrace:
at . (Int32[] , Rectangle , Byte[] , Rectangle , Byte , )
at . (Rectangle , LayerMaskData , Int32[] )
at . (Rectangle , Layer )
at . . (Int32[] , Rectangle , Point , Point , Layer )
at . . (Int32[] , Point , Point )
at . .Process(Rectangle , Int32[] , Point , Point )
at . (Rectangle )
at .Process(Rectangle , Int32[] , Point , Point )
at .Process(Rectangle , Int32[] , Point , Point )
at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader )
at . (Rectangle )
at . ( , IList`1 , )
at . (Rectangle , , , Int32 , Int32 , )
at . (Rectangle , , )
at . (Rectangle , RasterImage , Point , Point )
at . (Rectangle , RasterImage , Point , Point )
at . . (Int32 , , RasterImage , Rectangle , Point , Point )
at . .Process(Rectangle , Int32[] , Point , Point )
at . . (Rectangle )
at . ( , IList`1 , )
at . (Rectangle , , , Int32 , Int32 , )
at . .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader )
at . (Rectangle )
at . ( , IList`1 , )
at . (Rectangle , , , Int32 , Int32 , )
at . (Rectangle , , )
at . (Rectangle , IPartialArgb32PixelLoader )
at Aspose.PSD.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. (Boolean )
at Aspose.PSD.DataStreamSupporter. (Boolean )
at Aspose.PSD.DataStreamSupporter.Save()
at Aspose.PSD.Image.Save()
Is there any support representative to whom I can send the PSD file?
Thanks in advance!