Compare commits

34 Commits
Author SHA1 Message Date
Tichau ff20b26a03 Fix spell issues in change log. 2016-02-18 08:36:50 +01:00
Tichau af4c708652 Change application version to 0.6 2016-02-18 08:19:02 +01:00
Tichau 7539a7e448 New screenshot 2016-02-17 21:14:05 +01:00
Tichau beb64eb1de New screenshots 2016-02-17 21:13:18 +01:00
Tichau 585ea47702 Rename settings entry in context menu 2016-02-17 20:59:51 +01:00
Tichau 9dee8067a0 Update default settings. 2016-02-17 20:48:14 +01:00
Tichau 6728cdd509 Fixed: Magick dll packing in installer. 2016-02-17 20:30:07 +01:00
Tichau 2cf4c690be Update changelog 2016-02-17 19:15:30 +01:00
Tichau 560364d320 Remove pdf from input type list. 2016-02-17 19:12:52 +01:00
Tichau c59ff01a73 New default settings 2016-02-17 19:12:40 +01:00
Tichau 245411bd8b Stylecop 2016-02-17 18:52:16 +01:00
Tichau 73fface5cb Change the possible scale factors.
This encourage the user to use pixel perfect ratio.
2016-02-17 18:48:30 +01:00
Adrien Allard c53a886353 Update the readme file. 2016-02-17 12:36:36 +01:00
Adrien Allard 0abd3da8d6 Update changelog. 2016-02-17 12:28:09 +01:00
Tichau 04adacee45 Add image and video rotation. 2016-02-16 19:28:48 +01:00
Tichau f4f4a4c357 Rebind JPG quality slider. 2016-02-15 19:12:19 +01:00
Tichau 5c9a931558 Add exr input type 2016-02-15 18:41:00 +01:00
Tichau 2161f170fc Add new input type (m4v) 2016-02-15 08:45:54 +01:00
Tichau 7674071fce Stylecop 2016-02-15 08:42:20 +01:00
Tichau 6a1dc7a847 Add Mp4 output type. 2016-02-15 08:38:30 +01:00
Tichau 347d34ff28 Add clamp to power of 2 option (for jpg and png conversion) 2016-02-12 08:29:48 +01:00
Tichau ffc81bc378 Add progress update in ImageMagick conversions. 2016-02-11 18:52:32 +01:00
Tichau 0fd9e3d801 Fixed: Missing default values for png preset. 2016-02-02 18:39:15 +01:00
Tichau 7a4666aa15 Better error handling 2016-02-02 08:51:36 +01:00
Tichau 6594d95120 Add possibility to convert all images to ico (no restriction on size anymore) 2016-02-02 08:51:23 +01:00
Tichau ad051308e1 Add support for input types psd, tga and svg. 2016-02-02 08:50:27 +01:00
Tichau dda464c64e Fixed; Settings version number is now updated. 2016-01-25 08:26:25 +01:00
Tichau 7fc4646c19 Update version number to 0.5.1 2016-01-22 18:32:28 +01:00
Tichau 424abe9aa4 Fixed: issue with installer
Issue where the installer detect the utilisation of the extension dll in
explorer, ask to the user to restart it and fail to do it.
2016-01-22 08:33:24 +01:00
Tichau 21b6187812 Use NuGet pakages. 2016-01-22 08:16:32 +01:00
Tichau b2501a1a04 Fixed issue where aac bitrate was not saved. 2016-01-14 08:15:49 +01:00
Tichau e8a01c91f2 Post installation settings initialization
Fixed: Issue where it is impossible to delete a conversion preset define
in default settings.
Fixed: Issue where the windows context menu does not contains user
preset after an application upgrade.
2016-01-13 20:17:55 +01:00
Tichau efed37b4dc Rename default settings file. 2016-01-13 08:20:27 +01:00
Tichau 1289db0bfa Change version file for auto upgrade 2016-01-12 22:50:14 +01:00
43 changed files with 961 additions and 10543 deletions

No files matched your search

