Exemplo n.º 1
0
        internal static void Save()
        {
            if (File.Exists("webp.settings"))
            {
                File.Delete("webp.settings");
            }
            JSettings jSettings = new JSettings {
                Lossless    = Lossless,
                RemoveAlpha = RemoveAlpha,
                EmulateJpeg = EmulateJpeg,
                Quality     = Quality,
                DeleteImage = DeleteImage,
                PlaySound   = PlaySound,
                SoundToPlay = SoundToPlay
            };
            string       json   = JsonSerializer.ToString(jSettings);
            StreamWriter writer = new StreamWriter("webp.settings");

            writer.Write(json);
            writer.Close();
        }