Fix incorrect crop resets

This commit is contained in:
Tamius Han 2019-10-29 18:15:10 +01:00
parent 1c4c4d5652
commit 18f0c7540b

View File

@ -696,14 +696,16 @@ class ArDetector {
} catch (e) { } catch (e) {
// edges weren't gucci, so we'll just reset // edges weren't gucci, so we'll just reset
// the aspect ratio to defaults // the aspect ratio to defaults
try { this.logger.log('error', 'arDetect', `%c[ArDetect::frameCheck] There was a problem setting blackbar. Doing nothing. Error:`, e);
this.guardline.reset(); this.guardline.reset();
} catch (e) { // WE DO NOT RESET ASPECT RATIO HERE IN CASE OF PROBLEMS, CAUSES UNWARRANTED RESETS:
// guardline wasn't gucci either, but we'll just ignore // (eg. here: https://www.youtube.com/watch?v=nw5Z93Yt-UQ&t=410)
// that and reset the aspect ratio anyway //
} // this.conf.resizer.setAr({type: AspectRatio.Automatic, ratio: this.getDefaultAr()});
this.conf.resizer.setAr({type: AspectRatio.Automatic, ratio: this.getDefaultAr()});
} }
this.clearImageData(imageData);
} }
resetBlackLevel(){ resetBlackLevel(){