Documentation ¶
Overview ¶
Package tiff is an enhanced version of x/image/tiff.
It uses a consolidated version of compress/lzw (https://github.com/jplu/pdfcpu/tree/master/lzw) for compression and also adds support for CMYK.
More information: https://github.com/jplu/pdfcpu/tree/master/tiff
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode reads a TIFF image from r and returns it as an image.Image. The type of Image returned depends on the contents of the TIFF.
func DecodeConfig ¶
DecodeConfig returns the color model and dimensions of a TIFF image without decoding the entire image.
Types ¶
type CompressionType ¶
type CompressionType int
CompressionType describes the type of compression used in Options.
const ( Uncompressed CompressionType = iota Deflate LZW CCITTGroup3 CCITTGroup4 )
Constants for supported compression types.
type FormatError ¶
type FormatError string
A FormatError reports that the input is not a valid TIFF image.
func (FormatError) Error ¶
func (e FormatError) Error() string
type Options ¶
type Options struct { // Compression is the type of compression used. Compression CompressionType // Predictor determines whether a differencing predictor is used; // if true, instead of each pixel's color, the color difference to the // preceding one is saved. This improves the compression for certain // types of images and compressors. For example, it works well for // photos with Deflate compression. Predictor bool }
Options are the encoding parameters.
type UnsupportedError ¶
type UnsupportedError string
An UnsupportedError reports that the input uses a valid but unimplemented feature.
func (UnsupportedError) Error ¶
func (e UnsupportedError) Error() string