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:
favoritas37 2016-01-24 03:19:51 +02:00
parent 098f495449
commit f1f7013621
2 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ QString QZXing::decodeImage(const QImage &image, int maxWidth, int maxHeight, bo
if ((maxWidth > 0) || (maxHeight > 0))
ciw = CameraImageWrapper::Factory(image, maxWidth, maxHeight, smoothTransformation);
else
ciw = new CameraImageWrapper(image);
ciw = CameraImageWrapper::Factory(image, 999, 999, true);
Ref<LuminanceSource> imageRef(ciw);
GlobalHistogramBinarizer *binz = new GlobalHistogramBinarizer(imageRef);

View File

@ -51,7 +51,7 @@ std::shared_ptr<ValidationStats> DecodeValidator::testDecodeWithExpectedOutput(Q
decoder.setDecoder(enabledDecoder);
QString result = decoder.decodeImage(imageToDecode, 999, 999, true);
QString result = decoder.decodeImage(imageToDecode);
stats_->setElaspedTime(decoder.getProcessTimeOfLastDecoding());
stats_->setOperationSuccess(result != "");