mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-16 21:06:43 +00:00
The suggestion of max resolution 999x999 per image got embedded in the standard decoding function. If image is bigger, it will be resized by default.
This commit is contained in:
parent
098f495449
commit
f1f7013621
@ -194,7 +194,7 @@ QString QZXing::decodeImage(const QImage &image, int maxWidth, int maxHeight, bo
|
|||||||
if ((maxWidth > 0) || (maxHeight > 0))
|
if ((maxWidth > 0) || (maxHeight > 0))
|
||||||
ciw = CameraImageWrapper::Factory(image, maxWidth, maxHeight, smoothTransformation);
|
ciw = CameraImageWrapper::Factory(image, maxWidth, maxHeight, smoothTransformation);
|
||||||
else
|
else
|
||||||
ciw = new CameraImageWrapper(image);
|
ciw = CameraImageWrapper::Factory(image, 999, 999, true);
|
||||||
|
|
||||||
Ref<LuminanceSource> imageRef(ciw);
|
Ref<LuminanceSource> imageRef(ciw);
|
||||||
GlobalHistogramBinarizer *binz = new GlobalHistogramBinarizer(imageRef);
|
GlobalHistogramBinarizer *binz = new GlobalHistogramBinarizer(imageRef);
|
||||||
|
@ -51,7 +51,7 @@ std::shared_ptr<ValidationStats> DecodeValidator::testDecodeWithExpectedOutput(Q
|
|||||||
|
|
||||||
decoder.setDecoder(enabledDecoder);
|
decoder.setDecoder(enabledDecoder);
|
||||||
|
|
||||||
QString result = decoder.decodeImage(imageToDecode, 999, 999, true);
|
QString result = decoder.decodeImage(imageToDecode);
|
||||||
|
|
||||||
stats_->setElaspedTime(decoder.getProcessTimeOfLastDecoding());
|
stats_->setElaspedTime(decoder.getProcessTimeOfLastDecoding());
|
||||||
stats_->setOperationSuccess(result != "");
|
stats_->setOperationSuccess(result != "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user