Documentation ¶
Overview ¶
Package ccitt implements a CCITT (fax) image decoder.
Index ¶
Constants ¶
const AutoDetectHeight = -1
AutoDetectHeight is passed as the height argument to NewReader to indicate that the image height (the number of rows) is not known in advance.
Variables ¶
This section is empty.
Functions ¶
func DecodeIntoGray ¶
DecodeIntoGray decodes the CCITT-formatted data in r into dst.
It returns an error if dst's width and height don't match the implied width and height of CCITT-formatted data.
func NewReader ¶
func NewReader(r io.Reader, order Order, sf SubFormat, width int, height int, opts *Options) io.Reader
NewReader returns an io.Reader that decodes the CCITT-formatted data in r. The resultant byte stream is one bit per pixel (MSB first), with 1 meaning white and 0 meaning black. Each row in the result is byte-aligned.
A negative height, such as passing AutoDetectHeight, means that the image height is not known in advance. A negative width is invalid.
Types ¶
type Options ¶
type Options struct { // Align means that some variable-bit-width codes are byte-aligned. Align bool // Invert means that black is the 1 bit or 0xFF byte, and white is 0. Invert bool }
Options are optional parameters.