Fixed a possible DPI info loss

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2426 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-01-13 14:50:47 +00:00
parent b17c3871a5
commit e07278bc04

View file

@ -525,6 +525,10 @@ namespace Greenshot.Helpers {
// Maybe not "made" but the original is still there... somehow // Maybe not "made" but the original is still there... somehow
outputMade = true; outputMade = true;
} else { } else {
// Make sure the resolution is set correctly!
if (capture.CaptureDetails != null && capture.Image != null) {
((Bitmap)capture.Image).SetResolution(capture.CaptureDetails.DpiX, capture.CaptureDetails.DpiY);
}
DoCaptureFeedback(); DoCaptureFeedback();
} }
@ -880,8 +884,10 @@ namespace Greenshot.Helpers {
} }
} }
if (captureForWindow != null && windowToCapture != null) { if (captureForWindow != null) {
if (windowToCapture != null) {
captureForWindow.CaptureDetails.Title = windowToCapture.Text; captureForWindow.CaptureDetails.Title = windowToCapture.Text;
}
((Bitmap)captureForWindow.Image).SetResolution(captureForWindow.CaptureDetails.DpiX, captureForWindow.CaptureDetails.DpiY); ((Bitmap)captureForWindow.Image).SetResolution(captureForWindow.CaptureDetails.DpiX, captureForWindow.CaptureDetails.DpiY);
} }