globals.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.geoKeys = exports.geoKeyNames = exports.LercAddCompression = exports.LercParameters = exports.ExtraSamplesValues = exports.photometricInterpretations = exports.fieldTypes = exports.fieldTypeNames = exports.arrayFields = exports.fieldTagTypes = exports.fieldTags = exports.fieldTagNames = void 0;
  4. exports.fieldTagNames = {
  5. // TIFF Baseline
  6. 0x013B: 'Artist',
  7. 0x0102: 'BitsPerSample',
  8. 0x0109: 'CellLength',
  9. 0x0108: 'CellWidth',
  10. 0x0140: 'ColorMap',
  11. 0x0103: 'Compression',
  12. 0x8298: 'Copyright',
  13. 0x0132: 'DateTime',
  14. 0x0152: 'ExtraSamples',
  15. 0x010A: 'FillOrder',
  16. 0x0121: 'FreeByteCounts',
  17. 0x0120: 'FreeOffsets',
  18. 0x0123: 'GrayResponseCurve',
  19. 0x0122: 'GrayResponseUnit',
  20. 0x013C: 'HostComputer',
  21. 0x010E: 'ImageDescription',
  22. 0x0101: 'ImageLength',
  23. 0x0100: 'ImageWidth',
  24. 0x010F: 'Make',
  25. 0x0119: 'MaxSampleValue',
  26. 0x0118: 'MinSampleValue',
  27. 0x0110: 'Model',
  28. 0x00FE: 'NewSubfileType',
  29. 0x0112: 'Orientation',
  30. 0x0106: 'PhotometricInterpretation',
  31. 0x011C: 'PlanarConfiguration',
  32. 0x0128: 'ResolutionUnit',
  33. 0x0116: 'RowsPerStrip',
  34. 0x0115: 'SamplesPerPixel',
  35. 0x0131: 'Software',
  36. 0x0117: 'StripByteCounts',
  37. 0x0111: 'StripOffsets',
  38. 0x00FF: 'SubfileType',
  39. 0x0107: 'Threshholding',
  40. 0x011A: 'XResolution',
  41. 0x011B: 'YResolution',
  42. // TIFF Extended
  43. 0x0146: 'BadFaxLines',
  44. 0x0147: 'CleanFaxData',
  45. 0x0157: 'ClipPath',
  46. 0x0148: 'ConsecutiveBadFaxLines',
  47. 0x01B1: 'Decode',
  48. 0x01B2: 'DefaultImageColor',
  49. 0x010D: 'DocumentName',
  50. 0x0150: 'DotRange',
  51. 0x0141: 'HalftoneHints',
  52. 0x015A: 'Indexed',
  53. 0x015B: 'JPEGTables',
  54. 0x011D: 'PageName',
  55. 0x0129: 'PageNumber',
  56. 0x013D: 'Predictor',
  57. 0x013F: 'PrimaryChromaticities',
  58. 0x0214: 'ReferenceBlackWhite',
  59. 0x0153: 'SampleFormat',
  60. 0x0154: 'SMinSampleValue',
  61. 0x0155: 'SMaxSampleValue',
  62. 0x022F: 'StripRowCounts',
  63. 0x014A: 'SubIFDs',
  64. 0x0124: 'T4Options',
  65. 0x0125: 'T6Options',
  66. 0x0145: 'TileByteCounts',
  67. 0x0143: 'TileLength',
  68. 0x0144: 'TileOffsets',
  69. 0x0142: 'TileWidth',
  70. 0x012D: 'TransferFunction',
  71. 0x013E: 'WhitePoint',
  72. 0x0158: 'XClipPathUnits',
  73. 0x011E: 'XPosition',
  74. 0x0211: 'YCbCrCoefficients',
  75. 0x0213: 'YCbCrPositioning',
  76. 0x0212: 'YCbCrSubSampling',
  77. 0x0159: 'YClipPathUnits',
  78. 0x011F: 'YPosition',
  79. // EXIF
  80. 0x9202: 'ApertureValue',
  81. 0xA001: 'ColorSpace',
  82. 0x9004: 'DateTimeDigitized',
  83. 0x9003: 'DateTimeOriginal',
  84. 0x8769: 'Exif IFD',
  85. 0x9000: 'ExifVersion',
  86. 0x829A: 'ExposureTime',
  87. 0xA300: 'FileSource',
  88. 0x9209: 'Flash',
  89. 0xA000: 'FlashpixVersion',
  90. 0x829D: 'FNumber',
  91. 0xA420: 'ImageUniqueID',
  92. 0x9208: 'LightSource',
  93. 0x927C: 'MakerNote',
  94. 0x9201: 'ShutterSpeedValue',
  95. 0x9286: 'UserComment',
  96. // IPTC
  97. 0x83BB: 'IPTC',
  98. // ICC
  99. 0x8773: 'ICC Profile',
  100. // XMP
  101. 0x02BC: 'XMP',
  102. // GDAL
  103. 0xA480: 'GDAL_METADATA',
  104. 0xA481: 'GDAL_NODATA',
  105. // Photoshop
  106. 0x8649: 'Photoshop',
  107. // GeoTiff
  108. 0x830E: 'ModelPixelScale',
  109. 0x8482: 'ModelTiepoint',
  110. 0x85D8: 'ModelTransformation',
  111. 0x87AF: 'GeoKeyDirectory',
  112. 0x87B0: 'GeoDoubleParams',
  113. 0x87B1: 'GeoAsciiParams',
  114. // LERC
  115. 0xC5F2: 'LercParameters',
  116. };
  117. exports.fieldTags = {};
  118. for (const key in exports.fieldTagNames) {
  119. if (exports.fieldTagNames.hasOwnProperty(key)) {
  120. exports.fieldTags[exports.fieldTagNames[key]] = parseInt(key, 10);
  121. }
  122. }
  123. exports.fieldTagTypes = {
  124. 256: 'SHORT',
  125. 257: 'SHORT',
  126. 258: 'SHORT',
  127. 259: 'SHORT',
  128. 262: 'SHORT',
  129. 273: 'LONG',
  130. 274: 'SHORT',
  131. 277: 'SHORT',
  132. 278: 'LONG',
  133. 279: 'LONG',
  134. 282: 'RATIONAL',
  135. 283: 'RATIONAL',
  136. 284: 'SHORT',
  137. 286: 'SHORT',
  138. 287: 'RATIONAL',
  139. 296: 'SHORT',
  140. 297: 'SHORT',
  141. 305: 'ASCII',
  142. 306: 'ASCII',
  143. 338: 'SHORT',
  144. 339: 'SHORT',
  145. 513: 'LONG',
  146. 514: 'LONG',
  147. 1024: 'SHORT',
  148. 1025: 'SHORT',
  149. 2048: 'SHORT',
  150. 2049: 'ASCII',
  151. 3072: 'SHORT',
  152. 3073: 'ASCII',
  153. 33550: 'DOUBLE',
  154. 33922: 'DOUBLE',
  155. 34665: 'LONG',
  156. 34735: 'SHORT',
  157. 34737: 'ASCII',
  158. 42113: 'ASCII',
  159. };
  160. exports.arrayFields = [
  161. exports.fieldTags.BitsPerSample,
  162. exports.fieldTags.ExtraSamples,
  163. exports.fieldTags.SampleFormat,
  164. exports.fieldTags.StripByteCounts,
  165. exports.fieldTags.StripOffsets,
  166. exports.fieldTags.StripRowCounts,
  167. exports.fieldTags.TileByteCounts,
  168. exports.fieldTags.TileOffsets,
  169. exports.fieldTags.SubIFDs,
  170. ];
  171. exports.fieldTypeNames = {
  172. 0x0001: 'BYTE',
  173. 0x0002: 'ASCII',
  174. 0x0003: 'SHORT',
  175. 0x0004: 'LONG',
  176. 0x0005: 'RATIONAL',
  177. 0x0006: 'SBYTE',
  178. 0x0007: 'UNDEFINED',
  179. 0x0008: 'SSHORT',
  180. 0x0009: 'SLONG',
  181. 0x000A: 'SRATIONAL',
  182. 0x000B: 'FLOAT',
  183. 0x000C: 'DOUBLE',
  184. // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html
  185. 0x000D: 'IFD',
  186. // introduced by BigTIFF
  187. 0x0010: 'LONG8',
  188. 0x0011: 'SLONG8',
  189. 0x0012: 'IFD8',
  190. };
  191. exports.fieldTypes = {};
  192. for (const key in exports.fieldTypeNames) {
  193. if (exports.fieldTypeNames.hasOwnProperty(key)) {
  194. exports.fieldTypes[exports.fieldTypeNames[key]] = parseInt(key, 10);
  195. }
  196. }
  197. exports.photometricInterpretations = {
  198. WhiteIsZero: 0,
  199. BlackIsZero: 1,
  200. RGB: 2,
  201. Palette: 3,
  202. TransparencyMask: 4,
  203. CMYK: 5,
  204. YCbCr: 6,
  205. CIELab: 8,
  206. ICCLab: 9,
  207. };
  208. exports.ExtraSamplesValues = {
  209. Unspecified: 0,
  210. Assocalpha: 1,
  211. Unassalpha: 2,
  212. };
  213. exports.LercParameters = {
  214. Version: 0,
  215. AddCompression: 1,
  216. };
  217. exports.LercAddCompression = {
  218. None: 0,
  219. Deflate: 1,
  220. };
  221. exports.geoKeyNames = {
  222. 1024: 'GTModelTypeGeoKey',
  223. 1025: 'GTRasterTypeGeoKey',
  224. 1026: 'GTCitationGeoKey',
  225. 2048: 'GeographicTypeGeoKey',
  226. 2049: 'GeogCitationGeoKey',
  227. 2050: 'GeogGeodeticDatumGeoKey',
  228. 2051: 'GeogPrimeMeridianGeoKey',
  229. 2052: 'GeogLinearUnitsGeoKey',
  230. 2053: 'GeogLinearUnitSizeGeoKey',
  231. 2054: 'GeogAngularUnitsGeoKey',
  232. 2055: 'GeogAngularUnitSizeGeoKey',
  233. 2056: 'GeogEllipsoidGeoKey',
  234. 2057: 'GeogSemiMajorAxisGeoKey',
  235. 2058: 'GeogSemiMinorAxisGeoKey',
  236. 2059: 'GeogInvFlatteningGeoKey',
  237. 2060: 'GeogAzimuthUnitsGeoKey',
  238. 2061: 'GeogPrimeMeridianLongGeoKey',
  239. 2062: 'GeogTOWGS84GeoKey',
  240. 3072: 'ProjectedCSTypeGeoKey',
  241. 3073: 'PCSCitationGeoKey',
  242. 3074: 'ProjectionGeoKey',
  243. 3075: 'ProjCoordTransGeoKey',
  244. 3076: 'ProjLinearUnitsGeoKey',
  245. 3077: 'ProjLinearUnitSizeGeoKey',
  246. 3078: 'ProjStdParallel1GeoKey',
  247. 3079: 'ProjStdParallel2GeoKey',
  248. 3080: 'ProjNatOriginLongGeoKey',
  249. 3081: 'ProjNatOriginLatGeoKey',
  250. 3082: 'ProjFalseEastingGeoKey',
  251. 3083: 'ProjFalseNorthingGeoKey',
  252. 3084: 'ProjFalseOriginLongGeoKey',
  253. 3085: 'ProjFalseOriginLatGeoKey',
  254. 3086: 'ProjFalseOriginEastingGeoKey',
  255. 3087: 'ProjFalseOriginNorthingGeoKey',
  256. 3088: 'ProjCenterLongGeoKey',
  257. 3089: 'ProjCenterLatGeoKey',
  258. 3090: 'ProjCenterEastingGeoKey',
  259. 3091: 'ProjCenterNorthingGeoKey',
  260. 3092: 'ProjScaleAtNatOriginGeoKey',
  261. 3093: 'ProjScaleAtCenterGeoKey',
  262. 3094: 'ProjAzimuthAngleGeoKey',
  263. 3095: 'ProjStraightVertPoleLongGeoKey',
  264. 3096: 'ProjRectifiedGridAngleGeoKey',
  265. 4096: 'VerticalCSTypeGeoKey',
  266. 4097: 'VerticalCitationGeoKey',
  267. 4098: 'VerticalDatumGeoKey',
  268. 4099: 'VerticalUnitsGeoKey',
  269. };
  270. exports.geoKeys = {};
  271. for (const key in exports.geoKeyNames) {
  272. if (exports.geoKeyNames.hasOwnProperty(key)) {
  273. exports.geoKeys[exports.geoKeyNames[key]] = parseInt(key, 10);
  274. }
  275. }
  276. //# sourceMappingURL=globals.js.map