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

Free Support Forum - aspose.com

Image saving failed

5.zip (4.0 MB)

       var loadOptions = new PsdLoadOptions()
        {
            LoadEffectsResource = true,
            UseDiskForLoadEffectsResource = true
        };
        var psdImage = (PsdImage)Aspose.PSD.Image.Load(@"D:\360MoveData\Users\Administrator\Desktop\5.psd", loadOptions);
        var txtlayer = psdImage.Layers.Where(s => s.Name == "1").FirstOrDefault() as TextLayer;
        txtlayer.UpdateText("测试测试");
        psdImage.Save(@"D:\360MoveData\Users\Administrator\Desktop\5_1.psd", new PsdOptions() { CompressionMethod = CompressionMethod.ZipWithPrediction, ColorMode = ColorModes.Rgb });

Image saving failed.Aspose.PSD.CoreExceptions.ImageSaveException: Image saving failed. —> Aspose.PSD.CoreExceptions.ImageSaveException: Image export failed. —> System.IndexOutOfRangeException: 索引超出了数组界限。
在 .(Int32[] , Rectangle , Int32[] , Rectangle , BlendMode , Byte )
在 ..(Rectangle , Int32[] , Point , Point )
在 ..Process(Rectangle , Int32[] , Point , Point )
在 .(Rectangle )
在 .Process(Rectangle , Int32[] , Point , Point )
在 .Process(Rectangle , Int32[] , Point , Point )
在 .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader )
在 . (Rectangle )
在 .( , IList1 , ) 在 .(Rectangle , , , Int32 , Int32 , ) 在 .(Rectangle , RasterImage , Point , Point ) 在 . (Rectangle , RasterImage , Point , Point ) 在 ..(Int32 , , RasterImage , Rectangle , Point , Point ) 在 ..Process(Rectangle , Int32[] , Point , Point ) 在 .. (Rectangle ) 在 .( , IList1 , )
在 .(Rectangle , , , Int32 , Int32 , )
在 ..LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader )
在 . (Rectangle )
在 .( , IList`1 , )
在 .(Rectangle , , , Int32 , Int32 , )
在 . (Rectangle , IPartialArgb32PixelLoader )
在 Aspose.PSD.RasterImage.(Rectangle , IPartialArgb32PixelLoader )
在 Aspose.PSD.RasterImage.LoadPartialArgb32Pixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)
在 . (Image , Stream , ImageOptionsBase , Rectangle )
在 .Export(Image , Stream , ImageOptionsBase , Rectangle )
在 Aspose.PSD.Image.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
— 内部异常堆栈跟踪的结尾 —
在 Aspose.PSD.Image.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
在 Aspose.PSD.RasterImage.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
在 Aspose.PSD.Image.Save(String filePath, ImageOptionsBase options, Rectangle boundsRectangle)
— 内部异常堆栈跟踪的结尾 —
在 Aspose.PSD.Image.Save(String filePath, ImageOptionsBase options, Rectangle boundsRectangle)
在 Aspose.PSD.Image.Save(String filePath, ImageOptionsBase options)

@jack825 I created an issue. You can track it by id: PSDNET-1244 “Image export failed (IndexOutOfRangeException) on the saving of PSD file with Chinese symbols”

“You can track it by id: psdnet-1244” where to view it

I attached the id of this issue to this post. When it will be resolved, you’ll get the notification. Also, you can find this Id in the one of the future release notes https://docs.aspose.com/psd/net/release-notes-2022/

How long will it take to solve it

It’s planned to be resolved in Aspose.PSD 22.9 - 22.10