Page 1 of 1

Create a multi-layer tiff

Posted: 2008-12-12T09:25:09-07:00
by draker2k2
Hello I'm new with this tool :P

I have been trying to create a image with multiple layers to open it in photoshop to see the ones i want just hidding or not one of the specific layer. But i cant create a image with multiple layers.

I have many bmp files, so I want for example get the files number 4 , 5 and 6 in the same image but in diferent layers , so when i open this new one I can hide the layer of the image 4 and 5 and just see the 6th one, or any other combination.

The most i have got have been create a image with multiple alpha channels but i need it to be layers.

I have used the "convert" order and "composite" one too.

I hope u can help me :P

Thx!!

Re: Create a multi-layer tiff

Posted: 2008-12-12T11:55:05-07:00
by fmw42
draker2k2 wrote:Hello I'm new with this tool :P

I have been trying to create a image with multiple layers to open it in photoshop to see the ones i want just hidding or not one of the specific layer. But i cant create a image with multiple layers.

I have many bmp files, so I want for example get the files number 4 , 5 and 6 in the same image but in diferent layers , so when i open this new one I can hide the layer of the image 4 and 5 and just see the 6th one, or any other combination.

The most i have got have been create a image with multiple alpha channels but i need it to be layers.

I have used the "convert" order and "composite" one too.

I hope u can help me :P

Thx!!
I am not an expert on this topic and will defer to others, but I really don't think IM supports layers in the Photoshop sense, except to extract layers from a PSD file.

Can you provide a muli-layer TIFF that opens the way you want in Photoshop.

In IM you can create multi-frame Tiff files, but I really don't know about multi-layers as Photoshop handles them.

Anyone else know for sure and can correct me?

Re: Create a multi-layer tiff

Posted: 2008-12-15T00:54:00-07:00
by draker2k2
The multi-layer imagen is not needed to be exactly a TIFF can be a PSD of course.

I though I could use the -page or -layer commands but no one of these works for me or at least I dont know how to make them work as I want.

If It's possible to make it in PSD would be great too :P

Just need a image format that I can open in Photoshop.

Thx.

Re: Create a multi-layer tiff

Posted: 2008-12-15T12:18:09-07:00
by fmw42
draker2k2 wrote:The multi-layer imagen is not needed to be exactly a TIFF can be a PSD of course.

I though I could use the -page or -layer commands but no one of these works for me or at least I dont know how to make them work as I want.

If It's possible to make it in PSD would be great too :P

Just need a image format that I can open in Photoshop.

Thx.
Again, I will defer to the IM experts, but I don't think IM can create a multi-layer PSD file. It can read the layers in an existing image and convert them to separate images, but I don't think IM can create multi-layer images, even as PSD, in the Photoshop sense. It can only make multi-frame images, which I don't believe are the same as Photoshop layers.

Re: Create a multi-layer tiff

Posted: 2008-12-15T12:37:06-07:00
by magick
Imagemagikc supports PSD layers when writing, one for each frame in an image sequence. Unfortunately you have little control over the PSD image creation and the resulting image may not be what you want.

Re: Create a multi-layer tiff

Posted: 2012-04-09T06:37:48-07:00
by Feniksss
magick wrote:Imagemagikc supports PSD layers when writing, one for each frame in an image sequence. Unfortunately you have little control over the PSD image creation and the resulting image may not be what you want.

How create PSD with layers???

Re: Create a multi-layer tiff

Posted: 2012-04-09T11:18:10-07:00
by rich2005
You do realise that the previous post was from the end of 2008

However, using IM recently to make multi-layer PS psd files brings up another question which hopefully can be answered.

The switch to use is -adjoin and even this is not really needed as it is assumed by IM so:

convert 1.png 2.png 3.png 4.png -colorspace cmyk filename.psd

Makes a 3 layer psd, for some reason the first layer is thrown away, not a problem, an empty or duplicate layer can be used. Is this normal?

That is fine for cmyk colorspace but there is a colorshift from the RGB png files to CMYK. I have tried to get a RGB PS psd with the same method ( using -colorspace sRGB for example) and all I get are grayscale images. Read a little about this for tiff files and maybe a IM bug?

Is this correct and is there a way to get RGB?

using PCLOS2012 and ImageMagick 6.6.3-4 2011-02-13 Q16

Re: Create a multi-layer tiff

Posted: 2012-04-09T12:10:48-07:00
by fmw42
This works fine for me in IM 6.7.6.5 Q16 Mac OSX Snow Leopard.

convert rose: rose: rose: -colorspace sRGB 1rose.psd

It is not grayscale.

Note that in IM 6.7.5.5 the meaning of -colorspace RGB and -colorspace sRGB was reversed to properly convey the correct meaning.

Re: Create a multi-layer tiff

Posted: 2012-04-10T01:23:15-07:00
by rich2005
Thanks for the reply, this is just for info and to set the scene

On the above PCLOS linux, that command using rose: did indeed work although I ended up with just 2 layers.
To expand a bit, using 4 200x200 pix layers exported from Inkscape as png's (with transparency) each image about 20 KB
This converted to sizable 6.6 MB psd file which will not open, there is a 'unexpected end of file' error.

I did manage to get on a windows machine with IM 6.7.5 Q16 and got an even larger file 7.1 MB but it does open in PS as RGB. The first layer is still missing. It resaves to a more reasonable 234 KB.

Where did the greyscale come in, from memory, it was using the command without the -colorspace switch.

Perhaps when PCLOS updates IM that will be a solution.

Re: Create a multi-layer tiff

Posted: 2012-04-10T10:15:34-07:00
by fmw42
if you want the first layer in PSD which is usually the flattened result of all the other images, you need to do that separately and then add that to your the beginning of the list of images to be converted to psd

convert image1 image2 image3 image4 \
\( -clone 0-3 -background somecolor -flatten \) \
-insert 0 result.psd

see
http://www.imagemagick.org/Usage/basics/#insert
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/layers/#flatten

Re: Create a multi-layer tiff

Posted: 2012-04-10T23:54:47-07:00
by Feniksss
I create PSD with 5 images(png)
The first four images - color. Fifth image - black and white.

As a result, from black and white image in the layer appears as a blue.

Colorspace don't help...
What's the problem?

Use MagickWand Interface...

Re: Create a multi-layer tiff

Posted: 2012-04-11T00:05:29-07:00
by anthony
I think we need some examples.

MagickWand and command line are actually closely linked, (even closer in IMv7 :-)

Re: Create a multi-layer tiff

Posted: 2012-04-11T00:05:49-07:00
by Feniksss
Also i have question:

Is it possible to named the layers?

Re: Create a multi-layer tiff

Posted: 2012-04-11T10:10:19-07:00
by fmw42
Feniksss wrote:Also i have question:

Is it possible to named the layers?
Not that I know about, since layers in IM are actually just frames and they are simply numbered. However, you may able to comment the layers before you combine them. see -comment. http://www.imagemagick.org/script/comma ... hp#comment That info can then be retrieved from the images verbose info:

However, I will defer to the IM developers to add or correct me.

Re: Create a multi-layer tiff

Posted: 2012-04-11T20:25:09-07:00
by anthony
Unless we know how layers are named, I can't help you. We have 'comment' 'label' and 'caption' as posible strings that may be used by the layer handling of the non-IM application.