Ver Fonte

Fix alignment HTTP blocking and publish complete ROI JPEG snapshots

SybexXx há 1 dia atrás
pai
commit
29af21fc5d

+ 6 - 2
code/components/jomjol_flowcontroll/ClassFlowWebhook.cpp

@@ -169,8 +169,12 @@ bool ClassFlowWebhook::doFlow(string zwtime)
         bool numbersWithError = WebhookPublish(flowpostprocessing->GetNumbers());
         bool numbersWithError = WebhookPublish(flowpostprocessing->GetNumbers());
 
 
         #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
         #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
-            if ((WebhookUploadImg == 1 || (WebhookUploadImg != 0 && numbersWithError)) && flowAlignment && flowAlignment->AlgROI) {
-                WebhookUploadPic(flowAlignment->AlgROI);
+            if ((WebhookUploadImg == 1 || (WebhookUploadImg != 0 && numbersWithError)) && flowAlignment) {
+                ImageData *roiImage = flowAlignment->GetAlgROICopy();
+                if (roiImage != NULL) {
+                    WebhookUploadPic(roiImage);
+                    delete roiImage;
+                }
             }
             }
         #endif
         #endif
     }
     }