Tesseract.pix_read — Functionpix_read(
filename::AbstractString;
jpgLuminance::Bool = false,
jpgFailOnBadData::Bool = false
)::Union{Pix, Nothing}Load an image from from disk of an unspecified type. Returns nothing if the file could not be loaded.
Arguments:
| T | Name | Default | Description |
|---|---|---|---|
| R | filename | The filename of the image to load. | |
| O | jpgLuminance | false | If the image is a JPEG should we only load luminance data? |
| O | jpgFailOnBadData | false | If the image is a JPEG should we ignore bit errors? |
Details:
The two optional parameters are obviously ignored if the image is not a JPEG.
pix_read(
stream::IO
)::Union{Pix, Nothing}Load an image from from a stream. Returns nothing if the file could not be loaded.
Arguments:
| T | Name | Default | Description |
|---|---|---|---|
| R | stream | The stream to read the image from. |
Details:
This implementation mirrors the API provided by Leptonica when you pass in a FILE pointer. This assumes that the remainder of the stream contains an image, so the remainder of the stream will be read and decoded as an image.
pix_read(
data::AbstractArray{UInt8}
)::Union{Pix, Nothing}Load an image from from a byte array. Returns nothing if the file could not be loaded.
Arguments:
| T | Name | Default | Description |
|---|---|---|---|
| R | data | The byte array to read the image from. |