diff --git a/ShareX.ScreenCaptureLib/Forms/RectangleLight.cs b/ShareX.ScreenCaptureLib/Forms/RectangleLight.cs
index 24975caeb..158f565af 100644
--- a/ShareX.ScreenCaptureLib/Forms/RectangleLight.cs
+++ b/ShareX.ScreenCaptureLib/Forms/RectangleLight.cs
@@ -101,15 +101,8 @@ public RectangleLight()
timer.Start();
}
- private IContainer components = null;
-
protected override void Dispose(bool disposing)
{
- if (disposing && (components != null))
- {
- components.Dispose();
- }
-
if (timer != null) timer.Dispose();
if (backgroundImage != null) backgroundImage.Dispose();
if (backgroundBrush != null) backgroundBrush.Dispose();
@@ -122,6 +115,7 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
SuspendLayout();
+
AutoScaleDimensions = new SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
StartPosition = FormStartPosition.Manual;
@@ -160,28 +154,34 @@ private void RectangleLight_MouseDown(object sender, MouseEventArgs e)
positionOnClick = CaptureHelpers.GetCursorPosition();
isMouseDown = true;
}
- else if (isMouseDown)
- {
- isMouseDown = false;
- Refresh();
- }
- else
- {
- Close();
- }
}
private void RectangleLight_MouseUp(object sender, MouseEventArgs e)
{
- if (isMouseDown && e.Button == MouseButtons.Left)
+ if (e.Button == MouseButtons.Left)
{
- if (SelectionRectangle0Based.Width > 0 && SelectionRectangle0Based.Height > 0)
+ if (isMouseDown)
{
- LastSelectionRectangle0Based = SelectionRectangle0Based;
- DialogResult = DialogResult.OK;
- }
+ if (SelectionRectangle0Based.Width > 0 && SelectionRectangle0Based.Height > 0)
+ {
+ LastSelectionRectangle0Based = SelectionRectangle0Based;
+ DialogResult = DialogResult.OK;
+ }
- Close();
+ Close();
+ }
+ }
+ else
+ {
+ if (isMouseDown)
+ {
+ isMouseDown = false;
+ Refresh();
+ }
+ else
+ {
+ Close();
+ }
}
}
diff --git a/ShareX.ScreenCaptureLib/Forms/RectangleTransparent.cs b/ShareX.ScreenCaptureLib/Forms/RectangleTransparent.cs
index 18515b11e..166f1c212 100644
--- a/ShareX.ScreenCaptureLib/Forms/RectangleTransparent.cs
+++ b/ShareX.ScreenCaptureLib/Forms/RectangleTransparent.cs
@@ -70,8 +70,6 @@ public Point CurrentMousePosition0Based
public bool ShowRectangleInfo { get; set; }
- public Image SelectionImage { get; private set; }
-
private Timer timer;
private Bitmap surface;
private Graphics gSurface;
@@ -82,15 +80,6 @@ public Point CurrentMousePosition0Based
public RectangleTransparent()
{
- StartPosition = FormStartPosition.Manual;
- Bounds = ScreenRectangle;
- Text = "ShareX - " + Resources.RectangleTransparent_RectangleTransparent_Rectangle_capture_transparent;
-
- Shown += RectangleLight_Shown;
- KeyUp += RectangleLight_KeyUp;
- MouseDown += RectangleLight_MouseDown;
- MouseUp += RectangleLight_MouseUp;
-
borderDotPen = new Pen(Color.Black, 1);
borderDotPen2 = new Pen(Color.White, 1);
borderDotPen2.DashPattern = new float[] { 5, 5 };
@@ -102,6 +91,15 @@ public RectangleTransparent()
gSurface.SmoothingMode = SmoothingMode.HighSpeed;
gSurface.CompositingMode = CompositingMode.SourceCopy;
+ StartPosition = FormStartPosition.Manual;
+ Bounds = ScreenRectangle;
+ Text = "ShareX - " + Resources.RectangleTransparent_RectangleTransparent_Rectangle_capture_transparent;
+
+ Shown += RectangleLight_Shown;
+ KeyUp += RectangleLight_KeyUp;
+ MouseDown += RectangleLight_MouseDown;
+ MouseUp += RectangleLight_MouseUp;
+
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
{
Cursor = new Cursor(cursorStream);
@@ -154,8 +152,6 @@ private void RectangleLight_MouseUp(object sender, MouseEventArgs e)
if (SelectionRectangle0Based.Width > 0 && SelectionRectangle0Based.Height > 0)
{
LastSelectionRectangle0Based = SelectionRectangle0Based;
- if (SelectionImage != null) SelectionImage.Dispose();
- SelectionImage = GetAreaImage();
DialogResult = DialogResult.OK;
}
@@ -167,7 +163,6 @@ private void RectangleLight_MouseUp(object sender, MouseEventArgs e)
if (isMouseDown)
{
isMouseDown = false;
- Refresh();
}
else
{
diff --git a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx
index 521843e8f..e8afc4806 100644
--- a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx
+++ b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx
@@ -160,7 +160,7 @@
CRF:
- @Invariant
+
lblX264CRF
@@ -294,10 +294,10 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
Right
- 80, 3
+ 112, 3
- 229, 36
+ 197, 36
1
@@ -321,10 +321,10 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
Right
- 80, 3
+ 112, 3
- 229, 36
+ 197, 36
1
@@ -348,10 +348,10 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
Right
- 80, 3
+ 112, 3
- 229, 36
+ 197, 36
1
@@ -508,7 +508,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
...
- @Invariant
+
btnFFmpegBrowse
@@ -553,7 +553,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
ffmpeg.exe
- @Invariant
+
gbFFmpegExe
@@ -667,7 +667,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
?
- @Invariant
+
btnFFmpegHelp
@@ -742,7 +742,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
x264
- @Invariant
+
tpX264
@@ -769,7 +769,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
CRF:
- @Invariant
+
lblVpxCRF
@@ -793,7 +793,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
VP8
- @Invariant
+
tpVpx
@@ -817,7 +817,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
Xvid
- @Invariant
+
tpXvid
@@ -940,7 +940,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
AAC
- @Invariant
+
tpAAC
@@ -994,7 +994,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
Vorbis
- @Invariant
+
tpVorbis
@@ -1048,7 +1048,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
MP3
- @Invariant
+
tpMP3
@@ -1383,7 +1383,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi
eiFFmpeg
- HelpersLib.ExportImportControl, HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.ExportImportControl, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
$this
diff --git a/ShareX/Forms/MainForm.cs b/ShareX/Forms/MainForm.cs
index 7cc8f8e7b..b684b53be 100644
--- a/ShareX/Forms/MainForm.cs
+++ b/ShareX/Forms/MainForm.cs
@@ -1913,7 +1913,7 @@ private void CaptureRectangleTransparent(TaskSettings taskSettings = null, bool
{
if (rectangleTransparent.ShowDialog() == DialogResult.OK)
{
- img = rectangleTransparent.SelectionImage;
+ img = rectangleTransparent.GetAreaImage();
if (img != null)
{