Protect sigma from widths that cause it to become 0 (make 1 the minimal sigma)

This commit is contained in:
Jonathan Thomas
2025-03-13 13:25:27 -05:00
parent cd504394b6
commit 344dc4a4b9

View File

@@ -62,6 +62,8 @@ std::shared_ptr<openshot::Frame> Outline::GetFrame(std::shared_ptr<openshot::Fra
std::shared_ptr<QImage> frame_image = frame->GetImage();
int sigmaValue = widthValue / 3;
if (sigmaValue < 1)
sigmaValue = 1;
cv::Mat cv_image = QImageToBGRACvMat(frame_image);
// Extract alpha channel for the mask