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

New Post: How to write Background?

$
0
0
Hello. I'm beginner.
I have a problem.
I want to do this ImageMagick command with Magick.NET.
convert hoge.psd -set dispose Background -coalesce -delete 0 fuga_%04d.png
This command is written here "psdをレイヤー別にpngで保存する方法"
this Japanese mean "way of convert psd file to png".

How to write this command "Background" with Magick.NET?

I wrote this code.
using ImageMagick;

namespace psd
{
    class Program
    {
        static void Main(string[] args)
        {
            ImageMagick.MagickReadSettings settings =
                   new ImageMagick.MagickReadSettings();

            settings.BackgroundColor = new MagickColor(0, 0, 0, 0);

            MagickImageCollection imgs =
                new ImageMagick.MagickImageCollection("psdfile.psd", settings);

            imgs.Coalesce();
            imgs.RemoveAt(0);

            imgs.Write("pngfile%04d.png");

            imgs.Dispose();
        }
    }
}
This code can't make the background completely transparent.
Thanks for reading to the end.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>