mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
Update ocr.h
Fix minimum image size validation in ocr_extract_text
This commit is contained in:
parent
94a5e0ac59
commit
cd2a44e016
2
third-party/libscan/libscan/ocr/ocr.h
vendored
2
third-party/libscan/libscan/ocr/ocr.h
vendored
@ -19,7 +19,7 @@ ocr_extract_text(const char *tesseract_path, const char *tesseract_lang,
|
|||||||
const int img_bpp, const int img_stride, const int img_xres,
|
const int img_bpp, const int img_stride, const int img_xres,
|
||||||
const ocr_extract_callback_t cb) {
|
const ocr_extract_callback_t cb) {
|
||||||
|
|
||||||
if (img_h <= MIN_OCR_SIZE || img_h <= MIN_OCR_SIZE || img_xres <= 0 ||
|
if (img_w <= MIN_OCR_SIZE || img_h <= MIN_OCR_SIZE || img_xres <= 0 ||
|
||||||
!OCR_IS_VALID_BPP(img_bpp)) {
|
!OCR_IS_VALID_BPP(img_bpp)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user