Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: problem creating transparent Pngs from PSD

$
0
0
Hi,

I was wondering if you could help with an issue I'm having. I'm trying to extract specific layers from a PSD (which may be a transparent layer) but when I export them to PNG all I get is the alpha reversed and the transparent area is everything except the part I want.

I've tried so many options with setting the alpha per layer, setting the background and alpha colors as transaprent but no matter what I do I can't get the area I want.

Here's the code I've got to basically (debug) loop through everything and pull them out as Pngs. I've boiled it back down to basics just so that I don't give you the wrong impression of where I'm going with it.
MagickReadSettings settings = new MagickReadSettings { Format = MagickFormat.Psd };
                using (MagickImageCollection collection = new MagickImageCollection(filename, settings))
                {
                    
                    for (int i = 0; i < collection.Count; i++)
                    {
                        var c = collection[i];
                        c.Write(@"C:\development\deploys\test_1\assets\img\" + i + ".png");

                    }
                    
                }
I feel like I'm being stupid and missing something obvious but I'm new to ImageMagick so I'm not sure where I'm going wrong.

Here's an example of what the image should be and what I'm getting.

What it should be:
Image

What I'm getting:
Image

Viewing all articles
Browse latest Browse all 3693

Trending Articles