Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2021-01-03 03:47:20 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2021-01-03 03:47:20 +0300
commita7d15a24d0179b06b64daf1be5f4e08c488cb930 (patch)
treeb3823c82f6031da7a6c10571945973a88390778a /UVtools.Core/Extensions/EmguExtensions.cs
parent92588fd1592236d5fef67391e55cf05b6111ed9b (diff)
v2.1.1v2.1.1
* (Add) About box: Primary screen identifier and open on screen identifier * (Add) Calibrator - External tests * (Change) Rewrite 'Action - Import Layer(s)' to support file formats and add the followig importation types: * **Insert:** Insert layers. (Requires images with bounds equal or less than file resolution) * **Replace:** Replace layers. (Requires images with bounds equal or less than file resolution) * **Stack:** Stack layers content. (Requires images with bounds equal or less than file resolution) * **Merge:** Merge/Sum layers content. (Requires images with same resolution) * **Subtract:** Subtract layers content. (Requires images with same resolution) * **BitwiseAnd:** Perform a 'bitwise and' operation over layer pixels. (Requires images with same resolution) * **BitwiseOr:** Perform a 'bitwise or' operation over layer pixels. (Requires images with same resolution) * **BitwiseXOr:** Perform a 'bitwise xor' operation over layer pixels. (Requires images with same resolution) * (Change) Icon for Tool - Raft Relief * (Change) Windows and dialogs max size are now calculated to where window is opened instead of use the primary or first screen all the time
Diffstat (limited to 'UVtools.Core/Extensions/EmguExtensions.cs')
-rw-r--r--UVtools.Core/Extensions/EmguExtensions.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/UVtools.Core/Extensions/EmguExtensions.cs b/UVtools.Core/Extensions/EmguExtensions.cs
index a48a5c7..42db640 100644
--- a/UVtools.Core/Extensions/EmguExtensions.cs
+++ b/UVtools.Core/Extensions/EmguExtensions.cs
@@ -255,5 +255,16 @@ namespace UVtools.Core.Extensions
return mat;
}
+ public static Mat RoiFromCenter(this Mat mat, Size size)
+ {
+ if (size == mat.Size) return mat;
+ return new Mat(mat, new Rectangle(
+ mat.Size.Width / 2 - size.Width / 2,
+ mat.Size.Height / 2 - size.Height / 2,
+ size.Width,
+ size.Height
+ ));
+ }
+
}
}