Replies: 1 comment 1 reply
-
It looks like you are calling |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use Magick.NET to resize a PSD with layers but getting some strange results. Calling Resize on the file itself seems to flatten as well, and I need to keep the separate layers. My current code is reading the file into a collection of layers, then calling Resize on each layer in the collection, and then writing the collection to a new file. This works as far as the resize goes, but one of the layers is a logo on a transparent background and the resize results in a solid image with nothing on it (it might just be making it the same color as the logo which was only white). I then tried resample, which preserved the layers the way I need, but I'm not actually trying to change the resolution. Here's the current code:
using (MagickImageCollection psdLayers = new MagickImageCollection(inputPath)) { for (int i = 0; i < psdLayers.Count; i++) { psdLayers[i].Resample(width, height); Console.WriteLine("resized layer " + i.ToString()); } psdLayers.Write(outputPath); }
Any suggestions on how to do this so that I can just resize but keep the layers as they were?
Beta Was this translation helpful? Give feedback.
All reactions