Skip to content

Commit 778f732

Browse files
committed
Added support for JPG, BMP, TIF, EXR
1 parent fd1743b commit 778f732

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

Unity Mask Map Generator/Form1.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ private void Form1_Load(object sender, EventArgs e)
3131
{
3232
using (OpenFileDialog openFileDialog = new OpenFileDialog())
3333
{
34-
openFileDialog.Filter = "Image files (*.png;*.jpg;*.tiff;*.tif)|*.png;*.jpg;*.tiff;*.tif";
34+
openFileDialog.Filter =
35+
"PNG Image|*.png|" +
36+
"JPEG Image|*.jpg;*.jpeg|" +
37+
"TIFF Image|*.tif;*.tiff|" +
38+
"BMP Image|*.bmp|" +
39+
"EXR Image|*.exr|" +
40+
"All Image Files|*.png;*.jpg;*.jpeg;*.tif;*.tiff;*.bmp;*.exr";
41+
3542
try
3643
{
3744
if (openFileDialog.ShowDialog() == DialogResult.OK)
@@ -425,7 +432,15 @@ private void saveGeneratedImage()
425432
{
426433
using (SaveFileDialog saveFileDialog = new SaveFileDialog())
427434
{
428-
saveFileDialog.Filter = "PNG Image|*.png";
435+
saveFileDialog.Filter =
436+
"PNG Image|*.png|" +
437+
"JPEG Image|*.jpg;*.jpeg|" +
438+
"TIFF Image|*.tif;*.tiff|" +
439+
"BMP Image|*.bmp|" +
440+
"GIF Image|*.gif|" +
441+
"EXR Image|*.exr|" +
442+
"All Image Files|*.png;*.jpg;*.jpeg;*.tif;*.tiff;*.bmp;*.gif;*.exr";
443+
429444
saveFileDialog.Title = "Save the Mask Map";
430445
saveFileDialog.FileName = "MaskMap" + imageCount++;
431446
saveFileDialog.ShowDialog();

Unity Mask Map Generator/Unity Mask Map Generator.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Nullable>enable</Nullable>
88
<UseWindowsForms>true</UseWindowsForms>
99
<ImplicitUsings>enable</ImplicitUsings>
10-
<ApplicationIcon>6841854.ico</ApplicationIcon>
10+
<ApplicationIcon>6841856.ico</ApplicationIcon>
1111
<SignAssembly>True</SignAssembly>
1212
<Authors>Saurav Sajeev</Authors>
1313
<AssemblyTitle>Unity Mask Map Generator</AssemblyTitle>
@@ -21,7 +21,7 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<Content Include="6841854.ico" />
24+
<Content Include="6841856.ico" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

0 commit comments

Comments
 (0)