diff --git a/src/qrcode_scanner/QrCodeUtils.cpp b/src/qrcode_scanner/QrCodeUtils.cpp index 9fc3e9b..1efe489 100644 --- a/src/qrcode_scanner/QrCodeUtils.cpp +++ b/src/qrcode_scanner/QrCodeUtils.cpp @@ -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; diff --git a/src/qrcode_scanner/QrScanThread.cpp b/src/qrcode_scanner/QrScanThread.cpp index c39d67e..3b3db0a 100644 --- a/src/qrcode_scanner/QrScanThread.cpp +++ b/src/qrcode_scanner/QrScanThread.cpp @@ -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()); }