Possible fix for some using Greenshot to "copy from clipboard" issues, needs to be tested though...

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2561 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-04-11 15:31:01 +00:00
commit aefa2eace3

View file

@ -325,7 +325,7 @@ EndSelection:<<<<<<<4
} else {
retrieveFormats = new string[] { FORMAT_PNG_OFFICEART, FORMAT_PNG, FORMAT_JFIF_OFFICEART, FORMAT_JPG, FORMAT_JFIF, DataFormats.Tiff, DataFormats.Dib, FORMAT_BITMAP_PLACEHOLDER, FORMAT_FILECONTENTS, FORMAT_GIF };
}
foreach(string currentFormat in retrieveFormats) {
foreach (string currentFormat in retrieveFormats) {
if (FORMAT_BITMAP_PLACEHOLDER.Equals(currentFormat)) {
LOG.Info("Using default .NET Clipboard.GetImage()");
try {
@ -372,8 +372,6 @@ EndSelection:<<<<<<<4
byte[] dibBuffer = new byte[dibStream.Length];
dibStream.Read(dibBuffer, 0, dibBuffer.Length);
BitmapInfoHeader infoHeader = BinaryStructHelper.FromByteArray<BitmapInfoHeader>(dibBuffer);
// Only use this code, when the biCommpression != 0 (BI_RGB)
if (infoHeader.biCompression != 0) {
LOG.InfoFormat("Using special DIB format reader for biCompression {0}", infoHeader.biCompression);
int fileHeaderSize = Marshal.SizeOf(typeof(BitmapFileHeader));
uint infoHeaderSize = infoHeader.biSize;
@ -398,9 +396,6 @@ EndSelection:<<<<<<<4
}
}
}
} else {
LOG.InfoFormat("Skipping special DIB format reader for biCompression {0}", infoHeader.biCompression);
}
}
} else {
LOG.Info("Skipping special DIB format reader as it's disabled in the configuration.");