text layers in xcf?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rylander
Posts: 9
Joined: 2009-11-30T02:37:18-07:00
Authentication code: 8675309

text layers in xcf?

Post by rylander »

When converting xcf files to png text layers seems to be discarded.
The resulting image contains all image layers but none of the text layers.

Is this true? Do I have to find another solution that ImageMagick to convert my xcf's?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: text layers in xcf?

Post by snibgo »

I've done a quick test, and "convert" does convert a text layer. (IM 6.6.0-8 on Windows 7.) As with the other thread, an update might do the trick.
snibgo's IM pages: im.snibgo.com
n1ght3y3s

Re: text layers in xcf?

Post by n1ght3y3s »

Can you please post the command line arguments you used to get the text layers to work? I just tried the following with 6.6.2-6 and none of them work.

Code: Select all

convert gimpfile.xcf out.pbm
convert gimpfile.xcf -layers merge out.pbm
The GIMP image was created on version 2.6.7 and has three layers: first 2 are images and the top layer is text.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: text layers in xcf?

Post by snibgo »

Windows 7, Gimp 2.6.8, IM 6.6.2-4 (also 6.6.0-8 and 6.6.5-8).

Hmm, something unexpected is happening. I can't get IM to pick up more than the bottom 2 layers from a Gimp XCF file.

I have created gimptext6.xcf with 4 layers, available here: http://snibgo.org/images/gimptext6.xcf

A Gimp screenshot looks like this:

Image

Code: Select all

D:\web\im>identify gimptext6.xcf
gimptext6.xcf[0] XCF 640x400 640x400+0+0 8-bit DirectClass 32.9KB 0.016u 0:00.014
gimptext6.xcf[1] XCF 355x82 355x82+152+83 8-bit DirectClass 0.016u 0:00.031

D:\web\im>convert gimptext6.xcf gt6.png
D:\web\im>convert gimptext6.xcf -layers merge gt6.png
The first convert makes gt6-0.png and gt6-1.png. The second convert makes gt6.png:

Image

I have tried this with various combinations of layers and older versions of IM, and I can always just see the bottom 2 layers.

Can someone reproduce this on other versions of Gimp?
snibgo's IM pages: im.snibgo.com
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: text layers in xcf?

Post by Bonzo »

First test similar to snibgo with my own image:
Image
Files created from firts command:
Image& ( transparent so can not see it )Image
From second test:
Image

Merging the layers before running command:
First test
Image
The second test came up with an error I assume due to no layers in the image.
n1ght3y3s

Re: text layers in xcf?

Post by n1ght3y3s »

Bonzo: Sorry I didn't quite understand your post. It looks like you have it going but I don't quite see how you achieved it. Can you post the commands and switches you used.

Thanks
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: text layers in xcf?

Post by Bonzo »

I cheated rylander and merged my layers before saving my xcf file from Gimp.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: text layers in xcf?

Post by snibgo »

I have raised a bug report: viewtopic.php?f=3&t=16498
snibgo's IM pages: im.snibgo.com
Post Reply