Ejemplo n.º 1
0
        public PngQuant(PngQuantOptions options = null) : base(new string[] { "image/png" })
        {
            options = options ?? new PngQuantOptions();
            if (!options.IsValid())
            {
                throw new ArgumentException("Options are not valid!");
            }
            ProcessStartInfo info = new ProcessStartInfo()
            {
                CreateNoWindow         = true,
                FileName               = "pngquant",
                Arguments              = options.AsArgument(),
                RedirectStandardInput  = true,
                RedirectStandardOutput = true
            };

            _info = info;
        }
 public PngQuantTransformer(PngQuantOptions options = null)
 {
     _pngquant = new PngQuant(options);
 }