mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-22 18:17:25 -05:00
Fix exact image match not wokring when using images with alpha channel
The screenshots taken from video sources were using the image format Format_RGBX8888 instead of Format_RGBA8888. The alpha channel of screenshots taken from OBS would be blended with a black background while this step would be not performed for files loaded to macht match the video sources.
This commit is contained in:
parent
b2da8faf37
commit
254eabfa8d
|
|
@ -222,13 +222,8 @@ bool MacroConditionVideo::LoadImageFromFile()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (_condition == VideoCondition::PATTERN && _useAlphaAsMask) {
|
||||
_matchImage = _matchImage.convertToFormat(
|
||||
QImage::Format::Format_RGBA8888);
|
||||
} else {
|
||||
_matchImage = _matchImage.convertToFormat(
|
||||
QImage::Format::Format_RGBX8888);
|
||||
}
|
||||
_matchImage =
|
||||
_matchImage.convertToFormat(QImage::Format::Format_RGBA8888);
|
||||
_patternData = createPatternData(_matchImage);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ void AdvSSScreenshotObj::Copy()
|
|||
uint8_t *videoData = nullptr;
|
||||
uint32_t videoLinesize = 0;
|
||||
|
||||
image = QImage(cx, cy, QImage::Format::Format_RGBX8888);
|
||||
image = QImage(cx, cy, QImage::Format::Format_RGBA8888);
|
||||
|
||||
if (gs_stagesurface_map(stagesurf, &videoData, &videoLinesize)) {
|
||||
int linesize = image.bytesPerLine();
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ bool VideoSwitch::loadImageFromFile()
|
|||
return false;
|
||||
}
|
||||
matchImage =
|
||||
matchImage.convertToFormat(QImage::Format::Format_RGBX8888);
|
||||
matchImage.convertToFormat(QImage::Format::Format_RGBA8888);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user