Solved the clipboard loading for the DIB file format too, this is related to #396

This commit is contained in:
Robin Krom 2022-03-29 09:05:25 +02:00
parent 83b308cb4b
commit 9ae5598ab8
No known key found for this signature in database
GPG key ID: BCC01364F1371490

View file

@ -87,8 +87,9 @@ namespace Greenshot.Editor.FileFormatHandlers
bitmapStream.Write(dibBuffer, 0, dibBuffer.Length);
bitmapStream.Seek(0, SeekOrigin.Begin);
// TODO: Replace with a FileFormatHandler
bitmap = ImageIO.FromStream(bitmapStream) as Bitmap;
return true;
using var beforeCloneImage = Image.FromStream(bitmapStream);
bitmap = ImageHelper.Clone(beforeCloneImage) as Bitmap;
return bitmap != null;
}
Log.Info("Using special DIBV5 / Format17 format reader");
// CF_DIBV5