This package is an improved version of x/image/tiff featuring:
- Read support for CCITT Group3/4 compressed images using x/image/ccitt
- Read/write support for LZW compressed images using github.com/hhrutter/lzw
- Read/write support for the CMYK color model.
Working on pdfcpu (a PDF processor) created a need for processing TIFF files and LZW compression in details beyond the standard library.
-
CCITT compression for monochrome images was the first need. This is being addressed as part of ongoing work on x/image/ccitt.
-
As stated in this golang proposal Go LZW implementations are spread out over the standard library at compress/lzw and x/image/tiff/lzw. As of Go 1.12 compress/lzw works reliably for GIF only. This is also the reason the TIFF package at x/image/tiff provides its own lzw implementation for compression. With PDF there is a third variant of lzw needed for reading/writing lzw compressed PDF object streams and processing embedded TIFF images. github.com/hhrutter/lzw fills this gap. It is an extended version of compress/lzw supporting GIF, PDF and TIFF.
-
The PDF specification defines a CMYK color space. This is currently not supported at x/image/tiff.
An improved version of x/image/tiff with full read/write support for CCITT, LZW compression and the CMYK color model.