This project has moved. For the latest updates, please go here.

Possible to have ImageMagick load hidden layers from PSD?

Oct 20, 2016 at 6:48 PM
Edited Oct 20, 2016 at 6:48 PM
It's working very well. There will be a new pair of socks on it's way to you =D However I can't get it to loads the hidden players from a PSD:
                    // Load in the source PSDs
                    MagickImageCollection sourcePSD = null;

                    try
                    {
                        sourcePSD = new MagickImageCollection(PSDToConvert.Filename)
                    }
                    catch
                    {
                        backgroundWorkerProcessFiles.ReportProgress(0, "Failed to load " + PSDToConvert.Filename);
                    }

                    // Go through and resize / export each image in the PSD
                    if (sourcePSD != null)
                    {
                        foreach (MagickImage sourceLayer in sourcePSD)
                        {
This will give me all of the layers, and their names, allowing me ot process them. However if they are not visible then they don't appear. Is there a way of getting it to give me the hidden layers too?
Coordinator
Oct 20, 2016 at 7:17 PM
What do you mean by not load? I suspect that you get a black or white image when you write it to a file. Hidden layers should appear in the MagickImageCollection but they will have their Compose property set to NoCompose. Setting this to CompositeOperator.Undefined should resolve your issue. If your layers are not there can you please share an example image so I can try to reproduce your issue?