diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-03-28 06:26:01 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-03-28 06:26:01 +0300 |
commit | 1e9bbf9562357f1c53db91f0148cfc01e9db2d62 (patch) | |
tree | ca763c375807ae8243c23438aac301d90f8046d5 /UVtools.Core/Extensions/EmguExtensions.cs | |
parent | 2231fdaca309cec03bb02e59a52ed6685a906cf4 (diff) |
v2.7.2v2.7.2
* **Core:**
* Fix some improper locks for progress counter and change to Interlocked instead
* Fix a bug when chaging layer count by remove or add layers it will malform the file after save and crash the program with some tools and/or clipboard
* Fix when a operation fails by other reason different from cancelation it was not restoring the backup
* When manually delete/fix issues it will also backup the layers
* **LayerManager:**
* LayerManager is now readonly and no longer used to transpose layers, each FileFormat have now a unique `LayerManager` instance which is set on the generic constructor
* Implemented `List<Layer>` methods to easy modify the layers array
* Changing the `Layers` instance will now recompute some properties, call the properties rebuild and forced sanitize of the structure
* Better reallocation methods
* **Clipboard Manager:**
* Add the hability to do full backups, they will be marked with an asterisk (*) at clipboard items list
* When a partial backup is made and it backups all the layers it will be converted to full backup
* Clipboard can now restore a snapshot directly with `RestoreSnapshot`
* Prevent restore the initial backup upon file load and when clearing the clipboard
* Clip's that change the layer count will perform a full backup and also do a fail-safe backup behind if previous clip is not a full backup
* **Pixel dimming:**
* Allow to load an image file as a pattern (Do not use very large files or it will take much time to dump the data into the textbox)
* Empty lines on patterns will be discarded and not trigger validation error
Diffstat (limited to 'UVtools.Core/Extensions/EmguExtensions.cs')
-rw-r--r-- | UVtools.Core/Extensions/EmguExtensions.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/UVtools.Core/Extensions/EmguExtensions.cs b/UVtools.Core/Extensions/EmguExtensions.cs index 2eaa12a..a6aa974 100644 --- a/UVtools.Core/Extensions/EmguExtensions.cs +++ b/UVtools.Core/Extensions/EmguExtensions.cs @@ -252,7 +252,8 @@ namespace UVtools.Core.Extensions public static Mat InitMat(Size size, int channels = 1, DepthType depthType = DepthType.Cv8U) { - var mat = new Mat(size, depthType, channels); + return Mat.Zeros(size.Height, size.Width, depthType, channels); + /*var mat = new Mat(size, depthType, channels); switch (channels) { case 1: @@ -266,7 +267,7 @@ namespace UVtools.Core.Extensions break; } - return mat; + return mat;*/ } public static Mat InitMat(Size size, MCvScalar scalar, int channels = 1, DepthType depthType = DepthType.Cv8U) |