Skip to content

Commit

Permalink
Only if OCR language is english then use OCR Engine 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaex committed Jan 11, 2022
1 parent bc24ec9 commit 15f8642
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ShareX.UploadersLib/OtherServices/OCRSpace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ public static string DoOCR(OCRSpaceLanguages language, Stream stream, string fil

try
{
bool useOCREngine2 = language.HasFlagAny(OCRSpaceLanguages.eng, OCRSpaceLanguages.ger, OCRSpaceLanguages.fre);

OCRSpace ocr = new OCRSpace(APIKeys.OCRSpaceAPIKey, language, false, useOCREngine2);
OCRSpace ocr = new OCRSpace(APIKeys.OCRSpaceAPIKey, language, false, language == OCRSpaceLanguages.eng);
OCRSpaceResponse response = ocr.DoOCR(stream, fileName);

if (response != null && !response.IsErroredOnProcessing && response.ParsedResults.Count > 0)
Expand Down

0 comments on commit 15f8642

Please sign in to comment.