Bug fixes, added Output Directory option
This commit is contained in:
16
Program.cs
16
Program.cs
@@ -13,7 +13,7 @@ using Newtonsoft.Json.Serialization;
|
|||||||
* Email : pablu23@gmx.de
|
* Email : pablu23@gmx.de
|
||||||
* Erstelldatum : 25.06.2020
|
* Erstelldatum : 25.06.2020
|
||||||
* Last change : 25.06.2020
|
* Last change : 25.06.2020
|
||||||
* GitHub : https://github.com/Pablu23/16x16Converter
|
* GitHub : https://github.com/Pablu23/ConvertTo16x16
|
||||||
*
|
*
|
||||||
* TODO : Add comments, bug fixes. Add Background removal. Finish Project.
|
* TODO : Add comments, bug fixes. Add Background removal. Finish Project.
|
||||||
*
|
*
|
||||||
@@ -47,6 +47,7 @@ namespace ConvertTo16x16
|
|||||||
public int PixelAnzahl { get; set; }
|
public int PixelAnzahl { get; set; }
|
||||||
public bool RmBackground { get; set; }
|
public bool RmBackground { get; set; }
|
||||||
public Color BackgroundCol { get; set; }
|
public Color BackgroundCol { get; set; }
|
||||||
|
public string OutputDir { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
class Program
|
class Program
|
||||||
@@ -111,6 +112,13 @@ namespace ConvertTo16x16
|
|||||||
Console.SetCursorPosition(25, Console.CursorTop - 2);
|
Console.SetCursorPosition(25, Console.CursorTop - 2);
|
||||||
}
|
}
|
||||||
settings.FileDir = Console.ReadLine();
|
settings.FileDir = Console.ReadLine();
|
||||||
|
Console.Write("\nGeben sie den Output Pfad an : ");
|
||||||
|
if (settings.OutputDir != null)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"\nPfad : {settings.OutputDir}");
|
||||||
|
Console.SetCursorPosition(32, Console.CursorTop - 2);
|
||||||
|
}
|
||||||
|
settings.OutputDir = Console.ReadLine();
|
||||||
Console.Write("\nGeben sie an Wieviele Pixel sie wollen (Empfohlen: 16 | 32) : ");
|
Console.Write("\nGeben sie an Wieviele Pixel sie wollen (Empfohlen: 16 | 32) : ");
|
||||||
if (settings.PixelAnzahl > 15)
|
if (settings.PixelAnzahl > 15)
|
||||||
{
|
{
|
||||||
@@ -133,7 +141,7 @@ namespace ConvertTo16x16
|
|||||||
{
|
{
|
||||||
case "t":
|
case "t":
|
||||||
settings.RmBackground = true;
|
settings.RmBackground = true;
|
||||||
Console.WriteLine("Which Color should be removed");
|
Console.WriteLine("\n\n\nWhich Color should be removed");
|
||||||
Console.Write("Red : ");
|
Console.Write("Red : ");
|
||||||
int red = Convert.ToInt32(Console.ReadLine());
|
int red = Convert.ToInt32(Console.ReadLine());
|
||||||
Console.Write("Green : ");
|
Console.Write("Green : ");
|
||||||
@@ -262,8 +270,8 @@ namespace ConvertTo16x16
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outcome.Save($@"{settings.FileDir}\16x16{bildName}");
|
outcome.Save($@"{settings.OutputDir}\16x16{bildName}");
|
||||||
|
bmp.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user