Is there any multi-layer format I can export to properly?

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
mukiex
Posts: 1
Joined: 2019-05-31T10:32:36-07:00
Authentication code: 1152

Is there any multi-layer format I can export to properly?

Post by mukiex »

What I'm trying to do:

1. Take an image
2. Add a transparent layer
3. Give each one a layer name
4. Export to a multi-layer format

As far as I know, steps 3-4 are basically impossible in ImageMagick. You can try to export to PSD, but it's a mess that requires layer copying, explicit compression setting, and the results aren't particularly compatible across open source applications.

The other option is to export to TIFF. This is typically less of a pain, causes fewer issues, but labeling layers is a complete no-go. It seems less like a "layer output" and more like a "disparate images stacked together output".

As far as I have been able to search, ORA (OpenRaster) is not supported at all, and neither are the XCF/Krita extensions.

So just to make sure I'm not missing an obvious option, I just wanted to ask if steps 1-4 were available under any output options for Image Magick. Magick tends to be the "solution" mentioned whenever I search methods for outputting multi-layer images, and while I love using it for a lot of conversion processes, this does not seem to be a use case that it actually works for at the moment.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Is there any multi-layer format I can export to properly?

Post by snibgo »

How about "-label"? For example:

Code: Select all

magick -label lab1 logo: -label lab2 rose: x.tiff
Gimp sees two images in x.tiff, named "lab1" and "lab2".
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is there any multi-layer format I can export to properly?

Post by fmw42 »

Note that ImageMagick stores the images as pages not layers in a TIFF file. However, the file does contain the two images in snibgo's command
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is there any multi-layer format I can export to properly?

Post by fmw42 »

Openraster seems like an interesting and useful format from https://en.wikipedia.org/wiki/OpenRaster
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is there any multi-layer format I can export to properly?

Post by fmw42 »

Out of curiosity, what would you do with it, if you could do the proper export? It does not look like it can be imported into Photoshop or am I wrong?
Post Reply