⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tiff.txt

📁 这是tiff文件格式的说明
💻 TXT
📖 第 1 页 / 共 2 页
字号:

********************************************************************
ExtraSamples	每个像素的额外组成
Tag	=	338
Type	=	SHORT
N	=	m

Value=0		未指定数据
Value=1		与Alpha通道有关
Value=2		与Alpha通道无关

********************************************************************
FillOrder	每字节的数据,其位的排列方式
Tag	=	266
Type	=	SHORT
N	=	1

Value=1		从左到右
Value=2		从右到左

********************************************************************
FreeByteCounts	每个未使用块在文件中的字节数
Tag	=	289
Type	=	LONG

********************************************************************
FreeOffsets	每个未使用块在文件中的偏移量
Tag	=	288
Type	=	LONG

********************************************************************
GrayResponseCurve	灰度响应曲线
Tag	=	291
Type	=	SHORT
N	=	2**BitsPerSample

********************************************************************
GrayResponseUnit	灰度响应曲线的单位
Tag	=	290
Type	=	SHORT
N	=	1
DefaultValue=2

Value=1		1/10
Value=2		1/100
Value=3		1/1000
Value=4		1/10000
Value=5		1/100000

********************************************************************
HostComputer	制作此图像的计算机及其操作系统
Tag	=	316
Type	=	ASCII

********************************************************************
ImageDescription
Tag	=	270
Type	=	ASCII

********************************************************************
ImageLength		图像的高度(像素为单位)
Tag	=	257
Type	=	SHORT/LONG
N	=	1

********************************************************************
ImageWidth		图像的宽度(像素为单位)
Tag	=	256
Type	=	SHORT/LONG
N	=	1

********************************************************************
Make
Tag	=	271
Type	=	ASCII

********************************************************************
MaxSampleValue		最大取样值
Tag	=	281
Type	=	SHORT
N	=	SamplePerPixel
DefaultValue=(2**BitsPerSample)-1

********************************************************************
MinSampleValue		最小取样值
Tag	=	280
Type	=	SHORT
N	=	SamplePerPixel
DefaultValue=0

********************************************************************
Model		扫描仪的型号
Tag	=	272
Type	=	ASCII
N	=	根据内容来定

********************************************************************
NewSubfileType		图像形态
Tag	=	254
Type	=	LONG
N	=	1

Value=1		表示一幅全分辨率的图像
Value=2		表示一幅降低分辨率后的图像
Value=3		表示一幅多页图像中的一页
Value=4		表示一幅透明混迭(Transparency mask)图像

********************************************************************
Orientation	图像行列的编排方向
Tag	=	274
Type	=	SHORT
N	=	1
DefaultValue=1

Value=1		1行在上方,1列在左方
Value=2		1行在上方,1列在右方
Value=3		1行在下方,1列在右方
Value=4		1行在下方,1列在左方
Value=5		1行在左方,1列在上方
Value=6		1行在右方,1列在上方
Value=7		1行在右方,1列在下方
Value=8		1行在左方,1列在下方


********************************************************************
PhotometricInterpretation	图像所采用的色彩系统
Tag	=	262
Type	=	SHORT
N	=	1

Value=0		对黑白及灰度图像而言,0为白色
Value=1		对黑白及灰度图像而言,0为黑色
Value=2		图像数据以R,G,B的方式存储
Value=3		图像数据采用调色板索引
Value=4		单色的透明混迭图像
Value=5		图像数据以C,M,Y,K的方式存储
Value=6		图像数据以Y,Cb,Cr的方式存储
Value=8		图像以L*,a*,b*的方式存储

********************************************************************
PlanarConfiguration	图像数据的平面排列方式
Tag	=	284
Type	=	SHORT
N	=	1
DefaultValue=1

Value=1		单平面格式
Value=2		多平面格式


********************************************************************
ResolutionUnit		图像的分辨率单位
Tag	=	296
Type	=	SHORT
N	=	1
DefaultValue=2

Value=1		没有指定单位
Value=2		英寸为单位
Value=3		厘米为单位

********************************************************************
RowsPerStrip	每个条状数据的图像行数
Tag	=	278
Type	=	SHORT/LONG
N	=	1

********************************************************************
SamplesPerPixel		每像素的取样数
Tag	=	277
Type	=	SHORT
N	=	1
DefaultValue=1

Value=1		表示是黑白,灰度或者调色板图像
Value=3		表示是RGB图像

********************************************************************
Software	生成图像的软件名称及版本号
Tag	=	305
Type	=	ASCII
N	=	根据内容来定

********************************************************************
StripByteCounts		每个条状数据在文件中的字节数
Tag	=	279
Type	=	SHORT/LONG
N	=	StripsPerImage		如果PlanarConfiguration=1
 	=StripsPerImage*SamplesPerPixel如果PlanarConfiguration=2
其中StripsPerImage不是标签(StripsPerImage=(ImageLength+RowPerStrip-1)/RowsPerStrip

********************************************************************
StripOffsets	每个条状数据在文件中的偏移量
Tag	=	273
Type	=	SHORT/LONG
N	=	StripsPerImage		如果PlanarConfiguration=1
	=StripsPerImage*SamplesPerPixel如果PlanarConfiguration=2
其中StripsPerImage不是标签(StripsPerImage=(ImageLength+RowPerStrip-1)/RowsPerStrip

********************************************************************
SubfileType		已经由NewSubfileType标签取代
Tag	=	255
Type	=	SHORT
N	=	1

********************************************************************
Threashholding		定义由非黑白图像变换至黑白图像的技术
Tag	=	263
Type	=	SHORT
N	=	1
DefaultValue=1

Value=1		未采用任何技术
Value=2		采用抖色(dither)或半色调(halftone)的技术
Value=3		采用误差扩散(error diffusion)技术


********************************************************************
XResolution	单位长度上的图像水平分辨率
Tag	=	282
Type	=	RATIONAL
N	=	1

********************************************************************
YResolution	单位长度上的图像垂直分辨率
Tag	=	283
Type	=	RATIONAL
N	=	1








压缩方法说明:
PackBits Compression
PackBits Compression 方法与Pcx图像文件中的压缩方法类似,编码原则
*图像数据是以字节为单位来进行编码
*每条扫描线必须分开压缩
*若遇到重复的图像数据,其长度值为iCount,则先存入数据长度值(iCount-1),然后再存入重复的图像数据。
*若遇到不重复的图像数据,其长度值为iCount,则先存入数据长度值(iCount-1),在存入不重复的图像数据。

假设一条扫描显得数据如下:
0x09 0x09 0x09 0x09 0x09 0x13 0xF9 0x 09 0x08 0x08 0x08
其编码结果为:
0xFC 0x09 0x02 0x13 0xF9 0x09 0xFE 0x08

*由于iCount的最大值仅能为128,所以如果(iCount>128),则必须分几次处理。
假设一条扫描线的数据为132*0x98,则其编码结果为
0x81 0x98 0xFD 0x98

由上可得,如果数据为压缩,该字节左第一位为1

PackBits解码的伪代码如下:


 变量 bytevar,iCount;

1.  读一字节数据到bytevar
2.  if(bytevar&0x80)
    {
      if(bytevar!=0x80)
      {
        iCount=-bytevar+1;
        读下一个字节并将其重复iCount次
      }
    }
    else
    {
      iCount=bytevar+1;
      直接读取iCount个字节的数据
    };

3.重复(1),(2)过程直至完成一行

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -