antond
-
Posts
2 -
Joined
-
Last visited
Posts posted by antond
-
-
I want ot submit a patch.
To get rid of annoying window, appearing each time you change some settings, or saving file,
change lines 92—95 of OptiPngFileType.cs
from
StartInfo = { Arguments = "\"" + tempFile + "\"" + " -o" + token.Compression + " -i" + (token.Interlace ? "1" : "0"), WindowStyle = ProcessWindowStyle.Minimized }
to
StartInfo = { UseShellExecute = false, CreateNoWindow = true, Arguments = "\"" + tempFile + "\"" + " -o" + token.Compression + " -i" + (token.Interlace ? "1" : "0") }
OptiPNG file type plugin (November 30, 2008)
in FileType Plugins
Posted
P.S.:
the best way to find a path to the “optipng.exe” executable is to find a path to currentAssembly.
Besause on my work machine I have no access to HKLM registry, so no path is stored there, and sometimes current directory is changed.
Also, I recomment to use string.Format method to create an argument string.
To sum up, lines 90-107 of OptiPngFileType.cs should be changed from
to
btw, reference to Microsoft.Win32 can be thrown away now.