diff --git a/Directory.Build.props b/Directory.Build.props index 1415521cf..520eb0976 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,7 +8,7 @@ https://github.com/greenshot/greenshot https://www.gnu.org/licenses/gpl.html GPL - latest + 9 true true win10-x64;win10-x86;win-x64;win-x86 @@ -56,7 +56,7 @@ - + all runtime; build; native; contentfiles; analyzers @@ -102,7 +102,7 @@ - + diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj index 03b68dc1b..9419fb179 100644 --- a/Greenshot/Greenshot.csproj +++ b/Greenshot/Greenshot.csproj @@ -17,7 +17,7 @@ - + diff --git a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj index 6901a31c5..2c4e72fe6 100644 --- a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj +++ b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj @@ -12,6 +12,7 @@ - + + \ No newline at end of file diff --git a/GreenshotJiraPlugin/JiraConnector.cs b/GreenshotJiraPlugin/JiraConnector.cs index 163771019..b836ea560 100644 --- a/GreenshotJiraPlugin/JiraConnector.cs +++ b/GreenshotJiraPlugin/JiraConnector.cs @@ -29,8 +29,8 @@ using System.Windows.Forms; using Dapplo.HttpExtensions; using Dapplo.HttpExtensions.Extensions; using Dapplo.Jira; -using Dapplo.Jira.Converters; using Dapplo.Jira.Entities; +using Dapplo.Jira.SvgWinForms.Converters; using GreenshotPlugin.Core; using GreenshotPlugin.IniFile; @@ -241,7 +241,7 @@ namespace GreenshotJiraPlugin { /// text /// the visibility role /// CancellationToken - public async Task AddCommentAsync(string issueKey, string body, string visibility = null, CancellationToken cancellationToken = default) + public async Task AddCommentAsync(string issueKey, string body, Visibility visibility = null, CancellationToken cancellationToken = default) { await CheckCredentialsAsync(cancellationToken); await _jiraClient.Issue.AddCommentAsync(issueKey, body, visibility, cancellationToken).ConfigureAwait(false); diff --git a/GreenshotPlugin/Core/ImageHelper.cs b/GreenshotPlugin/Core/ImageHelper.cs index 8c31eaf4c..e5e5a1b60 100644 --- a/GreenshotPlugin/Core/ImageHelper.cs +++ b/GreenshotPlugin/Core/ImageHelper.cs @@ -1351,22 +1351,22 @@ namespace GreenshotPlugin.Core { // Make sure both images have the same resolution newImage.SetResolution(sourceImage.HorizontalResolution, sourceImage.VerticalResolution); - using Graphics graphics = Graphics.FromImage(newImage); - if (fromTransparentToNon) - { - // Rule 2: Make sure the background color is white - graphics.Clear(Color.White); - } - // decide fastest copy method - if (isAreaEqual) - { - graphics.DrawImageUnscaled(sourceImage, 0, 0); - } - else - { - graphics.DrawImage(sourceImage, 0, 0, sourceRect, GraphicsUnit.Pixel); - } - } + using Graphics graphics = Graphics.FromImage(newImage); + if (fromTransparentToNon) + { + // Rule 2: Make sure the background color is white + graphics.Clear(Color.White); + } + // decide fastest copy method + if (isAreaEqual) + { + graphics.DrawImageUnscaled(sourceImage, 0, 0); + } + else + { + graphics.DrawImage(sourceImage, 0, 0, sourceRect, GraphicsUnit.Pixel); + } + } else { // Let GDI+ decide how to convert, need to test what is quicker... @@ -1374,18 +1374,27 @@ namespace GreenshotPlugin.Core { // Make sure both images have the same resolution newImage.SetResolution(sourceImage.HorizontalResolution, sourceImage.VerticalResolution); } - // Clone property items (EXIF information etc) - foreach (var propertyItem in sourceImage.PropertyItems) + + // In WINE someone getting the PropertyItems doesn't work + try { - try + // Clone property items (EXIF information etc) + foreach (var propertyItem in sourceImage.PropertyItems) { - newImage.SetPropertyItem(propertyItem); - } - catch (Exception ex) - { - Log.Warn("Problem cloning a propertyItem.", ex); + try + { + newImage.SetPropertyItem(propertyItem); + } + catch (Exception innerEx) + { + Log.Warn("Problem cloning a propertyItem.", innerEx); + } } } + catch (Exception ex) + { + Log.Warn("Problem cloning a propertyItem.", ex); + } return newImage; } diff --git a/GreenshotPlugin/GreenshotPlugin.csproj b/GreenshotPlugin/GreenshotPlugin.csproj index 461aa6c84..3caa4a7c4 100644 --- a/GreenshotPlugin/GreenshotPlugin.csproj +++ b/GreenshotPlugin/GreenshotPlugin.csproj @@ -14,7 +14,7 @@ - +