+51 -47
View File
@@ -31,7 +31,7 @@ namespace FileConverter
private static readonly Version Version = new Version()
{
Major = 0,
Minor = 5,
Minor = 6,
Patch = 0,
};
@@ -136,8 +136,10 @@ namespace FileConverter
// Start process.
Debug.Log("Start file converter upgrade from version {0} to {1}.", ApplicationVersion, this.upgradeVersionDescription.LatestVersion);
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(installerPath);
startInfo.UseShellExecute = true;
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(installerPath)
{
UseShellExecute = true,
};
Debug.Log("Start upgrade process: {0}{1}.", System.IO.Path.GetFileName(startInfo.FileName), startInfo.Arguments);
System.Diagnostics.Process process = new System.Diagnostics.Process
@@ -154,50 +156,25 @@ namespace FileConverter
private void Initialize()
{
Diagnostics.Debug.Log("File Converter v" + ApplicationVersion.ToString());
Diagnostics.Debug.Log("The number of processors on this computer is {0}. Set the default number of conversion threads to {0}", Environment.ProcessorCount);
this.numberOfConversionThread = Environment.ProcessorCount;
// Load settigns.
Debug.Log("Load settings...");
this.Settings = Settings.Load();
if (this.Settings == null)
{
Diagnostics.Debug.LogError("The application will now shutdown. If you want to fix the problem yourself please edit or delete the file: C:\\Users\\UserName\\AppData\\Local\\FileConverter\\Settings.user.xml.");
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
return;
}
// Retrieve arguments.
Debug.Log("Retrieve arguments...");
string[] args = Environment.GetCommandLineArgs();
#if (DEBUG)
if (args.Length <= 1)
{
//System.Array.Resize(ref args, 8);
//args[1] = "--conversion-preset";
//args[2] = "To Ogg";
//args[3] = "--verbose";
//args[4] = @"D:\Test\TrailerV2 compressed.mkv";
//args[4] = @"D:\Test\image.png";
//args[4] = @"E:\Track01.cda";
//args[4] = @"D:\Test\Track01.mp3";
//args[5] = @"D:\Test\Track02.mp3";
//args[6] = @"D:\Test\Track03.mp3";
//args[7] = @"D:\Test\Track04.mp3";
System.Array.Resize(ref args, 2);
args[1] = "--settings";
//System.Array.Resize(ref args, 5);
//args[1] = "--conversion-preset";
//args[2] = "To Jpg";
//args[3] = "--verbose";
//args[4] = @"D:\Test\Test avec accents héhé\imagé.png";
////System.Array.Resize(ref args, 5);
////args[1] = "--conversion-preset";
////args[2] = "To Png";
////args[3] = "--verbose";
////args[4] = @"D:\Test\images\Mario Big.png";
}
#endif
// Log arguments.
for (int index = 0; index < args.Length; index++)
{
string argument = args[index];
@@ -215,10 +192,9 @@ namespace FileConverter
return;
}
ConversionPreset conversionPreset = null;
List<string> filePaths = new List<string>();
// Parse arguments.
List<string> filePaths = new List<string>();
string conversionPresetName = null;
for (int index = 1; index < args.Length; index++)
{
string argument = args[index];
@@ -229,6 +205,11 @@ namespace FileConverter
switch (parameterTitle)
{
case "post-install-init":
Settings.PostInstallationInitialization();
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
return;
case "version":
Console.Write(ApplicationVersion.ToString());
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
@@ -252,14 +233,7 @@ namespace FileConverter
return;
}
conversionPreset = this.Settings.GetPresetFromName(args[index + 1]);
if (conversionPreset == null)
{
Debug.LogError("Invalid conversion preset '{0}'. (code 0x02)", args[index + 1]);
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
return;
}
conversionPresetName = args[index + 1];
index++;
continue;
@@ -281,6 +255,17 @@ namespace FileConverter
}
}
// Load settigns.
Debug.Log("Load settings...");
this.Settings = Settings.Load();
if (this.Settings == null)
{
Diagnostics.Debug.LogError("The application will now shutdown. If you want to fix the problem yourself please edit or delete the file: C:\\Users\\UserName\\AppData\\Local\\FileConverter\\Settings.user.xml.");
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
return;
}
// Check upgrade.
if (this.Settings.CheckUpgradeAtStartup)
{
long fileTime = Registry.GetValue<long>(Registry.Keys.LastUpdateCheckDate);
@@ -293,6 +278,18 @@ namespace FileConverter
}
}
ConversionPreset conversionPreset = null;
if (!string.IsNullOrEmpty(conversionPresetName))
{
conversionPreset = this.Settings.GetPresetFromName(conversionPresetName);
if (conversionPreset == null)
{
Debug.LogError("Invalid conversion preset '{0}'. (code 0x02)", conversionPresetName);
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
return;
}
}
if (conversionPreset != null)
{
// Create convertion jobs.
@@ -412,7 +409,14 @@ namespace FileConverter
return;
}
conversionJob.StartConvertion();
try
{
conversionJob.StartConvertion();
}
catch (Exception)
{
throw;
}
if (conversionJob.State == ConversionJob.ConversionState.Done && !System.IO.File.Exists(conversionJob.OutputFilePath))
{
@@ -252,8 +252,15 @@ namespace FileConverter.ConversionJobs
Debug.Log("Convert file {0} to {1}.", this.InputFilePath, this.OutputFilePath);
this.State = ConversionState.InProgress;
this.Convert();
try
{
this.Convert();
}
catch (Exception exception)
{
this.ConversionFailed(exception.Message);
}
if (this.State == ConversionState.Failed)
{
@@ -323,6 +330,8 @@ namespace FileConverter.ConversionJobs
protected void ConversionFailed(string exitingMessage)
{
Debug.Log("Fail: {0}", exitingMessage);
if (this.State == ConversionState.Failed)
{
// Already failed, don't override informations.
@@ -6,20 +6,24 @@ namespace FileConverter.ConversionJobs
{
public static ConversionJob Create(ConversionPreset conversionPreset, string inputFilePath)
{
ConversionJob conversionJob = null;
string extension = System.IO.Path.GetExtension(inputFilePath);
extension = extension.ToLowerInvariant().Substring(1, extension.Length - 1);
if (extension == "cda")
{
conversionJob = new ConversionJob_ExtractCDA(conversionPreset);
}
else
{
conversionJob = new ConversionJob_FFMPEG(conversionPreset);
return new ConversionJob_ExtractCDA(conversionPreset);
}
return conversionJob;
if (conversionPreset.OutputType == OutputType.Ico)
{
return new ConversionJob_Ico(conversionPreset);
}
if (PathHelpers.GetExtensionCategory(extension) == PathHelpers.InputCategoryNames.Image)
{
return new ConversionJob_ImageMagick(conversionPreset);
}
return new ConversionJob_FFMPEG(conversionPreset);
}
}
}
@@ -76,6 +76,76 @@ namespace FileConverter.ConversionJobs
break;
case OutputType.Avi:
{
// https://trac.ffmpeg.org/wiki/Encode/MPEG-4
int videoEncodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.VideoQuality);
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoScale);
string scaleArgs = string.Empty;
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
scaleArgs = string.Format("scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
}
float rotationAngleInDegrees = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoRotation);
string rotationArgs = string.Empty;
if (Math.Abs(rotationAngleInDegrees - 0f) >= 0.05f)
{
// Transpose:
// 0: 90 CounterClockwise and vertical flip
// 1: 90 Clockwise
// 2: 90 CounterClockwise
// 3: 90 Clockwise and vertical flip
if (Math.Abs(rotationAngleInDegrees - 90f) <= 0.05f)
{
rotationArgs = "transpose=2";
}
else if (Math.Abs(rotationAngleInDegrees - 180f) <= 0.05f)
{
rotationArgs = "vflip,hflip";
}
else if (Math.Abs(rotationAngleInDegrees - 270f) <= 0.05f)
{
rotationArgs = "transpose=1";
}
else
{
Diagnostics.Debug.LogError("Unsupported rotation: {0}°", rotationAngleInDegrees);
}
}
// Build vf args (-vf "scale=..., transpose=...")
string transformArgs = string.Empty;
if (!string.IsNullOrEmpty(scaleArgs) || !string.IsNullOrEmpty(rotationArgs))
{
transformArgs = "-vf \"";
if (!string.IsNullOrEmpty(scaleArgs))
{
transformArgs += scaleArgs;
}
if (!string.IsNullOrEmpty(rotationArgs))
{
if (!string.IsNullOrEmpty(scaleArgs))
{
transformArgs += ",";
}
transformArgs += rotationArgs;
}
transformArgs += "\"";
}
// Compute final arguments.
string encoderArgs = string.Format("-c:v mpeg4 -vtag xvid -qscale:v {0} -c:a libmp3lame -qscale:a {1} {2}", this.MPEG4QualityToQualityIndex(videoEncodingQuality), this.MP3VBRBitrateToQualityIndex(audioEncodingBitrate), transformArgs);
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
}
break;
case OutputType.Flac:
{
// http://taer-naguur.blogspot.fr/2013/11/flac-audio-encoding-with-ffmpeg.html
@@ -93,6 +163,24 @@ namespace FileConverter.ConversionJobs
break;
case OutputType.Jpg:
{
int encodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.ImageQuality);
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageScale);
string scaleArgs = string.Empty;
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
scaleArgs = string.Format("-vf scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
}
string encoderArgs = string.Format("-q:v {0} {1}", this.JPGQualityToQualityIndex(encodingQuality), scaleArgs);
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
}
break;
case OutputType.Mp3:
{
string encoderArgs = string.Empty;
@@ -117,26 +205,8 @@ namespace FileConverter.ConversionJobs
break;
case OutputType.Avi:
{
// https://trac.ffmpeg.org/wiki/Encode/MPEG-4
int videoEncodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.VideoQuality);
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoScale);
string scaleArgs = string.Empty;
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
scaleArgs = string.Format("-vf scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
}
string encoderArgs = string.Format("-c:v mpeg4 -vtag xvid -qscale:v {0} -c:a libmp3lame -qscale:a {1} {2}", this.MPEG4QualityToQualityIndex(videoEncodingQuality), this.MP3VBRBitrateToQualityIndex(audioEncodingBitrate), scaleArgs);
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
}
break;
case OutputType.Mkv:
case OutputType.Mp4:
{
// https://trac.ffmpeg.org/wiki/Encode/H.264
// https://trac.ffmpeg.org/wiki/Encode/AAC
@@ -148,10 +218,60 @@ namespace FileConverter.ConversionJobs
string scaleArgs = string.Empty;
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
scaleArgs = string.Format("-vf scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
scaleArgs = string.Format("scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
}
string encoderArgs = string.Format("-c:v libx264 -preset {0} -crf {1} -c:a aac -q:a {2} {3}", this.H264EncodingSpeedToPreset(videoEncodingSpeed), this.H264QualityToCRF(videoEncodingQuality), this.AACBitrateToQualityIndex(audioEncodingBitrate), scaleArgs);
float rotationAngleInDegrees = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoRotation);
string rotationArgs = string.Empty;
if (Math.Abs(rotationAngleInDegrees - 0f) >= 0.05f)
{
// Transpose:
// 0: 90 CounterClockwise and vertical flip
// 1: 90 Clockwise
// 2: 90 CounterClockwise
// 3: 90 Clockwise and vertical flip
if (Math.Abs(rotationAngleInDegrees - 90f) <= 0.05f)
{
rotationArgs = "transpose=2";
}
else if (Math.Abs(rotationAngleInDegrees - 180f) <= 0.05f)
{
rotationArgs = "vflip,hflip";
}
else if (Math.Abs(rotationAngleInDegrees - 270f) <= 0.05f)
{
rotationArgs = "transpose=1";
}
else
{
Diagnostics.Debug.LogError("Unsupported rotation: {0}°", rotationAngleInDegrees);
}
}
// Build vf args (-vf "scale=..., transpose=...")
string transformArgs = string.Empty;
if (!string.IsNullOrEmpty(scaleArgs) || !string.IsNullOrEmpty(rotationArgs))
{
transformArgs = "-vf \"";
if (!string.IsNullOrEmpty(scaleArgs))
{
transformArgs += scaleArgs;
}
if (!string.IsNullOrEmpty(rotationArgs))
{
if (!string.IsNullOrEmpty(scaleArgs))
{
transformArgs += ",";
}
transformArgs += rotationArgs;
}
transformArgs += "\"";
}
string encoderArgs = string.Format("-c:v libx264 -preset {0} -crf {1} -c:a aac -q:a {2} {3}", this.H264EncodingSpeedToPreset(videoEncodingSpeed), this.H264QualityToCRF(videoEncodingQuality), this.AACBitrateToQualityIndex(audioEncodingBitrate), transformArgs);
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
}
@@ -183,24 +303,6 @@ namespace FileConverter.ConversionJobs
break;
case OutputType.Jpg:
{
int encodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.ImageQuality);
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageScale);
string scaleArgs = string.Empty;
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
scaleArgs = string.Format("-vf scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
}
string encoderArgs = string.Format("-q:v {0} {1}", this.JPGQualityToQualityIndex(encodingQuality), scaleArgs);
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
}
break;
case OutputType.Wav:
{
EncodingMode encodingMode = this.ConversionPreset.GetSettingsValue<EncodingMode>(ConversionPreset.ConversionSettingKeys.AudioEncodingMode);
@@ -0,0 +1,76 @@
// <copyright file="ConversionJob_Ico.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
namespace FileConverter.ConversionJobs
{
using System;
using System.IO;
public class ConversionJob_Ico : ConversionJob
{
private string intermediateFilePath;
private ConversionJob pngConversionJob;
private ConversionJob icoConversionJob;
public ConversionJob_Ico(ConversionPreset conversionPreset) : base(conversionPreset)
{
}
protected override void Initialize()
{
base.Initialize();
if (this.ConversionPreset == null)
{
throw new Exception("The conversion preset must be valid.");
}
// Generate intermediate file path.
string fileName = Path.GetFileName(this.OutputFilePath);
string tempPath = Path.GetTempPath();
this.intermediateFilePath = PathHelpers.GenerateUniquePath(tempPath + fileName + ".png");
// Convert input in png file to send it to ffmpeg for the ico conversion.
ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", OutputType.Png, this.ConversionPreset.InputTypes.ToArray());
intermediatePreset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2, "True");
intermediatePreset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize, "256");
this.pngConversionJob = ConversionJobFactory.Create(intermediatePreset, this.InputFilePath);
this.pngConversionJob.PrepareConversion(this.InputFilePath, this.intermediateFilePath);
// Convert png file into ico.
this.icoConversionJob = new ConversionJob_FFMPEG(this.ConversionPreset);
this.icoConversionJob.PrepareConversion(this.intermediateFilePath, this.OutputFilePath);
}
protected override void Convert()
{
if (this.ConversionPreset == null)
{
throw new Exception("The conversion preset must be valid.");
}
Diagnostics.Debug.Log(string.Empty);
Diagnostics.Debug.Log("Convert image to PNG (intermediate format).");
this.pngConversionJob.StartConvertion();
if (this.pngConversionJob.State != ConversionState.Done)
{
this.ConversionFailed(this.pngConversionJob.ErrorMessage);
return;
}
Diagnostics.Debug.Log(string.Empty);
Diagnostics.Debug.Log("Convert png intermediate image to ICO.");
this.icoConversionJob.StartConvertion();
if (this.icoConversionJob.State != ConversionState.Done)
{
this.ConversionFailed(this.icoConversionJob.ErrorMessage);
return;
}
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
File.Delete(this.intermediateFilePath);
}
}
}
@@ -0,0 +1,111 @@
// <copyright file="ConversionJob_ImageMagick.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
namespace FileConverter.ConversionJobs
{
using System;
using FileConverter.Diagnostics;
using ImageMagick;
public class ConversionJob_ImageMagick : ConversionJob
{
public ConversionJob_ImageMagick() : base()
{
}
public ConversionJob_ImageMagick(ConversionPreset conversionPreset) : base(conversionPreset)
{
}
protected override void Initialize()
{
base.Initialize();
if (this.ConversionPreset == null)
{
throw new Exception("The conversion preset must be valid.");
}
}
protected override void Convert()
{
if (this.ConversionPreset == null)
{
throw new Exception("The conversion preset must be valid.");
}
using (MagickImage image = new MagickImage(this.InputFilePath))
{
image.Progress += this.Image_Progress;
Debug.Log("Load image {0} succeed.", this.InputFilePath);
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageScale);
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
Debug.Log("Apply scale factor: {0}%.", scaleFactor * 100);
image.Scale(new Percentage(scaleFactor * 100f));
}
float rotateAngleInDegrees = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageRotation);
if (Math.Abs(rotateAngleInDegrees - 0f) >= 0.05f)
{
Debug.Log("Apply rotation: {0}°.", rotateAngleInDegrees);
image.Rotate(rotateAngleInDegrees);
}
bool clampSizeToPowerOf2 = this.ConversionPreset.GetSettingsValue<bool>(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2);
if (clampSizeToPowerOf2)
{
int referenceSize = System.Math.Min(image.Width, image.Height);
int size = 2;
while (size * 2 < referenceSize)
{
size *= 2;
}
Debug.Log("Clamp size to the nearest power of 2 size (from {0}x{1} to {2}x{2}).", image.Width, image.Height, size);
image.Scale(size, size);
}
int maximumSize = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.ImageMaximumSize);
if (maximumSize > 0)
{
int width = System.Math.Min(image.Width, maximumSize);
int height = System.Math.Min(image.Height, maximumSize);
Debug.Log("Clamp size to maximum size of {2}x{2} (from {0}x{1} to {2}x{3}).", image.Width, image.Height, width, height);
image.Scale(width, height);
}
Debug.Log("Convert image (output: {0}).", this.OutputFilePath);
switch (this.ConversionPreset.OutputType)
{
case OutputType.Png:
image.Quality = 100;
break;
case OutputType.Jpg:
image.Quality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.ImageQuality);
break;
default:
this.ConversionFailed(string.Format("Unsupported output format {0}.", this.ConversionPreset.OutputType));
image.Progress -= this.Image_Progress;
return;
}
image.Write(this.OutputFilePath);
image.Progress -= this.Image_Progress;
}
}
private void Image_Progress(object sender, ProgressEventArgs eventArgs)
{
this.Progress = (float)eventArgs.Progress.ToDouble() / 100f;
}
}
}
@@ -11,6 +11,7 @@ namespace FileConverter
using FileConverter.Annotations;
using FileConverter.Controls;
using FileConverter.Diagnostics;
using FileConverter.ValueConverters;
[XmlRoot]
@@ -355,6 +356,11 @@ namespace FileConverter
{
string settingsValue = this.GetSettingsValue(settingsKey);
if (settingsValue == null)
{
return default(T);
}
Type type = typeof(T);
if (type.IsEnum)
{
@@ -393,10 +399,51 @@ namespace FileConverter
{
switch (this.OutputType)
{
case OutputType.Wav:
case OutputType.Aac:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioEncodingMode:
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
return true;
}
break;
case OutputType.Avi:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
case ConversionPreset.ConversionSettingKeys.VideoQuality:
case ConversionPreset.ConversionSettingKeys.VideoScale:
case ConversionPreset.ConversionSettingKeys.VideoRotation:
return true;
}
break;
case OutputType.Flac:
case OutputType.Ico:
break;
case OutputType.Jpg:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.ImageQuality:
case ConversionPreset.ConversionSettingKeys.ImageScale:
case ConversionPreset.ConversionSettingKeys.ImageRotation:
case ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2:
return true;
}
break;
case OutputType.Mkv:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
case ConversionPreset.ConversionSettingKeys.VideoQuality:
case ConversionPreset.ConversionSettingKeys.VideoScale:
case ConversionPreset.ConversionSettingKeys.VideoRotation:
case ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed:
return true;
}
@@ -412,6 +459,19 @@ namespace FileConverter
break;
case OutputType.Mp4:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
case ConversionPreset.ConversionSettingKeys.VideoQuality:
case ConversionPreset.ConversionSettingKeys.VideoScale:
case ConversionPreset.ConversionSettingKeys.VideoRotation:
case ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed:
return true;
}
break;
case OutputType.Ogg:
switch (settingsKey)
{
@@ -421,47 +481,30 @@ namespace FileConverter
break;
case OutputType.Avi:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
case ConversionPreset.ConversionSettingKeys.VideoQuality:
case ConversionPreset.ConversionSettingKeys.VideoScale:
return true;
}
break;
case OutputType.Mkv:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
case ConversionPreset.ConversionSettingKeys.VideoQuality:
case ConversionPreset.ConversionSettingKeys.VideoScale:
case ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed:
return true;
}
break;
case OutputType.Jpg:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.ImageQuality:
case ConversionPreset.ConversionSettingKeys.ImageScale:
return true;
}
break;
case OutputType.Png:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.ImageScale:
case ConversionPreset.ConversionSettingKeys.ImageRotation:
case ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2:
case ConversionPreset.ConversionSettingKeys.ImageMaximumSize:
return true;
}
break;
case OutputType.Wav:
switch (settingsKey)
{
case ConversionPreset.ConversionSettingKeys.AudioEncodingMode:
return true;
}
break;
default:
Debug.LogError("Relevant settings '{1}' are not define for output type {0}.", this.OutputType, settingsKey);
break;
}
return false;
@@ -481,16 +524,23 @@ namespace FileConverter
case OutputType.Png:
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale, "1");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageRotation, "0");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2, "False");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize, "0");
break;
case OutputType.Jpg:
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality, "25");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality, "90");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale, "1");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageRotation, "0");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2, "False");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize, "0");
break;
case OutputType.Avi:
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "20");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioBitrate, "190");
break;
@@ -498,6 +548,7 @@ namespace FileConverter
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "28");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, "Medium");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioBitrate, "128");
break;
@@ -506,6 +557,14 @@ namespace FileConverter
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioBitrate, "190");
break;
case OutputType.Mp4:
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "28");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, "Medium");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioBitrate, "128");
break;
case OutputType.Ogg:
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioBitrate, "160");
break;
@@ -668,9 +727,13 @@ namespace FileConverter
public const string AudioBitrate = "AudioBitrate";
public const string ImageQuality = "ImageQuality";
public const string ImageScale = "ImageScale";
public const string ImageRotation = "ImageRotation";
public const string ImageClampSizePowerOf2 = "ImageClampSizePowerOf2";
public const string ImageMaximumSize = "ImageMaximumSize";
public const string VideoQuality = "VideoQuality";
public const string VideoEncodingSpeed = "VideoEncodingSpeed";
public const string VideoScale = "VideoScale";
public const string VideoRotation = "VideoRotation";
}
}
}
@@ -1,6 +1,5 @@
// <copyright file="Debug.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
namespace FileConverter.Diagnostics
{
using System;
@@ -46,6 +46,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="Magick.NET-Q16-AnyCPU, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET-Q16-AnyCPU.7.0.0.0101\lib\net40-client\Magick.NET-Q16-AnyCPU.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdown.Xaml">
<HintPath>..\..\Middleware\Markdown.Xaml.dll</HintPath>
</Reference>
@@ -91,6 +95,8 @@
<Compile Include="ConversionJobs\ConversionJobFactory.cs" />
<Compile Include="ConversionJobs\ConversionJob_FFMPEG.Converters.cs" />
<Compile Include="ConversionJobs\ConversionJob_FFMPEG.cs" />
<Compile Include="ConversionJobs\ConversionJob_Ico.cs" />
<Compile Include="ConversionJobs\ConversionJob_ImageMagick.cs" />
<Compile Include="ConversionPreset\ConversionSettingsOverride.cs" />
<Compile Include="ConversionPreset\ConversionSettings.cs" />
<Compile Include="Diagnostics\DiagnosticsData.cs" />
@@ -205,6 +211,7 @@
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -229,7 +236,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy /Y "$(SolutionDir)Middleware\ffmpeg.exe" "$(TargetDir)ffmpeg.exe"
copy /Y "$(ProjectDir)Settings.xml" "$(TargetDir)Settings.xml"</PostBuildEvent>
copy /Y "$(ProjectDir)Settings.default.xml" "$(TargetDir)Settings.default.xml"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
+1
View File
@@ -13,6 +13,7 @@ namespace FileConverter
Jpg,
Mkv,
Mp3,
Mp4,
Ogg,
Png,
Wav,
+7
View File
@@ -92,6 +92,7 @@ namespace FileConverter
case "bik":
case "3gp":
case "flv":
case "m4v":
case "mp4":
case "mov":
case "mkv":
@@ -100,11 +101,16 @@ namespace FileConverter
return InputCategoryNames.Video;
case "bmp":
case "exr":
case "ico":
case "jpg":
case "jpeg":
case "png":
case "psd":
case "tga":
case "tiff":
case "svg":
case "xcf":
return InputCategoryNames.Image;
}
@@ -130,6 +136,7 @@ namespace FileConverter
case OutputType.Avi:
case OutputType.Mkv:
case OutputType.Mp4:
return category == InputCategoryNames.Video;
case OutputType.Ico:
@@ -60,6 +60,24 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to 90° counter clockwise rotation.
/// </summary>
public static string NinetyDegreesRotationTooltip {
get {
return ResourceManager.GetString("NinetyDegreesRotationTooltip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 180° rotation.
/// </summary>
public static string OneEightyDegreesRotationTooltip {
get {
return ResourceManager.GetString("OneEightyDegreesRotationTooltip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to C:\Music\Artist\Album\Song.wav.
/// </summary>
@@ -91,6 +109,15 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to 90° clockwise rotation.
/// </summary>
public static string TwoSeventyDegreesRotationTooltip {
get {
return ResourceManager.GetString("TwoSeventyDegreesRotationTooltip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Define the ratio &apos;file size&apos; versus &apos;video quality&apos;. A lower value will give you a smaller file, a greater value give you a better video quality..
/// </summary>
@@ -108,5 +135,14 @@ namespace FileConverter.Properties {
return ResourceManager.GetString("VideoEncodingSpeedTooltip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No rotation.
/// </summary>
public static string ZeroDegreesRotationTooltip {
get {
return ResourceManager.GetString("ZeroDegreesRotationTooltip", resourceCulture);
}
}
}
}
@@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="NinetyDegreesRotationTooltip" xml:space="preserve">
<value>90° counter clockwise rotation</value>
</data>
<data name="OneEightyDegreesRotationTooltip" xml:space="preserve">
<value>180° rotation</value>
</data>
<data name="OuputFileNameTemplateSample" xml:space="preserve">
<value>C:\Music\Artist\Album\Song.wav</value>
</data>
@@ -136,10 +142,16 @@ Special paths:
(p:v): my videos path
(p:p): my pictures path</value>
</data>
<data name="TwoSeventyDegreesRotationTooltip" xml:space="preserve">
<value>90° clockwise rotation</value>
</data>
<data name="VideoEncodingQualityTooltip" xml:space="preserve">
<value>Define the ratio 'file size' versus 'video quality'. A lower value will give you a smaller file, a greater value give you a better video quality.</value>
</data>
<data name="VideoEncodingSpeedTooltip" xml:space="preserve">
<value>Define the ratio 'file size' versus 'compression duration'. A slow compression will give you a smaller file (for the same video quality) than a faster compression.</value>
</data>
<data name="ZeroDegreesRotationTooltip" xml:space="preserve">
<value>No rotation</value>
</data>
</root>
@@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="NinetyDegreesRotationTooltip" xml:space="preserve">
<value>90° counter clockwise rotation</value>
</data>
<data name="OneEightyDegreesRotationTooltip" xml:space="preserve">
<value>180° rotation</value>
</data>
<data name="OuputFileNameTemplateSample" xml:space="preserve">
<value>C:\Music\Artist\Album\Song.wav</value>
</data>
@@ -136,10 +142,16 @@ Special paths:
(p:v): my videos path
(p:p): my pictures path</value>
</data>
<data name="TwoSeventyDegreesRotationTooltip" xml:space="preserve">
<value>90° clockwise rotation</value>
</data>
<data name="VideoEncodingQualityTooltip" xml:space="preserve">
<value>Define the ratio 'file size' versus 'video quality'. A lower value will give you a smaller file, a greater value give you a better video quality.</value>
</data>
<data name="VideoEncodingSpeedTooltip" xml:space="preserve">
<value>Define the ratio 'file size' versus 'compression duration'. A slow compression will give you a smaller file (for the same video quality) than a faster compression.</value>
</data>
<data name="ZeroDegreesRotationTooltip" xml:space="preserve">
<value>No rotation</value>
</data>
</root>
+1 -1
View File
@@ -197,7 +197,7 @@ namespace FileConverter
public static class Keys
{
public static string LastUpdateCheckDate = "LastUpdateCheckDate";
public static readonly string LastUpdateCheckDate = "LastUpdateCheckDate";
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+64 -5
View File
@@ -93,7 +93,7 @@ namespace FileConverter
}
}
public static Settings Load()
public static void PostInstallationInitialization()
{
Settings defaultSettings = null;
@@ -115,6 +115,7 @@ namespace FileConverter
Diagnostics.Debug.LogError("Default settings not found at path {0}. You should try to reinstall the application.", defaultFilePath);
}
// Load user settings if exists.
Settings userSettings = null;
string userFilePath = Settings.GetUserSettingsFilePath();
if (File.Exists(userFilePath))
@@ -125,7 +126,41 @@ namespace FileConverter
}
catch (Exception)
{
MessageBoxResult messageBoxResult = MessageBox.Show("Can't load file converter user settings. Do you want to fall back to default settings ?", "Error", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
System.IO.File.Delete(userFilePath);
}
if (userSettings != null && userSettings.SerializationVersion != Version)
{
Diagnostics.Debug.Log("File converter settings has been imported from version {0} to version {1}.", userSettings.SerializationVersion, Version);
userSettings.SerializationVersion = Version;
}
}
Settings settings = userSettings != null ? userSettings.Merge(defaultSettings) : defaultSettings;
settings.Save();
}
public static Settings Load()
{
Settings settings = null;
string userFilePath = Settings.GetUserSettingsFilePath();
if (File.Exists(userFilePath))
{
Settings userSettings = null;
try
{
XmlHelpers.LoadFromFile<Settings>("Settings", userFilePath, out userSettings);
settings = userSettings;
}
catch (Exception)
{
MessageBoxResult messageBoxResult =
MessageBox.Show(
"Can't load file converter user settings. Do you want to fall back to default settings ?",
"Error",
MessageBoxButton.YesNo,
MessageBoxImage.Exclamation);
if (messageBoxResult == MessageBoxResult.Yes)
{
System.IO.File.Delete(userFilePath);
@@ -140,10 +175,34 @@ namespace FileConverter
if (userSettings != null && userSettings.SerializationVersion != Version)
{
Diagnostics.Debug.Log("File converter settings has been imported from version {0} to version {1}.", userSettings.SerializationVersion, Version);
userSettings.SerializationVersion = Version;
userSettings.Save();
}
}
else
{
// Load the default settings.
string defaultFilePath = Settings.GetDefaultSettingsFilePath();
if (File.Exists(defaultFilePath))
{
Settings defaultSettings = null;
try
{
XmlHelpers.LoadFromFile<Settings>("Settings", defaultFilePath, out defaultSettings);
settings = defaultSettings;
}
catch (Exception exception)
{
Diagnostics.Debug.LogError("Fail to load file converter default settings. {0}", exception.Message);
}
}
else
{
Diagnostics.Debug.LogError("Default settings not found at path {0}. You should try to reinstall the application.", defaultFilePath);
}
}
return userSettings != null ? userSettings.Merge(defaultSettings) : defaultSettings;
return settings;
}
public ConversionPreset GetPresetFromName(string presetName)
@@ -170,7 +229,7 @@ namespace FileConverter
// Write the settings in registry.
if (Settings.IsInAdmininstratorPrivileges)
{
// We are in admin mode, write reigstry ...
// We are in admin mode, write registry ...
bool succeed = Settings.ApplyRegistryModifications(registryEntries);
if (succeed)
{
@@ -301,7 +360,7 @@ namespace FileConverter
Directory.CreateDirectory(path);
}
path = Path.Combine(path, "Settings.xml");
path = Path.Combine(path, "Settings.default.xml");
return path;
}
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerializationVersion="0">
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerializationVersion="1">
<ExitApplicationWhenConversionsFinished>true</ExitApplicationWhenConversionsFinished>
<DurationBetweenEndOfConversionsAndApplicationExit>3</DurationBetweenEndOfConversionsAndApplicationExit>
<ConversionPreset Name="To Mkv" OutputType="Mkv">
<InputTypes>3gp</InputTypes>
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="VideoQuality" Value="30" />
<Settings Key="VideoEncodingSpeed" Value="Medium" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="0" />
<Settings Key="AudioBitrate" Value="155" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Mkv (low quality)" OutputType="Mkv">
<ConversionPreset Name="To Mp4" OutputType="Mp4">
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
@@ -29,13 +31,72 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="VideoQuality" Value="30" />
<Settings Key="VideoEncodingSpeed" Value="Medium" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="0" />
<Settings Key="AudioBitrate" Value="155" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Mp4 (low quality)" OutputType="Mp4">
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="VideoQuality" Value="20" />
<Settings Key="VideoEncodingSpeed" Value="Medium" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="0" />
<Settings Key="AudioBitrate" Value="96" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Mp4 (rotate left)" OutputType="Mp4">
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="VideoQuality" Value="30" />
<Settings Key="VideoEncodingSpeed" Value="Medium" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="90" />
<Settings Key="AudioBitrate" Value="155" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Mp4 (rotate right)" OutputType="Mp4">
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="VideoQuality" Value="30" />
<Settings Key="VideoEncodingSpeed" Value="Medium" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="270" />
<Settings Key="AudioBitrate" Value="155" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Avi" OutputType="Avi">
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
@@ -46,9 +107,11 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="VideoQuality" Value="27" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="0" />
<Settings Key="AudioBitrate" Value="190" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
@@ -70,6 +133,7 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="AudioBitrate" Value="160" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
@@ -86,6 +150,8 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>wma</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
@@ -107,6 +173,7 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="AudioEncodingMode" Value="Wav16" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
@@ -129,6 +196,7 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
<Settings Key="AudioBitrate" Value="190" />
@@ -152,7 +220,9 @@
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="AudioBitrate" Value="128" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="Extract CDA to Flac" OutputType="Flac">
@@ -175,42 +245,111 @@
</ConversionPreset>
<ConversionPreset Name="To Png" OutputType="Png">
<InputTypes>bmp</InputTypes>
<InputTypes>tiff</InputTypes>
<InputTypes>exr</InputTypes>
<InputTypes>ico</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>psd</InputTypes>
<InputTypes>svg</InputTypes>
<InputTypes>tga</InputTypes>
<InputTypes>tiff</InputTypes>
<InputTypes>xcf</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="ImageScale" Value="1" />
<Settings Key="ImageRotation" Value="0" />
<Settings Key="ImageClampSizePowerOf2" Value="False" />
<Settings Key="ImageMaximumSize" Value="0" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To small Png (25%)" OutputType="Png">
<InputTypes>bmp</InputTypes>
<InputTypes>exr</InputTypes>
<InputTypes>ico</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>psd</InputTypes>
<InputTypes>svg</InputTypes>
<InputTypes>tga</InputTypes>
<InputTypes>tiff</InputTypes>
<InputTypes>xcf</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="ImageScale" Value="0,25" />
<Settings Key="ImageRotation" Value="0" />
<Settings Key="ImageClampSizePowerOf2" Value="False" />
<Settings Key="ImageMaximumSize" Value="0" />
<OutputFileNameTemplate>(p)(f)-small</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Png (rotate left)" OutputType="Png">
<InputTypes>bmp</InputTypes>
<InputTypes>exr</InputTypes>
<InputTypes>ico</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>psd</InputTypes>
<InputTypes>svg</InputTypes>
<InputTypes>tga</InputTypes>
<InputTypes>tiff</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="ImageScale" Value="1" />
<Settings Key="ImageRotation" Value="90" />
<Settings Key="ImageClampSizePowerOf2" Value="False" />
<Settings Key="ImageMaximumSize" Value="0" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Png (rotate right)" OutputType="Png">
<InputTypes>bmp</InputTypes>
<InputTypes>exr</InputTypes>
<InputTypes>ico</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>psd</InputTypes>
<InputTypes>svg</InputTypes>
<InputTypes>tga</InputTypes>
<InputTypes>tiff</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="ImageScale" Value="1" />
<Settings Key="ImageRotation" Value="270" />
<Settings Key="ImageClampSizePowerOf2" Value="False" />
<Settings Key="ImageMaximumSize" Value="0" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Jpg" OutputType="Jpg">
<InputTypes>bmp</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>tiff</InputTypes>
<InputTypes>exr</InputTypes>
<InputTypes>ico</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>psd</InputTypes>
<InputTypes>svg</InputTypes>
<InputTypes>tga</InputTypes>
<InputTypes>tiff</InputTypes>
<InputTypes>xcf</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="ImageQuality" Value="25" />
<Settings Key="ImageQuality" Value="40" />
<Settings Key="ImageScale" Value="1" />
<Settings Key="ImageRotation" Value="0" />
<Settings Key="ImageClampSizePowerOf2" Value="False" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To Ico (max 256x256)" OutputType="Ico">
<ConversionPreset Name="To Ico" OutputType="Ico">
<InputTypes>bmp</InputTypes>
<InputTypes>exr</InputTypes>
<InputTypes>ico</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>psd</InputTypes>
<InputTypes>svg</InputTypes>
<InputTypes>tga</InputTypes>
<InputTypes>tiff</InputTypes>
<InputTypes>xcf</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="To small Png" OutputType="Png">
<InputTypes>bmp</InputTypes>
<InputTypes>jpg</InputTypes>
<InputTypes>jpeg</InputTypes>
<InputTypes>png</InputTypes>
<InputTypes>tiff</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="ImageScale" Value="0,2" />
<OutputFileNameTemplate>(p)(f)-small</OutputFileNameTemplate>
</ConversionPreset>
<CheckUpgradeAtStartup>true</CheckUpgradeAtStartup>
</Settings>
@@ -31,6 +31,12 @@ namespace FileConverter.Windows
set;
}
public DataTemplate Mp4SettingsDataTemplate
{
get;
set;
}
public DataTemplate OggSettingsDataTemplate
{
get;
@@ -87,6 +93,9 @@ namespace FileConverter.Windows
case OutputType.Mp3:
return this.Mp3SettingsDataTemplate;
case OutputType.Mp4:
return this.Mp4SettingsDataTemplate;
case OutputType.Ogg:
return this.OggSettingsDataTemplate;
@@ -122,6 +122,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0">
@@ -133,13 +134,14 @@
<Slider x:Name="QualitySlider" Grid.Row="1" Grid.Column="1" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="28" Minimum="0" Maximum="30" TickPlacement="BottomRight" SmallChange="1" LargeChange="5" TickFrequency="1" Foreground="#004B82" />
<!-- Scale -->
<Label Content="Scale :" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
<Grid Grid.Row="2" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.01" Maximum="2" SmallChange="0.01" LargeChange="0.1" TickFrequency="0.01" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -150,13 +152,22 @@
</Label>
</Grid>
<DockPanel Grid.Row="3" Grid.Column="0" >
<!--Rotate-->
<Label Content="Rotate :" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right"/>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
<RadioButton Content="None" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|0, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.ZeroDegreesRotationTooltip}" Margin="0,7,7,7"/>
<RadioButton Content="90°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|90, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.NinetyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="180°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|180, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.OneEightyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
</StackPanel>
<DockPanel Grid.Row="4" Grid.Column="0" >
<Label Content="Audio" FontWeight="Bold" />
<Label Content="(Mp3)" FontWeight="Light" Foreground="#004B82" />
</DockPanel>
<Label Content="Quality :" Grid.Row="4" Grid.Column="0" HorizontalContentAlignment="Right"/>
<controls:EncodingQualitySliderControl Grid.Row="4" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="Mp3VBR"
<Label Content="Quality :" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right"/>
<controls:EncodingQualitySliderControl Grid.Row="5" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="Mp3VBR"
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
</Grid>
</DataTemplate>
@@ -174,6 +185,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0">
@@ -204,24 +216,33 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.01" Maximum="2" SmallChange="0.01" LargeChange="0.1" TickFrequency="0.01" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
<MultiBinding.ConverterParameter>{0:P0}</MultiBinding.ConverterParameter>
<MultiBinding.ConverterParameter>{0:P1}</MultiBinding.ConverterParameter>
<Binding ElementName="ScaleSlider" Path="Value" Mode="OneWay"/>
</MultiBinding>
</Label.Content>
</Label>
</Grid>
<DockPanel Grid.Row="4" Grid.Column="0" >
<!--Rotate-->
<Label Content="Rotate :" Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right"/>
<StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal">
<RadioButton Content="None" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|0, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.ZeroDegreesRotationTooltip}" Margin="0,7,7,7"/>
<RadioButton Content="90°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|90, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.NinetyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="180°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|180, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.OneEightyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
</StackPanel>
<DockPanel Grid.Row="5" Grid.Column="0" >
<Label Content="Audio" FontWeight="Bold" />
<Label Content="(AAC)" FontWeight="Light" Foreground="#004B82" />
</DockPanel>
<Label Content="Quality :" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right"/>
<controls:EncodingQualitySliderControl Grid.Row="5" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="AacVBR"
<Label Content="Quality :" Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right"/>
<controls:EncodingQualitySliderControl Grid.Row="6" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="AacVBR"
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay, TargetNullValue=128}" />
</Grid>
</DataTemplate>
@@ -235,11 +256,12 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--Quality-->
<Label Content="Quality :" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right"/>
<Slider Grid.Row="0" Grid.Column="1" x:Name="QualitySlider" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay, TargetNullValue=25}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="30" Minimum="0" Maximum="30" TickPlacement="BottomRight" SmallChange="3" LargeChange="6" TickFrequency="1" Foreground="#004B82" />
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="30" SelectionEnd="100" Minimum="0" Maximum="100" TickPlacement="BottomRight" SmallChange="5" LargeChange="15" TickFrequency="5" Foreground="#004B82" />
<!--Scale-->
<Label Content="Scale :" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right"/>
<Grid Grid.Row="1" Grid.Column="1">
@@ -247,16 +269,29 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.01" Maximum="2" SmallChange="0.01" LargeChange="0.1" TickFrequency="0.01" Foreground="#004B82"/>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="16" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2 3 4 6 8 12 16" Foreground="#004B82"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
<MultiBinding.ConverterParameter>{0:P0}</MultiBinding.ConverterParameter>
<MultiBinding.ConverterParameter>{0:P1}</MultiBinding.ConverterParameter>
<Binding ElementName="ScaleSlider" Path="Value" Mode="OneWay"/>
</MultiBinding>
</Label.Content>
</Label>
<CheckBox Grid.Row="1" Grid.Column="0" Content="Clamp to lowest power of 2 size" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageClampSizePowerOf2|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
</Grid>
<!--Rotate-->
<Label Content="Rotate :" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<RadioButton Content="None" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|0, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.ZeroDegreesRotationTooltip}" Margin="0,7,7,7"/>
<RadioButton Content="90°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|90, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.NinetyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="180°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|180, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.OneEightyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
</StackPanel>
</Grid>
</DataTemplate>
@@ -268,6 +303,7 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--Scale-->
<Label Content="Scale :" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right"/>
@@ -276,16 +312,30 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.01" Maximum="2" SmallChange="0.01" LargeChange="0.1" TickFrequency="0.01" Foreground="#004B82"/>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="16" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2 3 4 6 8 12 16" Foreground="#004B82"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
<MultiBinding.ConverterParameter>{0:P0}</MultiBinding.ConverterParameter>
<MultiBinding.ConverterParameter>{0:P1}</MultiBinding.ConverterParameter>
<Binding ElementName="ScaleSlider" Path="Value" Mode="OneWay"/>
</MultiBinding>
</Label.Content>
</Label>
<CheckBox Grid.Row="1" Grid.Column="0" Content="Clamp to lowest power of 2 size" Margin="5" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageClampSizePowerOf2|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
</Grid>
<!--Rotate-->
<Label Content="Rotate :" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right"/>
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
<RadioButton Content="None" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|0, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.ZeroDegreesRotationTooltip}" Margin="0,7,7,7"/>
<RadioButton Content="90°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|90, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.NinetyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="180°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|180, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.OneEightyDegreesRotationTooltip}" Margin="7"/>
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
</StackPanel>
</Grid>
</DataTemplate>
@@ -296,6 +346,7 @@
JpgSettingsDataTemplate="{StaticResource JpgSettingsDataTemplate}"
MkvSettingsDataTemplate="{StaticResource MkvSettingsDataTemplate}"
Mp3SettingsDataTemplate="{StaticResource Mp3SettingsDataTemplate}"
Mp4SettingsDataTemplate="{StaticResource MkvSettingsDataTemplate}"
OggSettingsDataTemplate="{StaticResource OggSettingsDataTemplate}"
PngSettingsDataTemplate="{StaticResource PngSettingsDataTemplate}"
WavSettingsDataTemplate="{StaticResource WavSettingsDataTemplate}" />
@@ -41,6 +41,7 @@ namespace FileConverter
OutputType.Flac,
OutputType.Wav,
OutputType.Mkv,
OutputType.Mp4,
OutputType.Avi,
OutputType.Ico,
OutputType.Jpg,
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Magick.NET-Q16-AnyCPU" version="7.0.0.0101" targetFramework="net45" />
</packages>
@@ -133,7 +133,7 @@ namespace FileConverterExtension
{
ToolStripMenuItem subItem = new ToolStripMenuItem
{
Text = "Settings",
Text = "Configure presets...",
};
fileConverterItem.DropDownItems.Add(subItem);
@@ -46,8 +46,9 @@
</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="SharpShell">
<HintPath>..\..\Middleware\SharpShell\SharpShell.dll</HintPath>
<Reference Include="SharpShell, Version=2.2.0.0, Culture=neutral, PublicKeyToken=f14dc899472fe6fb, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpShell.2.2.0.0\lib\net40\SharpShell.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -63,7 +64,7 @@
<Compile Include="FileConverterExtension.cs" />
<Compile Include="PresetDefinition.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
@@ -82,6 +83,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\ApplicationIcon-16x16.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
@@ -92,4 +94,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SharpShell" version="2.2.0.0" targetFramework="net45" />
</packages>
+16
View File
@@ -1,5 +1,21 @@
# Change Log
## Version 0.6
- New: Possibility to encode videos using H.264 video codec and AAC audio codec in a mp4 container (more portable than mkv).
- New: Support new image input file formats: psd, tga, svg and exr.
- New: Support new video input file format: m4v.
- New: Possibility to rotate images and videos.
- New: Remove restriction on image size to convert to ico file format (it is now possible to convert all images to ico).
- New: Add "Clamp to power of 2 size" option in image conversion.
- New: Support input images encoded in 16 bits or 32 bits per color channel.
- Fixed: Issue where the installer detects the utilisation of the extension dll in explorer, ask the user to restart it and fail to do it.
- Fixed: Issue where it is impossible to delete a conversion preset defined in default settings.
- Fixed: Issue where the Windows context menu does not contain user preset after an application upgrade.
- Fixed: Issue where some registry keys remain after file converter uninstallation.
- Fixed: Issue where aac bitrate was not saved.
- Fixed: Issue where settings serialization version was not updated.
- Change: Allow the user to scale images until 1600% size (useful to scale pixel art images).
## Version 0.5
- New: Software update system. The application now checks if a new version of File Converter is available.
- New: Possibility to scale images and videos.
-30
View File
@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<?if $(var.Platform) = x64 ?>
<?define Win64 = "yes" ?>
<?else ?>
<?define Win64 = "no" ?>
<?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="FileConverterExtension.dll" Guid="{FEF385C4-C43F-44F9-92E2-06578A8BD96E}" Win64="$(var.Win64)">
<Class Id="{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}" Context="InprocServer32" Description="FileConverterExtension.FileConverterExtension" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="FileConverterExtension.FileConverterExtension" Description="FileConverterExtension.FileConverterExtension" />
</Class>
<File Id="FileConverterExtension.dll" KeyPath="yes" Source="..\Application\FileConverterExtension\bin\$(var.Configuration)\FileConverterExtension.dll" />
<RegistryValue Root="HKCR" Key="*\shellex\ContextMenuHandlers\FileConverterExtension" Value="{af9b72b5-f4e4-44b0-a3d9-b55b748efe90}" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32\1.0.0.0" Name="Class" Value="FileConverterExtension.FileConverterExtension" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32\1.0.0.0" Name="Assembly" Value="FileConverterExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=15400b1c4b948c8a" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///[#FileConverterExtension.dll]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32" Name="Class" Value="FileConverterExtension.FileConverterExtension" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32" Name="Assembly" Value="FileConverterExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=15400b1c4b948c8a" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{AF9B72B5-F4E4-44B0-A3D9-B55B748EFE90}\InprocServer32" Name="CodeBase" Value="file:///[#FileConverterExtension.dll]" Type="string" Action="write" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>
-1
View File
@@ -1 +0,0 @@
"C:\Program Files (x86)\Wix Toolset v3.9\bin\Heat.exe" file "..\Application\FileConverterExtension\bin\Release\FileConverterExtension.dll" -dr INSTALLFOLDER -srd -gg -sfrag -suid -out "Extension.wxs" -b "..\Application\FileConverterExtension\bin\Release\"
+3 -1
View File
@@ -30,7 +30,6 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Extension.wxs" />
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
@@ -49,6 +48,9 @@
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
+42 -95
View File
@@ -12,7 +12,7 @@
<!-- Upgrade documentation: http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html -->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="0.5.0" Manufacturer="AAllard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b">
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="0.6" Manufacturer="AAllard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
<Icon Id="icon.ico" SourceFile="..\Resources\ApplicationIcon.ico"/>
@@ -26,12 +26,20 @@
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Feature Id="ShellExtensionFeature" Title="ShellExtension" Level="1" AllowAdvertise="no">
<ComponentRef Id="FileConverterExtension.dll" />
</Feature>
<CustomAction Id="InstallShell" FileKey="srm.exe" ExeCommand='install "[INSTALLFOLDER]\FileConverterExtension.dll" -codebase' Execute="deferred" Return="check" Impersonate="no" />
<CustomAction Id="UninstallShell" FileKey="srm.exe" ExeCommand='uninstall "[INSTALLFOLDER]\FileConverterExtension.dll"' Execute="deferred" Return="check" Impersonate="no" />
<CustomAction Id='PostInstallInit' FileKey='FileConverter.exe' ExeCommand='--post-install-init' Return='asyncNoWait' />
<InstallExecuteSequence>
<Custom Action="InstallShell" After="InstallFiles">NOT Installed</Custom>
<Custom Action="UninstallShell" Before="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<Custom Action="PostInstallInit" After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
<UIRef Id="WixUI_InstallDir" />
<Property Id="MSIUSEREALADMINDETECTION" Value="1" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" /> <!-- This avoid an issue where the installer detect the utilisation of the extension dll in explorer and then, ask to the user to restart these applications. The restart fails. -->
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="..\Resources\Installer\Banner.bmp" />
@@ -52,21 +60,42 @@
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- Resources -->
<!-- Application -->
<Component Guid="{142FBD60-90A7-4753-95CE-7B2A2E20B785}" Win64="$(var.Win64)">
<File Id="FileConverter.exe" Source="$(var.FileConverter.TargetPath)" KeyPath="yes" />
</Component>
<!-- Extension -->
<Component Guid="{AA5EA6F7-C443-488B-8E48-7CF000B9AD2A}" Win64="$(var.Win64)">
<File Id="FileConverterExtension.dll" KeyPath="yes" Source="..\Application\FileConverterExtension\bin\$(var.Configuration)\FileConverterExtension.dll" />
</Component>
<Component Guid="{9BF0AC45-A586-41C9-BA93-6048B46DA65F}" Win64="$(var.Win64)">
<File Id="SharpShell.dll" KeyPath="yes" Source="..\Middleware\SharpShell\SharpShell.dll" />
<File Id="SharpShell.dll" KeyPath="yes" Source="..\packages\SharpShell.2.2.0.0\lib\net40\SharpShell.dll" />
</Component>
<Component Guid="{EC580BEF-F962-42BD-B46D-4E4C126F2641}" Win64="$(var.Win64)">
<File Id="srm.exe" Source="..\packages\SharpShellTools.2.2.0.0\lib\srm.exe" KeyPath="yes" />
</Component>
<!-- Third parties -->
<Component Guid="{1790B82E-86BC-4B95-AA1D-9859FF3B6CA4}" Win64="$(var.Win64)">
<File Source="..\Middleware\ffmpeg.exe" KeyPath="yes" />
</Component>
<Component Guid="{C59B7F72-D8D6-47A3-B1D9-515CBC9FCE6F}" Win64="$(var.Win64)">
<File Id="Magick.NET.dll" KeyPath="yes" Source="..\Application\FileConverter\bin\$(var.Configuration)\Magick.NET-Q16-AnyCPU.dll" />
</Component>
<Component Guid="{E1B1C09C-B089-40D8-859B-0E55F640CAE1}" Win64="$(var.Win64)">
<File Id="Markdown.Xaml.dll" KeyPath="yes" Source="..\Middleware\Markdown.Xaml.dll" />
</Component>
<Component Guid="{AA5EA6F7-C443-488B-8E48-7CF000B9AD2A}" Win64="$(var.Win64)">
<File Source="$(var.FileConverter.TargetPath)" KeyPath="yes" />
<Component Guid="{55CD0B47-D5B0-4F0C-A54E-3E11DF345B48}" Win64="$(var.Win64)">
<File Id="Ripper.dll" KeyPath="yes" Source="..\Middleware\Ripper.dll" />
</Component>
<Component Guid="{1790B82E-86BC-4B95-AA1D-9859FF3B6CA4}" Win64="$(var.Win64)">
<File Source="..\Middleware\ffmpeg.exe" KeyPath="yes" />
<Component Guid="{3CE6CF1B-431C-41FD-8381-3F73EDAF7B8A}" Win64="$(var.Win64)">
<File Id="yeti.mmedia.dll" KeyPath="yes" Source="..\Middleware\yeti.mmedia.dll" />
</Component>
<!-- Configuration and documentation -->
<Component Guid="{86AEF5B3-C25B-4662-BAEF-20969D1821A5}" Win64="$(var.Win64)">
<File Source="..\Application\FileConverter\Settings.xml" KeyPath="yes" />
<File Source="..\Application\FileConverter\Settings.default.xml" KeyPath="yes" />
</Component>
<Component Guid="{A5158756-A107-4010-9E2F-3C0333F5A5F6}" Win64="$(var.Win64)">
<File Source="..\README.md" KeyPath="yes" />
@@ -77,94 +106,12 @@
<Component Guid="{6378238B-E44F-414B-A7AE-7E72CFA8616D}" Win64="$(var.Win64)">
<File Source="..\LICENSE.md" KeyPath="yes" />
</Component>
<Component Guid="{55CD0B47-D5B0-4F0C-A54E-3E11DF345B48}" Win64="$(var.Win64)">
<File Id="Ripper.dll" KeyPath="yes" Source="..\Middleware\Ripper.dll" />
</Component>
<Component Guid="{3CE6CF1B-431C-41FD-8381-3F73EDAF7B8A}" Win64="$(var.Win64)">
<File Id="yeti.mmedia.dll" KeyPath="yes" Source="..\Middleware\yeti.mmedia.dll" />
</Component>
<!-- Registry entries -->
<Component Id="RegistryEntries" Guid="{C3EF3D67-0206-4DBD-B2EA-78FF2E290093}">
<RegistryKey Root="HKCU" Key="Software\FileConverter">
<RegistryKey Root="HKCU" Key="Software\FileConverter" Action="createAndRemoveOnUninstall">
<RegistryValue Name="Path" Type="string" Value="[INSTALLFOLDER]FileConverter.exe"/>
<RegistryValue Name="CompatibleInputExtensions" Type="string" Value="3gp;aac;aiff;ape;avi;bik;bmp;cda;flac;flv;ico;jpg;jpeg;m4a;mkv;mov;mp3;mp4;ogg;png;tiff;wav;webm;wma;wmv"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\3gp">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\aac">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Wav;To Mp3"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\aiff">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\ape">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\avi">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\bik">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\bmp">
<RegistryValue Name="Presets" Type="string" Value="To Png;To Jpg;To Ico (max 256x256);To small Png"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\cda">
<RegistryValue Name="Presets" Type="string" Value="Extract CDA to Flac;Extract CDA to Ogg;Extract CDA to Mp3"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\flac">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\flv">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\ico">
<RegistryValue Name="Presets" Type="string" Value="To Png;To Jpg"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\jpeg">
<RegistryValue Name="Presets" Type="string" Value="To Png;To Ico (max 256x256);To small Png"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\jpg">
<RegistryValue Name="Presets" Type="string" Value="To Png;To Ico (max 256x256);To small Png"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\m4a">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\mkv">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\mov">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\mp3">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Wav;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\mp4">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\ogg">
<RegistryValue Name="Presets" Type="string" Value="To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\png">
<RegistryValue Name="Presets" Type="string" Value="To Jpg;To Ico (max 256x256);To small Png"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\tiff">
<RegistryValue Name="Presets" Type="string" Value="To Png;To Jpg;To Ico (max 256x256);To small Png"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\wav">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Flac;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\webm">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\wma">
<RegistryValue Name="Presets" Type="string" Value="To Ogg;To Wav;To Mp3;To Aac"/>
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\FileConverter\wmv">
<RegistryValue Name="Presets" Type="string" Value="To Mkv;To Mkv (low quality);To Avi;To Ogg;To Flac;To Wav;To Mp3;To Aac"/>
<RegistryValue Name="CompatibleInputExtensions" Type="string" Value="3gp;aac;aiff;ape;avi;bik;bmp;cda;exr;flac;flv;ico;jpg;jpeg;m4a;m4v;mkv;mov;mp3;mp4;ogg;png;psd;svg;tga;tiff;wav;webm;wma;wmv"/>
</RegistryKey>
</Component>
</ComponentGroup>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SharpShellTools" version="2.2.0.0" />
</packages>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large. Load diff
+5 -13
View File
@@ -5,19 +5,7 @@
You can download it here: [www.file-converter.org](http://file-converter.org/?from=readme.md).
## Supported file formats
Category | Supported output formats | Compatible input formats
------------|---------------------------|--------------------------------------------------------------------------------------------
Audio | aac, flac, mp3, ogg, wav | 3gp, aiff, ape, avi, bik, cda, flac, flv, m4a, mkv, mov, mp3, mp4, ogg, wav, wma, webm, wmv
Video | avi, mkv | 3gp, avi, bik, flv, mkv, mov, mp4, webm, wmv
Image | ico, jpg, png, | bmp, ico, jpg, jpeg, png, tiff
*Note: If your source file is a video, the conversion to an audio format will extract the audio part of the video.*
*Note 2: The mkv output file format encodes video using H.264 encoder for video and AAC encoder for audio.*
*Note 3: The avi output file format encodes video using Xvid encoder for video and Mp3 encoder for audio.*
You can find more information about what's in File converter and how to use it on the [wiki](https://github.com/Tichau/FileConverter/wiki).
## Thanks
@@ -26,6 +14,10 @@ File converter uses the following middlewares:
**ffmpeg** as file conversion software.
Thanks to ffmpeg devs for this awesome open source file conversion tool. [Web site link](https://www.ffmpeg.org/)
**ImageMagick** as image edition and conversion software.
Thanks to image magick devs for this awesome open source image edition software suite. [Web site link](http://imagemagick.net/)
And thanks to dlemstra for the C# wrapper of this software. [CodePlex link](https://magick.codeplex.com/)
**SharpShell** to easily create windows context menu extensions.
Thanks to Dave Kerr for his work on SharpShell. [CodePlex link](https://sharpshell.codeplex.com/)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 39 KiB

+2 -2
View File
@@ -1,4 +1,4 @@
<Version>
<Latest Major="0" Minor="4" Patch="1"/>
<URL>http://github.com/Tichau/FileConverter/releases/download/v0.4/FileConverter-0.4-x64-setup.msi</URL>
<Latest Major="0" Minor="5" Patch="0"/>
<URL>http://github.com/Tichau/FileConverter/releases/download/v0.5/FileConverter-0.5-x64-setup.msi</URL>
</Version>