Hidden layers in illustrator/photoshop files

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
PeterM

Hidden layers in illustrator/photoshop files

Post by PeterM »

Hello all,
Anyone here that can answer the following?

Using a illustrator file (.ai) that uses hidden layers, when IM creates a rendition will it flatten the file with the hidden layers or not?
I want IM to create the rendition file (.png) based on which layers being set to visible or not in Illustrator. The result today, but maybe I am doing something wrong(?), is a flatten file showing all layers - hidden and visible.

The same question for Photoshop - .psd files using layers.

I understand that the layers will not be preserved, but I want the flatten rendition file to leave out the hidden layers.
Can this be done in IM?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Hidden layers in illustrator/photoshop files

Post by Bonzo »

Not sure about illustrator but with a psd file you can work with each layer and layer 0 should be the main layer containing all the others:
Try this:

Code: Select all

convert image.psd[0] output.png
PeterM

Re: Hidden layers in illustrator/photoshop files

Post by PeterM »

Hi Bonzo,

Thanks for quick feedback!

Your solution suggest that you very clearly define each layer being used, correct?
So, if you tell IM to only convert layer 0 it will ignore all other layers - did I get it?

This gives, if I´m correct in my assumption, that I need to inform our users that all image info they want to have in the rendered output file (.png), they need to store in layer 0, otherwise it will not work.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Hidden layers in illustrator/photoshop files

Post by Bonzo »

I have not worked with either of your formats but did some tests a couple of years ago and the results are here: http://www.rubblewebs.co.uk/imagemagick/psd.php

From memory the 0 layer is what you see if you saved the image in photoshop as a png and viewed it in a normal image viewer program.
PeterM

Re: Hidden layers in illustrator/photoshop files

Post by PeterM »

Thanks for the link, will give it a try
Post Reply