title: Tesseract use image from byte array
body: <p>I have an image file that was read into byte array and I'm trying to process it through Tesseract:</p>
  
  <pre><code>using (TesseractEngine engine = new TesseractEngine(@"tessdata", "eng", EngineMode.Default))
    using (MemoryStream ms = new MemoryStream(imgByteArray))
    {
      Bitmap bmp = new Bitmap(ms)
      using (Pix img = PixConverter.ToPix(bmp))
        using (Page page = engine.Process(img, PageSegMode.Auto))
    }
  </code></pre>
  
  <p>Is there a better way to do it?</p>
  
  <p>Then I try to do it with the same image through file path:</p>
  
  <pre><code>using (TesseractEngine engine = new TesseractEngine(@"tessdata", "eng", EngineMode.Default))
    using (Pix img = Pix.LoadFromFile(@"C:\img1.png"))
      using (Page page = engine.Process(img, PageSegMode.Auto))
  </code></pre>
  
  <p>The second one gives much better results.
  How can I use the byte array and get the same results?
  In my application I can't work with file paths.</p>