Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSD: Get layer kind (type) to metadata #893

Open
zzq0324 opened this issue Jan 19, 2024 · 1 comment
Open

PSD: Get layer kind (type) to metadata #893

zzq0324 opened this issue Jan 19, 2024 · 1 comment

Comments

@zzq0324
Copy link

zzq0324 commented Jan 19, 2024

Is your feature request related to a use case or a problem you are working on? Please describe.
I want to get layer kind. Now I use this code to get header and layer info:

IIOMetadata metadata = imageReader.getImageMetadata(0);
IIOMetadataNode root = (IIOMetadataNode) metadata.getAsTree("com_twelvemonkeys_imageio_psd_image_1.0");
NodeList header = root.getElementsByTagName("Header");
NodeList layers = root.getElementsByTagName("Layers");

But I can't find how to get kind of layer, if it is image or text.

Describe the solution you'd like
In layerInfo, can add kind field indicate whether it is a image or text.

Additional context
In python librady psd-tools, it support.
image

Thank you very much to share this good project.

@zzq0324 zzq0324 changed the title Is there a way easily get layer kind? Is there a way to easily get layer kind? Jan 19, 2024
@haraldk
Copy link
Owner

haraldk commented Jan 23, 2024

Hi @zzq0324 ,

I will accept a PR for this feature, if you want to do it!

Otherwise, it will help if you can figure out how to obtain the layer type, preferably with a reference to the applicable field(s) in the PSD layer format. It can probably be worked out, but it's not entirely clear to me where to get this information.

@haraldk haraldk changed the title Is there a way to easily get layer kind? PSD: Get layer kind (type) to metadata Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants