1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
| export enum TiffTagCodeEnum { NewSubfileType = 254, ImageWidth = 256, ImageLength = 257, BitsPerSample = 258, Compression = 259, PhotometricInterpretation = 262, Threshholding = 263, FillOrder = 266, ImageDescription = 270, Make = 271, Model = 272, StripOffsets = 273, Orientation = 274, SamplesPerPixel = 277, RowsPerStrip = 278, StripByteCounts = 279, XResolution = 282, YResolution = 283, PlanarConfiguration = 284, ResolutionUnit = 296, Software = 305, DateTime = 306, Artist = 315, ColorMap = 320, TileWidth = 322, TileLength = 323, TileOffsets = 324, TileByteCounts = 325, SubIFDs = 330, ExtraSamples = 338, JPEGTables = 347, GlobalParametersIFD = 400, YCbCrCoefficients = 529, YCbCrSubSampling = 530, YCbCrPositioning = 531, Copyright = 33432, }
export const tiffTagCodeMap = new Map< TiffTagCodeEnum, { tagName: TiffTagName description: string } >() .set(TiffTagCodeEnum.NewSubfileType, { tagName: 'NewSubfileType', description: '此子文件中包含的数据类型的一般指示,替换SubfileType,在TIFF文件中有多个子文件时有用', }) .set(TiffTagCodeEnum.ImageWidth, { tagName: 'ImageWidth', description: '图像宽度', })
.set(TiffTagCodeEnum.ImageLength, { tagName: 'ImageLength', description: '图像长度', }) .set(TiffTagCodeEnum.BitsPerSample, { tagName: 'BitsPerSample', description: '每样本位数', })
.set(TiffTagCodeEnum.Compression, { tagName: 'Compression', description: '压缩', }) .set(TiffTagCodeEnum.PhotometricInterpretation, { tagName: 'PhotometricInterpretation', description: '光度解释', }) .set(TiffTagCodeEnum.Threshholding, { tagName: 'Threshholding', description: '对于表示灰度阴影的黑白 TIFF 文件,该技术用于将灰色像素转换为黑白像素。', }) .set(TiffTagCodeEnum.FillOrder, { tagName: 'FillOrder', description: '填充顺序,默认为1,且通常不会使用2', })
.set(TiffTagCodeEnum.ImageDescription, { tagName: 'ImageDescription', description: '描述图像主题的字符串。', }) .set(TiffTagCodeEnum.Make, { tagName: 'Make', description: '扫描仪制造商。', }) .set(TiffTagCodeEnum.Model, { tagName: 'Model', description: '扫描仪型号名称或编号。', })
.set(TiffTagCodeEnum.StripOffsets, { tagName: 'StripOffsets', description: '条带偏移', }) .set(TiffTagCodeEnum.Orientation, { tagName: 'Orientation', description: '图像相对于行和列的方向。', }) .set(TiffTagCodeEnum.SamplesPerPixel, { tagName: 'SamplesPerPixel', description: '每个像素的组件数。(分向量数),比如rgb图像,一个像素有3个组件,分别代表r、g、b', }) .set(TiffTagCodeEnum.RowsPerStrip, { tagName: 'RowsPerStrip', description: '每条行数', })
.set(TiffTagCodeEnum.StripByteCounts, { tagName: 'StripByteCounts', description: '条带字节计数', }) .set(TiffTagCodeEnum.XResolution, { tagName: 'XResolution', description: 'X分辨率', }) .set(TiffTagCodeEnum.YResolution, { tagName: 'YResolution', description: 'Y分辨率', })
.set(TiffTagCodeEnum.PlanarConfiguration, { tagName: 'PlanarConfiguration', description: '每个像素的分量是如何存储的。默认为1,PlanarConfiguration = 2未广泛支持。', }) .set(TiffTagCodeEnum.ResolutionUnit, { tagName: 'ResolutionUnit', description: '分辨率单位', }) .set(TiffTagCodeEnum.Software, { tagName: 'Software', description: '用于创建映像的软件包的名称和版本号。', }) .set(TiffTagCodeEnum.DateTime, { tagName: 'DateTime', description: '图像创建的日期和时间。', }) .set(TiffTagCodeEnum.Artist, { tagName: 'Artist', description: '创建图像的人。', }) .set(TiffTagCodeEnum.ColorMap, { tagName: 'ColorMap', description: '调色板颜色图像的颜色图。', })
.set(TiffTagCodeEnum.TileWidth, { tagName: 'TileWidth', description: '瓦片图的宽', }) .set(TiffTagCodeEnum.TileLength, { tagName: 'TileLength', description: '瓦片图的高', }) .set(TiffTagCodeEnum.TileOffsets, { tagName: 'TileOffsets', description: '瓦片图的偏移量-大数组', }) .set(TiffTagCodeEnum.TileByteCounts, { tagName: 'TileByteCounts', description: '每张瓦片图的字节数-大数组', })
.set(TiffTagCodeEnum.SubIFDs, { tagName: 'SubIFDs', description: '子IFD', })
.set(TiffTagCodeEnum.ExtraSamples, { tagName: 'ExtraSamples', description: '额外组件的描述。', }) .set(TiffTagCodeEnum.JPEGTables, { tagName: 'JPEGTables', description: 'JPEG 量化和/或霍夫曼表。', }) .set(TiffTagCodeEnum.GlobalParametersIFD, { tagName: 'GlobalParametersIFD', description: '指向包含全局适用于完整 TIFF 文件的标签的 IFD。对于全局TIFF图像IFD中都适用的字段集,如果有,最好在第一个IFD中', })
.set(TiffTagCodeEnum.YCbCrCoefficients, { tagName: 'YCbCrCoefficients', description: '从 RGB 到 YCbCr 图像数据的转换。', }) .set(TiffTagCodeEnum.YCbCrSubSampling, { tagName: 'YCbCrSubSampling', description: '指定用于 YCbCr 图像的色度分量的子采样因子。', }) .set(TiffTagCodeEnum.YCbCrPositioning, { tagName: 'YCbCrPositioning', description: '指定子采样色度分量相对于亮度样本的位置。', })
.set(TiffTagCodeEnum.Copyright, { tagName: 'Copyright', description: '版权声明。', })
|