zbar: Consistent fourcc across architectures

This commit is contained in:
tobtoht 2022-02-10 13:07:56 +01:00
parent 87b8d13a89
commit d26d25186d
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ QString QrCodeUtils::scanImage(const QImage &img) {
return "";
}
zbar::Image scanImg = zImg.convert(*(long*)"Y800");
zbar::Image scanImg = zImg.convert(zbar_fourcc('Y', '8', '0', '0'));
scanner.scan(scanImg);
QString result;

View file

@ -26,7 +26,7 @@ void QrScanThread::image_callback(zbar::Image &image)
void QrScanThread::processZImage(zbar::Image &image)
{
m_scanner.recycle_image(image);
zbar::Image tmp = image.convert(*(long*)"Y800");
zbar::Image tmp = image.convert(zbar_fourcc('Y', '8', '0', '0'));
m_scanner.scan(tmp);
image.set_symbols(tmp.get_symbols());
}