ccitt

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CCITTDecoder

type CCITTDecoder struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(src io.ByteReader, params CCITTParams) (*CCITTDecoder, error)

NewReader return a ready to use Reader, decoding the CCITT `src`. 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 zero height, means that the image height is not known in advance. In thise case, EndOfBlock must be true.

func (*CCITTDecoder) Read

func (st *CCITTDecoder) Read(p []byte) (int, error)

func (*CCITTDecoder) ReadByte

func (st *CCITTDecoder) ReadByte() (byte, error)

type CCITTParams

type CCITTParams struct {
	Encoding                                int32 // K parameter
	Columns, Rows                           int32
	EndOfBlock, EndOfLine, ByteAlign, Black bool
}

CCITTParams holds the parameters of an encoded CCITT input. `DamagedRowsBeforeError` is not supported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL