Page 1 of 1

[SOLVED] XCF: Layer name is not read

Posted: 2016-01-25T14:22:17-07:00
by olear
Noticed that layer names from XCF's are not detected by ImageMagick (exporting to a PSD from GIMP produces the label names in ImageMagick). Tested with GIMP 2.4 and 2.8, also tested various ImageMagick versions.

Re: XCF: Layer name is not read

Posted: 2016-01-25T14:56:40-07:00
by snibgo
Last time I tried, I agree, IM couldn't pull label names from Gimp XCF. So I wrote and published a Python script to push them out of Gimp. See my page http://im.snibgo.com/imgimp.htm

Re: XCF: Layer name is not read

Posted: 2016-01-25T15:10:05-07:00
by olear
Thanks for the link, but I use IM as an image loader in a larger application (C++).

Re: XCF: Layer name is not read

Posted: 2016-01-25T15:21:35-07:00
by snibgo
I don't have a solution for that. It would be possible to trawl though Gimp code to find where labels are in the file, and even "borrow" Gimp code to read it. If you do that, this would be info that IM developers could use to incorporate it into IM.

Re: XCF: Layer name is not read

Posted: 2016-01-25T15:23:09-07:00
by dlemstra
I just pushed a patch to our git repository to add support for this. The layer name of an XFC image will be available as a label in the next release of ImageMagick (6.9.3-3).

Re: XCF: Layer name is not read

Posted: 2016-01-26T01:37:09-07:00
by olear
Great.

Works except for the first layer.

My image has three layers:
- Background
- another layer
- new layer

But Background has no layer name in IM.

Re: XCF: Layer name is not read

Posted: 2016-01-26T02:08:35-07:00
by dlemstra
Could you share your xcf image? It would help me fixing this.

Re: XCF: Layer name is not read

Posted: 2016-01-26T02:15:23-07:00
by olear

Re: XCF: Layer name is not read

Posted: 2016-01-26T12:36:02-07:00
by dlemstra
I refactored our code a bit. Could you give it another try?

Re: XCF: Layer name is not read

Posted: 2016-01-27T06:31:17-07:00
by olear
Sorry for late reply, works great :)

All layers now have a label.

Thanks.