以下内容来自TIFF 6.0规范第9节:PackBits压缩
这就是算法的本质。以下是一些其他规则:
第一个和第三个项目很容易理解,但我特别对第二个项目感到困惑:每行的未压缩字节数被定义为(ImageWidth + 7)/ 8.这不仅仅是真的1位双层图像。但据我所知,packbits是一种面向字节的压缩算法,它可以用于任何类型的tiff。
知道tiff和packbits的人能给我一些提示吗?
答案 0 :(得分:2)
此网站的TIFF文档:http://www.fileformat.info/format/tiff/corion-packbits.htm 在顶部有以下内容:
Abstract
This document describes a simple compression scheme for bilevel
scanned and paint type files.
Motivation
The TIFF specification defines a number of compression schemes.
Compression type 1 is really no compression, other than basic
pixel packing. Compression type 2, based on CCITT 1D
compression, is powerful, but not trivial to implement.
Compression type 5 is typically very effective for most bilevel
images, as well as many deeper images such as palette color and
grayscale images, but is also not trivial to implement. PackBits
is a simple but often effective alternative
因此很明显,附加规则与双层图像有关。出于某种原因,TIFF6.0的pdf版本中缺少上述摘要和描述。