From 2721ee06a2513710b15e4dbd5796f1e05a23b59f Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Wed, 23 Mar 2022 21:59:18 +0100 Subject: [PATCH] Fix #392 , The DibFileFormatHandler wasn't registered with the name which is stored in DataFormats.Dib --- .../FileFormatHandlers/DefaultFileFormatHandler.cs | 2 +- src/Greenshot.Editor/FileFormatHandlers/DibFileFormatHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Greenshot.Editor/FileFormatHandlers/DefaultFileFormatHandler.cs b/src/Greenshot.Editor/FileFormatHandlers/DefaultFileFormatHandler.cs index 30d785bb5..115b5328f 100644 --- a/src/Greenshot.Editor/FileFormatHandlers/DefaultFileFormatHandler.cs +++ b/src/Greenshot.Editor/FileFormatHandlers/DefaultFileFormatHandler.cs @@ -81,7 +81,7 @@ namespace Greenshot.Editor.FileFormatHandlers // For those images which are with Alpha, but the format doesn't support this, change it to 24bpp if (imageFormat.Guid == ImageFormat.Jpeg.Guid && Image.IsAlphaPixelFormat(bitmap.PixelFormat)) { - var nonAlphaImage = ImageHelper.Clone(bitmap, PixelFormat.Format24bppRgb) as Bitmap; + var nonAlphaImage = ImageHelper.Clone(bitmap, PixelFormat.Format24bppRgb); try { // Set that this file was written by Greenshot diff --git a/src/Greenshot.Editor/FileFormatHandlers/DibFileFormatHandler.cs b/src/Greenshot.Editor/FileFormatHandlers/DibFileFormatHandler.cs index 8d7ad7790..1e7515e8d 100644 --- a/src/Greenshot.Editor/FileFormatHandlers/DibFileFormatHandler.cs +++ b/src/Greenshot.Editor/FileFormatHandlers/DibFileFormatHandler.cs @@ -41,7 +41,7 @@ namespace Greenshot.Editor.FileFormatHandlers private const double DpiToPelsPerMeter = 39.3701; private static readonly ILog Log = LogManager.GetLogger(typeof(DibFileFormatHandler)); - private readonly IReadOnlyCollection _ourExtensions = new[] { ".dib", ".format17" }; + private readonly IReadOnlyCollection _ourExtensions = new[] { ".dib", ".format17", ".deviceindependentbitmap" }; public DibFileFormatHandler() {