Compare commits
3 Commits
master
...
feat/worke
Author | SHA1 | Date |
---|---|---|
Your Name | 0a4b4d77af | 2 years ago |
Your Name | 2a874bfc37 | 2 years ago |
Your Name | 37ed99a130 | 2 years ago |
24 changed files with 5975 additions and 12551 deletions
@ -1,18 +1,17 @@
@@ -1,18 +1,17 @@
|
||||
# Image Format |
||||
|
||||
The main Tesseract.js functions (ex. recognize, detect) take an `image` parameter. The image formats and data types supported are listed below. |
||||
Support Format: **bmp, jpg, png, pbm** |
||||
|
||||
Support Image Formats: **bmp, jpg, png, pbm, webp** |
||||
The main Tesseract.js functions (ex. recognize, detect) take an `image` parameter, which should be something that is like an image. What's considered "image-like" differs depending on whether it is being run from the browser or through NodeJS. |
||||
|
||||
For browser and Node, supported data types are: |
||||
- string with base64 encoded image (fits `data:image\/([a-zA-Z]*);base64,([^"]*)` regexp) |
||||
- buffer |
||||
On a browser, an image can be: |
||||
- an `img`, `video`, or `canvas` element |
||||
- a `File` object (from a file `<input>`) |
||||
- a `Blob` object |
||||
- a path or URL to an accessible image |
||||
- a base64 encoded image fits `data:image\/([a-zA-Z]*);base64,([^"]*)` regexp |
||||
|
||||
For browser only, supported data types are: |
||||
- `File` or `Blob` object |
||||
- `img` or `canvas` element |
||||
|
||||
For Node only, supported data types are: |
||||
- string containing a path to local image |
||||
|
||||
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. |
||||
In Node.js, an image can be |
||||
- a path to a local image |
||||
- a Buffer storing binary image |
||||
- a base64 encoded image fits `data:image\/([a-zA-Z]*);base64,([^"]*)` regexp |
||||
|
@ -1,13 +0,0 @@
@@ -1,13 +0,0 @@
|
||||
import commonjs from "@rollup/plugin-commonjs"; |
||||
|
||||
export default [ |
||||
{ |
||||
input: "dist/tesseract.min.js", |
||||
output: { |
||||
file: "dist/tesseract.esm.min.js", |
||||
format: "esm", |
||||
banner: "/* eslint-disable */", |
||||
}, |
||||
plugins: [commonjs()], |
||||
}, |
||||
]; |
Before Width: | Height: | Size: 1011 B |
Before Width: | Height: | Size: 3.7 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue