[SOLVED] XCF: Layer name is not read

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

[SOLVED] XCF: Layer name is not read

Post 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.
Last edited by olear on 2016-01-27T06:31:44-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: XCF: Layer name is not read

Post 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
snibgo's IM pages: im.snibgo.com
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: XCF: Layer name is not read

Post by olear »

Thanks for the link, but I use IM as an image loader in a larger application (C++).
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: XCF: Layer name is not read

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: XCF: Layer name is not read

Post 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).
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: XCF: Layer name is not read

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: XCF: Layer name is not read

Post by dlemstra »

Could you share your xcf image? It would help me fixing this.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: XCF: Layer name is not read

Post by olear »

User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: XCF: Layer name is not read

Post by dlemstra »

I refactored our code a bit. Could you give it another try?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: XCF: Layer name is not read

Post by olear »

Sorry for late reply, works great :)

All layers now have a label.

Thanks.
Post Reply