Skip to content

Commit 4e4dd61

Browse files
committed
2.4.1.2 - Reverted changes to GetScreenBitmap method in ScreenCapture.
1 parent df3fb44 commit 4e4dd61

File tree

6 files changed

+13
-28
lines changed

6 files changed

+13
-28
lines changed

AutoScreenCaptureSetup/AutoScreenCaptureSetup.vdproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@
233233
{
234234
"Name" = "8:Microsoft Visual Studio"
235235
"ProductName" = "8:Auto Screen Capture"
236-
"ProductCode" = "8:{00D29CE0-0773-4D87-84A7-07834F129626}"
237-
"PackageCode" = "8:{04CC88E6-5729-4E7D-ACA3-D5FB7B847E8B}"
236+
"ProductCode" = "8:{A3C76940-36FD-4ACE-A23E-EBA75E2744D4}"
237+
"PackageCode" = "8:{4BC699BE-CAE8-4BE3-9CE3-8F6DCC9CE08E}"
238238
"UpgradeCode" = "8:{6B29B7BC-0101-4495-B28C-26B6D3CDCC02}"
239239
"AspNetVersion" = "8:4.0.30319.0"
240240
"RestartWWWService" = "11:FALSE"
241241
"RemovePreviousVersions" = "11:TRUE"
242242
"DetectNewerInstalledVersion" = "11:TRUE"
243243
"InstallAllUsers" = "11:FALSE"
244-
"ProductVersion" = "8:2.4.11"
244+
"ProductVersion" = "8:2.4.12"
245245
"Manufacturer" = "8:Gavin Kendall"
246246
"ARPHELPTELEPHONE" = "8:"
247247
"ARPHELPLINK" = "8:https://sourceforge.net/p/autoscreen/tickets/"

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.4.1.1")]
36-
[assembly: AssemblyFileVersion("2.4.1.1")]
35+
[assembly: AssemblyVersion("2.4.1.2")]
36+
[assembly: AssemblyFileVersion("2.4.1.2")]
3737
[assembly: NeutralResourcesLanguageAttribute("en-CA")]

ScreenCapture.cs

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ private int AddScreenshotAndSaveToFile(Security security, int jpegQuality, Scree
452452
// We don't want to stop the screen capture session at this point because there may be other components that
453453
// can write to their given paths. If this is a misconfigured path for a particular component then just log an error.
454454
_log.WriteErrorMessage($"Cannot write to \"{screenshot.Path}\" because the user may not have the appropriate permissions to access the path");
455-
455+
456456
return returnFlag | (int)ScreenSavingErrorLevels.UserNotEnoughPermissions;
457457
}
458458
}
@@ -589,22 +589,6 @@ public Bitmap GetScreenBitmap(int source, int component, int captureMethod, int
589589
Bitmap bmpSource = null;
590590
Bitmap bmpDestination = null;
591591

592-
int destinationX = 0;
593-
int destinationY = 0;
594-
595-
foreach (System.Windows.Forms.Screen windowsScreen in System.Windows.Forms.Screen.AllScreens)
596-
{
597-
if (windowsScreen.Bounds.X < destinationX)
598-
{
599-
destinationX = windowsScreen.Bounds.X;
600-
}
601-
602-
if (windowsScreen.Bounds.Y < destinationY)
603-
{
604-
destinationY = windowsScreen.Bounds.Y;
605-
}
606-
}
607-
608592
if (width > 0 && height > 0)
609593
{
610594
if (resolutionRatio < IMAGE_RESOLUTION_RATIO_MIN || resolutionRatio > IMAGE_RESOLUTION_RATIO_MAX)
@@ -640,10 +624,10 @@ public Bitmap GetScreenBitmap(int source, int component, int captureMethod, int
640624

641625
using (Graphics graphicsSource = Graphics.FromImage(bmpSource))
642626
{
643-
graphicsSource.CopyFromScreen(x, y, destinationX, destinationY, blockRegionSize, CopyPixelOperation.SourceCopy);
627+
graphicsSource.CopyFromScreen(x, y, 0, 0, blockRegionSize, CopyPixelOperation.SourceCopy);
644628

645629
Graphics graphicsDestination = Graphics.FromImage(bmpDestination);
646-
graphicsDestination.DrawImage(bmpSource, destinationX, destinationY, destinationWidth, destinationHeight);
630+
graphicsDestination.DrawImage(bmpSource, 0, 0, destinationWidth, destinationHeight);
647631

648632
// The mouse pointer gets really weird if we go under 100 resolution ratio so we'll keep the resolution ratio at 100 if the mouse option is enabled.
649633
if (mouse && resolutionRatio == 100)
@@ -675,7 +659,7 @@ public Bitmap GetScreenBitmap(int source, int component, int captureMethod, int
675659
IntPtr hBitmap = CreateCompatibleBitmap(hdcSrc, width, height);
676660
IntPtr hOld = SelectObject(hdcDest, hBitmap);
677661

678-
BitBlt(hdcDest, destinationX, destinationY, width, height, hdcSrc, x, y, CopyPixelOperation.SourceCopy | CopyPixelOperation.CaptureBlt);
662+
BitBlt(hdcDest, 0, 0, width, height, hdcSrc, x, y, CopyPixelOperation.SourceCopy | CopyPixelOperation.CaptureBlt);
679663

680664
if (mouse)
681665
{
@@ -962,7 +946,7 @@ public int SaveScreenshot(Security security, int jpegQuality, Screenshot screens
962946
{
963947
// Drive isn't ready so log an error message.
964948
_log.WriteErrorMessage($"Unable to save screenshot for \"{screenshot.Path}\" because the drive is not found or not ready");
965-
949+
966950
return returnFlag | (int)ScreenSavingErrorLevels.DriveNotReady;
967951
}
968952
}

app.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<assemblyIdentity
44
type="win32"
55
name="GavinKendall.AutoScreenCapture"
6-
version="2.4.1.1"/>
6+
version="2.4.1.2"/>
77
<asmv3:application>
88
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
99
<dpiAware>True/PM</dpiAware>

interface/about/FormAbout.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings/Settings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ public void Load(FileSystem fileSystem)
259259
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.0.8")); // Region Preview fix.
260260
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.0.9")); // Allow Active Window to use GDI screen capture method for Screen. Removed logging from FormRegionSelectWithMouse.
261261
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.1.0")); // Region Select fix.
262+
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.1.1"));
262263

263264
Application = new SettingCollection()
264265
{

0 commit comments

Comments
 (0)