docs/image-format.md
The main Tesseract.js functions (ex. recognize, detect) take an image parameter. The image formats and data types supported are listed below.
Support Image Formats: bmp, jpg, png, pbm, webp, gif [non-animated].
For browser and Node, supported data types are:
data:image\/([a-zA-Z]*);base64,([^"]*) regexp)For browser only, supported data types are:
File or Blob objectimg or canvas elementFor Node only, supported data types are:
Note: images must be a supported image format and a supported data type. For example, a buffer containing a png image is supported. A buffer containing raw pixel data is not supported.