Skip to content

Handling PSD Files with Layer Information Signature Errors in Java #4

@simida0755

Description

@simida0755

I encountered an exception error while opening a PSD file: java.io.IOException: layer information signature error. The PSD file can be opened normally in Photoshop, and if I save it again with Photoshop, the error does not occur. I noticed that this exception is thrown in the parseAdditionalSections method, specifically in this part of the code:

java
if (!tag.equals("8BIM")) {
throw new IOException("layer information signature error");
}
I would like to know how I can avoid this error and properly handle such PSD files.

我在打开psd文件的时候遇到了
java.io.IOException: layer information signature error
的异常报错,而这个psd文件是可以被photoshop正常打开的,如果用photoshop重新保存,则不会出现这个报错
我看到是parseAdditionalSections方法中的
if (!tag.equals("8BIM")) {
throw new IOException("layer information signature error");
}
这部分代码抛出的异常
我想问,我要怎么避免这个报错正常的处理这样的psd文件

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions