提交 9b4989d9 编写于 作者: N Nicke Manarin

Merge branch 'dev'

...@@ -50,5 +50,5 @@ using System.Windows; ...@@ -50,5 +50,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.32.0.0")] [assembly: AssemblyVersion("2.32.1.0")]
[assembly: AssemblyFileVersion("2.32.0.0")] [assembly: AssemblyFileVersion("2.32.1.0")]
...@@ -4,20 +4,14 @@ This is the current project of ScreenToGif. ...@@ -4,20 +4,14 @@ This is the current project of ScreenToGif.
_VS 2019 and .Net 4.8 or newer required._ _VS 2019 and .Net 4.8 or newer required._
## What's new? (Version 2.32) ## What's new? (Version 2.32.1)
• Memory usage improvements with the frame list inside the editor. • Nothing yet.
• You can now open the app and start recording by using command line arguments (read the wiki for more details).
• Added option to set the background of the editor to follow the OS color theme (thanks to @pawlos).
• Added option to resize the frames by setting a percentage.
### Fixed: ### Fixed:
♦ The selection adorner could appear in the recording if the region was previously left close to the right corner of the screen. ♦ The recorder window could crash because of a sizing issue.
♦ The new recorder UI command panel was getting in the way of the capture when positioned to the left of the capture region. ♦ It was not possible to properly move frames in the timeline.
♦ The insert window was reporting wrong sizing information about the images and canvas.
♦ The new recorder UI was width and height text boxes were not displaying the correct scaled size based on the screen DPI.
♦ When exporting and not selecting a file path, the filename of the temporary file was not using the extension (thanks to @pawlos).
### Known Bugs: ### Known Bugs:
......
...@@ -914,7 +914,7 @@ namespace ScreenToGif.Util ...@@ -914,7 +914,7 @@ namespace ScreenToGif.Util
} }
case Export.Jpeg: case Export.Jpeg:
{ {
using (var fileStream = new FileStream(frame.Path, FileMode.Create)) using (var fileStream = new FileStream(path, FileMode.Create))
{ {
var jpgEncoder = new JpegBitmapEncoder { QualityLevel = 100 }; var jpgEncoder = new JpegBitmapEncoder { QualityLevel = 100 };
jpgEncoder.Frames.Add(BitmapFrame.Create(frame.Path.SourceFrom())); jpgEncoder.Frames.Add(BitmapFrame.Create(frame.Path.SourceFrom()));
......
...@@ -415,11 +415,6 @@ namespace ScreenToGif.Util ...@@ -415,11 +415,6 @@ namespace ScreenToGif.Util
var item = list[oldIndex]; var item = list[oldIndex];
list.RemoveAt(oldIndex); list.RemoveAt(oldIndex);
//The actual index could have shifted due to the removal.
if (newIndex > oldIndex)
newIndex--;
list.Insert(newIndex, item); list.Insert(newIndex, item);
return list; return list;
......
...@@ -1778,7 +1778,7 @@ namespace ScreenToGif.Windows ...@@ -1778,7 +1778,7 @@ namespace ScreenToGif.Windows
} }
//Since each frame has a number, upon reordering the numbers must be updated. //Since each frame has a number, upon reordering the numbers must be updated.
AdjustFrameNumbers(selection.Select(s => s.NextIndex).Min()); AdjustFrameNumbers(selection.Select(s => Math.Min(s.CurrentIndex, s.NextIndex)).Min());
FocusOnSelectedFrames(); FocusOnSelectedFrames();
ShowHint("S.Hint.MoveLeft"); ShowHint("S.Hint.MoveLeft");
...@@ -1808,7 +1808,7 @@ namespace ScreenToGif.Windows ...@@ -1808,7 +1808,7 @@ namespace ScreenToGif.Windows
} }
//Since each frame has a number, upon reordering the numbers must be updated. //Since each frame has a number, upon reordering the numbers must be updated.
AdjustFrameNumbers(selection.Select(s => s.NextIndex).Min()); AdjustFrameNumbers(selection.Select(s => Math.Min(s.CurrentIndex, s.NextIndex)).Min());
FocusOnSelectedFrames(); FocusOnSelectedFrames();
ShowHint("S.Hint.MoveRight"); ShowHint("S.Hint.MoveRight");
...@@ -4688,8 +4688,7 @@ namespace ScreenToGif.Windows ...@@ -4688,8 +4688,7 @@ namespace ScreenToGif.Windows
if (closest.WorkingArea.Bottom < top + 100) if (closest.WorkingArea.Bottom < top + 100)
top = closest.WorkingArea.Bottom - height; top = closest.WorkingArea.Bottom - height;
if (top > int.MaxValue || top < int.MinValue || left > int.MaxValue || left < int.MinValue || if (top > int.MaxValue || top < int.MinValue || left > int.MaxValue || left < int.MinValue || width > int.MaxValue || width < 0 || height > int.MaxValue || height < 0)
width > int.MaxValue || width < int.MinValue || height > int.MaxValue || height < int.MinValue)
{ {
var desc = $"On load: {onLoad}\nScale: {this.Scale()}\n\n" + var desc = $"On load: {onLoad}\nScale: {this.Scale()}\n\n" +
$"Screen: {closest.AdapterName}\nBounds: {closest.Bounds}\n\nTopLeft: {top}x{left}\nWidthHeight: {width}x{height}\n\n" + $"Screen: {closest.AdapterName}\nBounds: {closest.Bounds}\n\nTopLeft: {top}x{left}\nWidthHeight: {width}x{height}\n\n" +
......
...@@ -112,8 +112,7 @@ namespace ScreenToGif.Windows.Other ...@@ -112,8 +112,7 @@ namespace ScreenToGif.Windows.Other
if (closest.WorkingArea.Bottom < top + 100) if (closest.WorkingArea.Bottom < top + 100)
top = closest.WorkingArea.Bottom - height; top = closest.WorkingArea.Bottom - height;
if (top > int.MaxValue || top < int.MinValue || left > int.MaxValue || left < int.MinValue || if (top > int.MaxValue || top < int.MinValue || left > int.MaxValue || left < int.MinValue || width > int.MaxValue || width < 0 || height > int.MaxValue || height < 0)
width > int.MaxValue || width < int.MinValue || height > int.MaxValue || height < int.MinValue)
{ {
var desc = $"On load: {onLoad}\nScale: {this.Scale()}\n\n" + var desc = $"On load: {onLoad}\nScale: {this.Scale()}\n\n" +
$"Screen: {closest.AdapterName}\nBounds: {closest.Bounds}\n\nTopLeft: {top}x{left}\nWidthHeight: {width}x{height}\n\n" + $"Screen: {closest.AdapterName}\nBounds: {closest.Bounds}\n\nTopLeft: {top}x{left}\nWidthHeight: {width}x{height}\n\n" +
......
...@@ -1459,9 +1459,20 @@ namespace ScreenToGif.Windows ...@@ -1459,9 +1459,20 @@ namespace ScreenToGif.Windows
var regionLeft = (int)Math.Round((Math.Round(Left, MidpointRounding.AwayFromZero) + Constants.LeftOffset) * _viewModel.CurrentMonitor.Scale); var regionLeft = (int)Math.Round((Math.Round(Left, MidpointRounding.AwayFromZero) + Constants.LeftOffset) * _viewModel.CurrentMonitor.Scale);
var regionTop = (int)Math.Round((Math.Round(Top, MidpointRounding.AwayFromZero) + Constants.TopOffset) * _viewModel.CurrentMonitor.Scale); var regionTop = (int)Math.Round((Math.Round(Top, MidpointRounding.AwayFromZero) + Constants.TopOffset) * _viewModel.CurrentMonitor.Scale);
var regionWidth = (int)Math.Round((UserSettings.All.RecorderWidth- Constants.HorizontalOffset) * _viewModel.CurrentMonitor.Scale); var regionWidth = (int)Math.Round((UserSettings.All.RecorderWidth - Constants.HorizontalOffset) * _viewModel.CurrentMonitor.Scale);
var regionHeight = (int)Math.Round((UserSettings.All.RecorderHeight - Constants.VerticalOffset) * _viewModel.CurrentMonitor.Scale); var regionHeight = (int)Math.Round((UserSettings.All.RecorderHeight - Constants.VerticalOffset) * _viewModel.CurrentMonitor.Scale);
if (regionWidth < 0 || regionHeight < 0)
{
var desc = $"Scale: {this.Scale()}\n\nScreen: {closest.AdapterName}\nBounds: {closest.Bounds}\n\nTopLeft: {top}x{left}\nWidthHeight: {regionWidth}x{regionHeight}";
LogWriter.Log("Wrong recorder window sizing", desc);
Height = UserSettings.All.RecorderHeight = 500;
Width = UserSettings.All.RecorderWidth = 250;
return;
}
_viewModel.Region = new Rect(regionLeft, regionTop, regionWidth, regionHeight); _viewModel.Region = new Rect(regionLeft, regionTop, regionWidth, regionHeight);
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="2.32.0.0" name="ScreenToGif" processorArchitecture="msil"/> <assemblyIdentity version="2.32.1.0" name="ScreenToGif" processorArchitecture="msil"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security> <security>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册