From 65509ea2a0808389a07a446f2df1cadb16d97dbc Mon Sep 17 00:00:00 2001
From: C3032 <C3032@BC3032>
Date: 星期二, 30 十二月 2025 16:36:05 +0800
Subject: [PATCH] Merge branch 'master' into feature/HR_Camera

---
 LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs b/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs
index 70d13aa..b3701a6 100644
--- a/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs
+++ b/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs
@@ -53,36 +53,27 @@
             get
             {
                 if (Subject == null)
-                {
                     return null;
-                }
                 return Subject.InputImage;
             }
             set
             {
                 Subject.InputImage = value;
+
                 if (InputImage == null)
-                {
                     return;
-                }
 
                 if (InputImage is HObject)
-                {
                     inputImageHSmartWindowControl.ShowHoImage((HObject)value);
-                }
                 else if (InputImage is Bitmap)
                 {
-                    using (HImage image = TAlgorithm.Bitmap2HObject((Bitmap)value))
-                    {
-                        inputImageHSmartWindowControl.ShowHoImage(image);
-                    }
+                    TAlgorithm.Bitmap2HObject((Bitmap)value, out HObject image);
+                    inputImageHSmartWindowControl.ShowHoImage(image);
                 }
                 else if (InputImage is Mat)
                 {
-                    using (HImage image = TAlgorithm.Mat2HObject((Mat)value))
-                    {
-                        inputImageHSmartWindowControl.ShowHoImage(image);
-                    }
+                    TAlgorithm.Mat2HObject((Mat)value, out HObject image);
+                    inputImageHSmartWindowControl.ShowHoImage(image);
                 }
             }
         }

--
Gitblit v1.9.3