ImageLoadException

class com.aspose.psd.coreexceptions.ImageLoadException: Image loading failed. ---> class com.aspose.psd.internal.Exceptions.ArgumentException: Appropreate layer section resource can't be created. Type tool key: 1668641652
com.aspose.psd.internal.jx.u.b(Unknown Source)
com.aspose.psd.internal.jx.u.load(Unknown Source)
com.aspose.psd.fileformats.psd.layers.LayerResourcesRegistry.b(Unknown Source)
com.aspose.psd.fileformats.psd.layers.LayerResourcesRegistry.loadResourceByFirstSupportedDescriptor(Unknown Source)
com.aspose.psd.internal.jS.j.b(Unknown Source)
com.aspose.psd.internal.jS.j.a(Unknown Source)
com.aspose.psd.internal.jS.j.a(Unknown Source)
com.aspose.psd.internal.jS.j.a(Unknown Source)
com.aspose.psd.internal.jS.j.a(Unknown Source)
com.aspose.psd.internal.jO.a.load(Unknown Source)
com.aspose.psd.Image.a(Unknown Source)
com.aspose.psd.Image.b(Unknown Source)
com.aspose.psd.Image.load(Unknown Source)

version: aspose-psd-26.1-jdk16.jar ,loadPSD file error

@Luo.Lingfeng

您在使用 Aspose.PSD Java 25.11(JDK 16)加载 PSD 时遇到了 ImageLoadException,内部抛出了 ArgumentException:Appropreate layer section resource can't be created. Type tool key: 1668641652,如您提供的堆栈信息所示【1】。

为进一步定位问题,建议您:

  1. 提供最小复现代码:例如仅使用 Image.load("path/to/file.psd") 的调用方式。
  2. 上传出现异常的 PSD 文件(或脱敏后副本),以便我们检查文件中是否包含特殊图层或损坏的部分。
  3. 确认文件完整性:在 Photoshop 中打开并重新保存一次,确保文件未被截断或损坏。

请在本帖中补充上述信息,我们将在此线程继续为您分析并提供帮助。

test-2026-02-05.zip (6.0 MB)

        PsdLoadOptions loadOptions = new PsdLoadOptions();
        loadOptions.setUseDiskForLoadEffectsResource(true); 
        loadOptions.setAllowWarpRepaint(true); 
        loadOptions.setUseIccProfileConversion(false); 

        Image image;
        try {
            log.info("psdImage.load bytesPsd:{}", bytesPsd.length);
            image = PsdImage.load(new ByteArrayInputStream(bytesPsd), loadOptions);
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("psdImage.loaderror", e);
        }

The ZIP includes anomalous PSD files and the code that loads files from downloaded byte streams.

@Luo.Lingfeng

您在使用 Aspose.PSD Java 加载 PSD 时遇到了 ImageLoadException,内部抛出了 ArgumentException:Appropreate layer section resource can't be created. Type tool key: 1668641652,并使用了 Aspose‑PSD 25.11‑jdk16.jar(JDK 16)【1】。

为进一步排查,请您:

  1. 确认该 PSD 文件在 Photoshop 中能够正常打开并重新保存一次,以排除文件本身损坏的可能。
  2. 尝试仅使用最简调用 PsdImage.load(new ByteArrayInputStream(bytesPsd))(不设置任何 PsdLoadOptions),观察是否仍会抛出相同异常。
  3. 如仍有异常,请提供完整的堆栈信息以及您使用的 JDK 版本号。

我们将在本帖继续跟进,帮助您定位并解决该问题。

@Luo.Lingfeng
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PSDNET-2686

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.