You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed crashing problem and added cut compatibility with opencv effects
This commit is contained in:
@@ -948,7 +948,7 @@ cv::Mat Frame::GetImageCV()
|
||||
// Fill with black
|
||||
AddColor(width, height, color);
|
||||
|
||||
//if (imagecv.empty())
|
||||
// if (imagecv.empty())
|
||||
// Convert Qimage to Mat
|
||||
imagecv = Qimage2mat(image);
|
||||
|
||||
@@ -958,7 +958,9 @@ cv::Mat Frame::GetImageCV()
|
||||
std::shared_ptr<QImage> Frame::Mat2Qimage(cv::Mat img){
|
||||
cv::cvtColor(img, img, cv::COLOR_BGR2RGB);
|
||||
QImage qimg((uchar*) img.data, img.cols, img.rows, img.step, QImage::Format_RGB888);
|
||||
|
||||
std::shared_ptr<QImage> imgIn = std::make_shared<QImage>(qimg.copy());
|
||||
|
||||
// Always convert to RGBA8888 (if different)
|
||||
if (imgIn->format() != QImage::Format_RGBA8888)
|
||||
*imgIn = imgIn->convertToFormat(QImage::Format_RGBA8888);
|
||||
|
||||
Reference in New Issue
Block a user