title: Only tesseract.js can extract the text from an image and other libraries cant
body: <p>so I came across this weird &quot;issue&quot;. I wrote a program in C# and JS to extract the numbers from an image, however only the JS code, which uses the tesseract.js library can successfully get the text. The image given to both programs are identical and they both use the same model. I took the model from the Tesseract.JS GitHub to ensure they were both using the same models. The model can be found <a href="https://github.com/naptha/tesseract.js/blob/master/tests/assets/traineddata/eng.traineddata" rel="nofollow noreferrer">here</a></p>
  <p>I presumed that the tesseract.js library may be altering the image in some way, so I looked through the source code and didn't manage to find anything.</p>
  <p>Js Library: Tesseract.JS</p>
  <p>C# library: Tesseract.Net.SDK</p>
  <p>Image I used:</p>
  <p><a href="https://i.stack.imgur.com/SSUwe.png" rel="nofollow noreferrer">Here is the image I gave each program</a></p>
  <p>C# code:</p>
  <pre><code>using var objOcr = OcrApi.Create();
  
  objOcr.SetVariable(&quot;tessedit_char_whitelist&quot;, &quot;0123456789&quot;);
  
  objOcr.Init(Patagames.Ocr.Enums.Languages.English);
  
  Bitmap image= new Bitmap(&quot;image.png&quot;)
  var text = objOcr.GetTextFromImage(image);
  </code></pre>
  <p>JS code:</p>
  <pre><code>import Tesseract from 'tesseract.js';
  
  Tesseract.recognize(
    'image.png',
    'eng',
    { logger: m =&gt; console.log(m) }
  ).then(({ data: { text } }) =&gt; {
   console.log(text);
  })
  </code></pre>