ccittfax

package
v0.0.0-...-fc0e231 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: AGPL-3.0, AGPL-3.0-only Imports: 2 Imported by: 0

Documentation

Overview

Package ccittfax defines and implements the Group3 and Group4 facsimile (fax) encoding and decoding according to the CCITT recommendations T.4 and T.6.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct {
	K                      int
	EndOfLine              bool
	EncodedByteAlign       bool
	Columns                int
	Rows                   int
	EndOfBlock             bool
	BlackIs1               bool
	DamagedRowsBeforeError int
}

Encoder implements a CCITT facsimile (fax) Group3 and Group4 encoding/decoding algorithms.

func (*Encoder) Decode

func (e *Encoder) Decode(encoded []byte) ([][]byte, error)

Decode performs decoding operation on the encoded image using the Group3 or Group4 CCITT facsimile (fax) algorithm.

func (*Encoder) Encode

func (e *Encoder) Encode(pixels [][]byte) []byte

Encode encodes the original image pixels. Note: `pixels` here are the pixels of the image where each byte value is 1 for white pixels and 0 for the black ones.

Jump to

Keyboard shortcuts

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