implemented #10

This commit is contained in:
Manuel Kamper 2024-08-17 08:18:32 +02:00
parent 6e97e3b8fb
commit b1c1dca495
4 changed files with 19 additions and 12 deletions

View File

@ -888,7 +888,7 @@
this.KeyPreview = true; this.KeyPreview = true;
this.MinimumSize = new System.Drawing.Size(983, 605); this.MinimumSize = new System.Drawing.Size(983, 605);
this.Name = "Main"; this.Name = "Main";
this.Text = "Image Sorter v2.8 | © 2015-2024 by kmpr.at"; this.Text = "Image Sorter v2.9 | © 2015-2024 by kmpr.at";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
this.Load += new System.EventHandler(this.Main_Load); this.Load += new System.EventHandler(this.Main_Load);
this.Shown += new System.EventHandler(this.Main_Shown); this.Shown += new System.EventHandler(this.Main_Shown);

View File

@ -2206,15 +2206,22 @@ namespace Mk0.Software.ImageSorter
{ {
if (CheckInpaint()) if (CheckInpaint())
{ {
Inpaint ip = new Inpaint(Properties.Settings.Default.inpaintUrl, pictureBoxImage.ImageLocation); if (Path.GetExtension(pictureBoxImage.ImageLocation).ToLower() != "heic")
ip.ShowDialog();
string oldFileName = pictureBoxImage.ImageLocation;
string newFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "inpaint-tmp", Path.GetFileNameWithoutExtension(pictureBoxImage.ImageLocation) + "_cleanup" + Path.GetExtension(pictureBoxImage.ImageLocation));
if (File.Exists(newFileName))
{ {
File.Delete(oldFileName); Inpaint ip = new Inpaint(Properties.Settings.Default.inpaintUrl, pictureBoxImage.ImageLocation);
File.Move(newFileName, oldFileName); ip.ShowDialog();
LoadPicture(imageIndex); string oldFileName = pictureBoxImage.ImageLocation;
string newFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "inpaint-tmp", Path.GetFileNameWithoutExtension(pictureBoxImage.ImageLocation) + "_cleanup" + Path.GetExtension(pictureBoxImage.ImageLocation));
if (File.Exists(newFileName))
{
File.Delete(oldFileName);
File.Move(newFileName, oldFileName);
LoadPicture(imageIndex);
}
}
else
{
MessageBox.Show("Das Dateiformat dieses Bildes wird von Inpaint nicht unterstützt.\n\nBitte konvertiere das Bild zuerst in ein unterstütztes Bildformat.", "Inpaint Dateityp", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
else else

View File

@ -38,7 +38,7 @@
<PublisherName>manuelkamper.com</PublisherName> <PublisherName>manuelkamper.com</PublisherName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish> <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>2.8.0.0</ApplicationVersion> <ApplicationVersion>2.9.0.0</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust> <UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl> <ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>
@ -62,7 +62,7 @@
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>0</WarningLevel> <WarningLevel>5</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>image.ico</ApplicationIcon> <ApplicationIcon>image.ico</ApplicationIcon>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.8.*")] [assembly: AssemblyVersion("2.9.*")]
//[assembly: AssemblyFileVersion("1.6.0.0")] //[assembly: AssemblyFileVersion("1.6.0.0")]