the editable site (validation-lab)

This commit is contained in:
kpgarrod committed 2026-11-21 08:03:55 +01:00
commit 3ac81d5a52
13454 files changed
+2227005

No files matched your search

+86
View File
@@ -0,0 +1,86 @@
import {tagKeys, createDictionary} from '../tags.mjs'
// https://exiftool.org/TagNames/ICC_Profile.html
createDictionary(tagKeys, 'icc', [
// Header Tags
[4, 'ProfileCMMType'],
[8, 'ProfileVersion'],
[12, 'ProfileClass'],
[16, 'ColorSpaceData'],
[20, 'ProfileConnectionSpace'],
[24, 'ProfileDateTime'],
[36, 'ProfileFileSignature'],
[40, 'PrimaryPlatform'],
[44, 'CMMFlags'],
[48, 'DeviceManufacturer'],
[52, 'DeviceModel'],
[56, 'DeviceAttributes'],
[64, 'RenderingIntent'],
[68, 'ConnectionSpaceIlluminant'],
[80, 'ProfileCreator'],
[84, 'ProfileID'],
// Other Tags
['Header', 'ProfileHeader'],
['MS00', 'WCSProfiles'],
['bTRC', 'BlueTRC'],
['bXYZ', 'BlueMatrixColumn'],
['bfd', 'UCRBG'],
['bkpt', 'MediaBlackPoint'],
['calt', 'CalibrationDateTime'],
['chad', 'ChromaticAdaptation'],
['chrm', 'Chromaticity'],
['ciis', 'ColorimetricIntentImageState'],
['clot', 'ColorantTableOut'],
['clro', 'ColorantOrder'],
['clrt', 'ColorantTable'],
['cprt', 'ProfileCopyright'],
['crdi', 'CRDInfo'],
['desc', 'ProfileDescription'],
['devs', 'DeviceSettings'],
['dmdd', 'DeviceModelDesc'],
['dmnd', 'DeviceMfgDesc'],
['dscm', 'ProfileDescriptionML'],
['fpce', 'FocalPlaneColorimetryEstimates'],
['gTRC', 'GreenTRC'],
['gXYZ', 'GreenMatrixColumn'],
['gamt', 'Gamut'],
['kTRC', 'GrayTRC'],
['lumi', 'Luminance'],
['meas', 'Measurement'],
['meta', 'Metadata'],
['mmod', 'MakeAndModel'],
['ncl2', 'NamedColor2'],
['ncol', 'NamedColor'],
['ndin', 'NativeDisplayInfo'],
['pre0', 'Preview0'],
['pre1', 'Preview1'],
['pre2', 'Preview2'],
['ps2i', 'PS2RenderingIntent'],
['ps2s', 'PostScript2CSA'],
['psd0', 'PostScript2CRD0'],
['psd1', 'PostScript2CRD1'],
['psd2', 'PostScript2CRD2'],
['psd3', 'PostScript2CRD3'],
['pseq', 'ProfileSequenceDesc'],
['psid', 'ProfileSequenceIdentifier'],
['psvm', 'PS2CRDVMSize'],
['rTRC', 'RedTRC'],
['rXYZ', 'RedMatrixColumn'],
['resp', 'OutputResponse'],
['rhoc', 'ReflectionHardcopyOrigColorimetry'],
['rig0', 'PerceptualRenderingIntentGamut'],
['rig2', 'SaturationRenderingIntentGamut'],
['rpoc', 'ReflectionPrintOutputColorimetry'],
['sape', 'SceneAppearanceEstimates'],
['scoe', 'SceneColorimetryEstimates'],
['scrd', 'ScreeningDesc'],
['scrn', 'Screening'],
['targ', 'CharTarget'],
['tech', 'Technology'],
['vcgt', 'VideoCardGamma'],
['view', 'ViewingConditions'],
['vued', 'ViewingCondDesc'],
['wtpt', 'MediaWhitePoint'],
])
+341
View File
@@ -0,0 +1,341 @@
import {tagValues, createDictionary} from '../tags.mjs'
// inspired by & slightly modified from
// https://exiftool.org/TagNames/ICC_Profile.html
const companies = {
'4d2p': 'Erdt Systems',
AAMA: 'Aamazing Technologies',
ACER: 'Acer',
ACLT: 'Acolyte Color Research',
ACTI: 'Actix Sytems',
ADAR: 'Adara Technology',
ADBE: 'Adobe',
ADI: 'ADI Systems',
AGFA: 'Agfa Graphics',
ALMD: 'Alps Electric',
ALPS: 'Alps Electric',
ALWN: 'Alwan Color Expertise',
AMTI: 'Amiable Technologies',
AOC: 'AOC International',
APAG: 'Apago',
APPL: 'Apple Computer',
AST: 'AST',
'AT&T': 'AT&T',
BAEL: 'BARBIERI electronic',
BRCO: 'Barco NV',
BRKP: 'Breakpoint',
BROT: 'Brother',
BULL: 'Bull',
BUS: 'Bus Computer Systems',
'C-IT': 'C-Itoh',
CAMR: 'Intel',
CANO: 'Canon',
CARR: 'Carroll Touch',
CASI: 'Casio',
CBUS: 'Colorbus PL',
CEL: 'Crossfield',
CELx: 'Crossfield',
CGS: 'CGS Publishing Technologies International',
CHM: 'Rochester Robotics',
CIGL: 'Colour Imaging Group, London',
CITI: 'Citizen',
CL00: 'Candela',
CLIQ: 'Color IQ',
CMCO: 'Chromaco',
CMiX: 'CHROMiX',
COLO: 'Colorgraphic Communications',
COMP: 'Compaq',
COMp: 'Compeq/Focus Technology',
CONR: 'Conrac Display Products',
CORD: 'Cordata Technologies',
CPQ: 'Compaq',
CPRO: 'ColorPro',
CRN: 'Cornerstone',
CTX: 'CTX International',
CVIS: 'ColorVision',
CWC: 'Fujitsu Laboratories',
DARI: 'Darius Technology',
DATA: 'Dataproducts',
DCP: 'Dry Creek Photo',
DCRC: 'Digital Contents Resource Center, Chung-Ang University',
DELL: 'Dell Computer',
DIC: 'Dainippon Ink and Chemicals',
DICO: 'Diconix',
DIGI: 'Digital',
'DL&C': 'Digital Light & Color',
DPLG: 'Doppelganger',
DS: 'Dainippon Screen',
DSOL: 'DOOSOL',
DUPN: 'DuPont',
EPSO: 'Epson',
ESKO: 'Esko-Graphics',
ETRI: 'Electronics and Telecommunications Research Institute',
EVER: 'Everex Systems',
EXAC: 'ExactCODE',
Eizo: 'Eizo',
FALC: 'Falco Data Products',
FF: 'Fuji Photo Film',
FFEI: 'FujiFilm Electronic Imaging',
FNRD: 'Fnord Software',
FORA: 'Fora',
FORE: 'Forefront Technology',
FP: 'Fujitsu',
FPA: 'WayTech Development',
FUJI: 'Fujitsu',
FX: 'Fuji Xerox',
GCC: 'GCC Technologies',
GGSL: 'Global Graphics Software',
GMB: 'Gretagmacbeth',
GMG: 'GMG',
GOLD: 'GoldStar Technology',
GOOG: 'Google',
GPRT: 'Giantprint',
GTMB: 'Gretagmacbeth',
GVC: 'WayTech Development',
GW2K: 'Sony',
HCI: 'HCI',
HDM: 'Heidelberger Druckmaschinen',
HERM: 'Hermes',
HITA: 'Hitachi America',
HP: 'Hewlett-Packard',
HTC: 'Hitachi',
HiTi: 'HiTi Digital',
IBM: 'IBM',
IDNT: 'Scitex',
IEC: 'Hewlett-Packard',
IIYA: 'Iiyama North America',
IKEG: 'Ikegami Electronics',
IMAG: 'Image Systems',
IMI: 'Ingram Micro',
INTC: 'Intel',
INTL: 'N/A (INTL)',
INTR: 'Intra Electronics',
IOCO: 'Iocomm International Technology',
IPS: 'InfoPrint Solutions Company',
IRIS: 'Scitex',
ISL: 'Ichikawa Soft Laboratory',
ITNL: 'N/A (ITNL)',
IVM: 'IVM',
IWAT: 'Iwatsu Electric',
Idnt: 'Scitex',
Inca: 'Inca Digital Printers',
Iris: 'Scitex',
JPEG: 'Joint Photographic Experts Group',
JSFT: 'Jetsoft Development',
JVC: 'JVC Information Products',
KART: 'Scitex',
KFC: 'KFC Computek Components',
KLH: 'KLH Computers',
KMHD: 'Konica Minolta',
KNCA: 'Konica',
KODA: 'Kodak',
KYOC: 'Kyocera',
Kart: 'Scitex',
LCAG: 'Leica',
LCCD: 'Leeds Colour',
LDAK: 'Left Dakota',
LEAD: 'Leading Technology',
LEXM: 'Lexmark International',
LINK: 'Link Computer',
LINO: 'Linotronic',
LITE: 'Lite-On',
Leaf: 'Leaf',
Lino: 'Linotronic',
MAGC: 'Mag Computronic',
MAGI: 'MAG Innovision',
MANN: 'Mannesmann',
MICN: 'Micron Technology',
MICR: 'Microtek',
MICV: 'Microvitec',
MINO: 'Minolta',
MITS: 'Mitsubishi Electronics America',
MITs: 'Mitsuba',
MNLT: 'Minolta',
MODG: 'Modgraph',
MONI: 'Monitronix',
MONS: 'Monaco Systems',
MORS: 'Morse Technology',
MOTI: 'Motive Systems',
MSFT: 'Microsoft',
MUTO: 'MUTOH INDUSTRIES',
Mits: 'Mitsubishi Electric',
NANA: 'NANAO',
NEC: 'NEC',
NEXP: 'NexPress Solutions',
NISS: 'Nissei Sangyo America',
NKON: 'Nikon',
NONE: 'none',
OCE: 'Oce Technologies',
OCEC: 'OceColor',
OKI: 'Oki',
OKID: 'Okidata',
OKIP: 'Okidata',
OLIV: 'Olivetti',
OLYM: 'Olympus',
ONYX: 'Onyx Graphics',
OPTI: 'Optiquest',
PACK: 'Packard Bell',
PANA: 'Matsushita Electric Industrial',
PANT: 'Pantone',
PBN: 'Packard Bell',
PFU: 'PFU',
PHIL: 'Philips Consumer Electronics',
PNTX: 'HOYA',
POne: 'Phase One A/S',
PREM: 'Premier Computer Innovations',
PRIN: 'Princeton Graphic Systems',
PRIP: 'Princeton Publishing Labs',
QLUX: 'Hong Kong',
QMS: 'QMS',
QPCD: 'QPcard AB',
QUAD: 'QuadLaser',
QUME: 'Qume',
RADI: 'Radius',
RDDx: 'Integrated Color Solutions',
RDG: 'Roland DG',
REDM: 'REDMS Group',
RELI: 'Relisys',
RGMS: 'Rolf Gierling Multitools',
RICO: 'Ricoh',
RNLD: 'Edmund Ronald',
ROYA: 'Royal',
RPC: 'Ricoh Printing Systems',
RTL: 'Royal Information Electronics',
SAMP: 'Sampo',
SAMS: 'Samsung',
SANT: 'Jaime Santana Pomares',
SCIT: 'Scitex',
SCRN: 'Dainippon Screen',
SDP: 'Scitex',
SEC: 'Samsung',
SEIK: 'Seiko Instruments',
SEIk: 'Seikosha',
SGUY: 'ScanGuy.com',
SHAR: 'Sharp Laboratories',
SICC: 'International Color Consortium',
SONY: 'Sony',
SPCL: 'SpectraCal',
STAR: 'Star',
STC: 'Sampo Technology',
Scit: 'Scitex',
Sdp: 'Scitex',
Sony: 'Sony',
TALO: 'Talon Technology',
TAND: 'Tandy',
TATU: 'Tatung',
TAXA: 'TAXAN America',
TDS: 'Tokyo Denshi Sekei',
TECO: 'TECO Information Systems',
TEGR: 'Tegra',
TEKT: 'Tektronix',
TI: 'Texas Instruments',
TMKR: 'TypeMaker',
TOSB: 'Toshiba',
TOSH: 'Toshiba',
TOTK: 'TOTOKU ELECTRIC',
TRIU: 'Triumph',
TSBT: 'Toshiba',
TTX: 'TTX Computer Products',
TVM: 'TVM Professional Monitor',
TW: 'TW Casper',
ULSX: 'Ulead Systems',
UNIS: 'Unisys',
UTZF: 'Utz Fehlau & Sohn',
VARI: 'Varityper',
VIEW: 'Viewsonic',
VISL: 'Visual communication',
VIVO: 'Vivo Mobile Communication',
WANG: 'Wang',
WLBR: 'Wilbur Imaging',
WTG2: 'Ware To Go',
WYSE: 'WYSE Technology',
XERX: 'Xerox',
XRIT: 'X-Rite',
ZRAN: 'Zoran',
Zebr: 'Zebra Technologies',
appl: 'Apple Computer',
bICC: 'basICColor',
berg: 'bergdesign',
ceyd: 'Integrated Color Solutions',
clsp: 'MacDermid ColorSpan',
ds: 'Dainippon Screen',
dupn: 'DuPont',
ffei: 'FujiFilm Electronic Imaging',
flux: 'FluxData',
iris: 'Scitex',
kart: 'Scitex',
lcms: 'Little CMS',
lino: 'Linotronic',
none: 'none',
ob4d: 'Erdt Systems',
obic: 'Medigraph',
quby: 'Qubyx Sarl',
scit: 'Scitex',
scrn: 'Dainippon Screen',
sdp: 'Scitex',
siwi: 'SIWI GRAFIKA',
yxym: 'YxyMaster',
}
// 12 ProfileClass
const devices = {
scnr: 'Scanner',
mntr: 'Monitor',
prtr: 'Printer',
link: 'Device Link',
abst: 'Abstract',
spac: 'Color Space Conversion Profile',
nmcl: 'Named Color',
cenc: 'ColorEncodingSpace profile',
mid: 'MultiplexIdentification profile',
mlnk: 'MultiplexLink profile',
mvis: 'MultiplexVisualization profile',
nkpf: 'Nikon Input Device Profile (NON-STANDARD!)',
}
const tech = {
amd: 'Active Matrix Display',
crt: 'Cathode Ray Tube Display',
kpcd: 'Photo CD',
pmd: 'Passive Matrix Display',
dcam: 'Digital Camera',
dcpj: 'Digital Cinema Projector',
dmpc: 'Digital Motion Picture Camera',
dsub: 'Dye Sublimation Printer',
epho: 'Electrophotographic Printer',
esta: 'Electrostatic Printer',
flex: 'Flexography',
fprn: 'Film Writer',
fscn: 'Film Scanner',
grav: 'Gravure',
ijet: 'Ink Jet Printer',
imgs: 'Photo Image Setter',
mpfr: 'Motion Picture Film Recorder',
mpfs: 'Motion Picture Film Scanner',
offs: 'Offset Lithography',
pjtv: 'Projection Television',
rpho: 'Photographic Paper Printer',
rscn: 'Reflective Scanner',
silk: 'Silkscreen',
twax: 'Thermal Wax Printer',
vidc: 'Video Camera',
vidm: 'Video Monitor',
}
createDictionary(tagValues, 'icc', [
[4, companies],
[12, devices],
[40, Object.assign({}, companies, devices)],
[48, companies],
[80, companies],
[64, {
0: 'Perceptual',
1: 'Relative Colorimetric',
2: 'Saturation',
3: 'Absolute Colorimetric',
}],
['tech', tech],
])
+16
View File
@@ -0,0 +1,16 @@
import {tagKeys, createDictionary} from '../tags.mjs'
// PNG Header Tags
// the number is not a tag code but an offset in buffer (standard png header)
// so there's no missing 1,2,3,5,6,7, etc... tag
createDictionary(tagKeys, 'ihdr', [
[0, 'ImageWidth'],
[4, 'ImageHeight'],
[8, 'BitDepth'],
[9, 'ColorType'],
[10, 'Compression'],
[11, 'Filter'],
[12, 'Interlace'],
])
+32
View File
@@ -0,0 +1,32 @@
import {tagValues, createDictionary} from '../tags.mjs'
// PNG Header Tags
createDictionary(tagValues, 'ihdr', [
[9, {
0: 'Grayscale',
2: 'RGB',
3: 'Palette',
4: 'Grayscale with Alpha',
6: 'RGB with Alpha',
DEFAULT: 'Unknown',
}],
[10, {
0: 'Deflate/Inflate',
DEFAULT: 'Unknown',
}],
[11, {
0: 'Adaptive',
DEFAULT: 'Unknown',
}],
[12, {
0: 'Noninterlaced',
1: 'Adam7 Interlace',
DEFAULT: 'Unknown',
}],
])
+78
View File
@@ -0,0 +1,78 @@
import {tagKeys, createDictionary} from '../tags.mjs'
// Slightly modified version of
// https://exiftool.org/TagNames/IPTC.html
createDictionary(tagKeys, 'iptc', [
[0, 'ApplicationRecordVersion'],
[3, 'ObjectTypeReference'],
[4, 'ObjectAttributeReference'],
[5, 'ObjectName'],
[7, 'EditStatus'],
[8, 'EditorialUpdate'],
[10, 'Urgency'],
[12, 'SubjectReference'],
[15, 'Category'],
[20, 'SupplementalCategories'],
[22, 'FixtureIdentifier'],
[25, 'Keywords'],
[26, 'ContentLocationCode'],
[27, 'ContentLocationName'],
[30, 'ReleaseDate'],
[35, 'ReleaseTime'],
[37, 'ExpirationDate'],
[38, 'ExpirationTime'],
[40, 'SpecialInstructions'],
[42, 'ActionAdvised'],
[45, 'ReferenceService'],
[47, 'ReferenceDate'],
[50, 'ReferenceNumber'],
[55, 'DateCreated'],
[60, 'TimeCreated'],
[62, 'DigitalCreationDate'],
[63, 'DigitalCreationTime'],
[65, 'OriginatingProgram'],
[70, 'ProgramVersion'],
[75, 'ObjectCycle'],
[80, 'Byline'],
[85, 'BylineTitle'],
[90, 'City'],
[92, 'Sublocation'],
[95, 'State'], // Province-State
[100, 'CountryCode'], // Country-PrimaryLocationCode
[101, 'Country'], // Country-PrimaryLocationName
[103, 'OriginalTransmissionReference'],
[105, 'Headline'],
[110, 'Credit'],
[115, 'Source'],
[116, 'CopyrightNotice'],
[118, 'Contact'],
[120, 'Caption'], // Caption-Abstract
[121, 'LocalCaption'],
[122, 'Writer'], // Writer-Editor
[125, 'RasterizedCaption'],
[130, 'ImageType'],
[131, 'ImageOrientation'],
[135, 'LanguageIdentifier'],
[150, 'AudioType'],
[151, 'AudioSamplingRate'],
[152, 'AudioSamplingResolution'],
[153, 'AudioDuration'],
[154, 'AudioOutcue'],
[184, 'JobID'],
[185, 'MasterDocumentID'],
[186, 'ShortDocumentID'],
[187, 'UniqueDocumentID'],
[188, 'OwnerID'],
[200, 'ObjectPreviewFileFormat'],
[201, 'ObjectPreviewFileVersion'],
[202, 'ObjectPreviewData'],
[221, 'Prefs'],
[225, 'ClassifyState'],
[228, 'SimilarityIndex'],
[230, 'DocumentNotes'],
[231, 'DocumentHistory'],
[232, 'ExifCameraInfo'],
[255, 'CatalogSets'],
])
+92
View File
@@ -0,0 +1,92 @@
import {tagValues, createDictionary} from '../tags.mjs'
// Taken from
// https://exiftool.org/TagNames/IPTC.html
createDictionary(tagValues, 'iptc', [
[10, {
0: '0 (reserved)',
1: '1 (most urgent)',
2: '2',
3: '3',
4: '4',
5: '5 (normal urgency)',
6: '6',
7: '7',
8: '8 (least urgent)',
9: '9 (user-defined priority)',
}],
// TODO 42
[75, {
'a': 'Morning',
'b': 'Both Morning and Evening',
'p': 'Evening',
}],
[131, {
'L': 'Landscape',
'P': 'Portrait',
'S': 'Square',
}],
// not useful in images
/*
[150, {
'0T': 'Text Only',
'1A': 'Mono Actuality',
'1C': 'Mono Question and Answer Session',
'1M': 'Mono Music',
'1Q': 'Mono Response to a Question',
'1R': 'Mono Raw Sound',
'1S': 'Mono Scener',
'1V': 'Mono Voicer',
'1W': 'Mono Wrap',
'2A': 'Stereo Actuality',
'2C': 'Stereo Question and Answer Session',
'2M': 'Stereo Music',
'2Q': 'Stereo Response to a Question',
'2R': 'Stereo Raw Sound',
'2S': 'Stereo Scener',
'2V': 'Stereo Voicer',
'2W': 'Stereo Wrap',
}],
[200, {
0: 'No ObjectData',
1: 'IPTC-NAA Digital Newsphoto Parameter Record',
2: 'IPTC7901 Recommended Message Format',
3: 'Tagged Image File Format (Adobe/Aldus Image data)',
4: 'Illustrator (Adobe Graphics data)',
5: 'AppleSingle (Apple Computer Inc)',
6: 'NAA 89-3 (ANPA 1312)',
7: 'MacBinary II',
8: 'IPTC Unstructured Character Oriented File Format (UCOFF)',
9: 'United Press International ANPA 1312 variant',
10: 'United Press International Down-Load Message',
11: 'JPEG File Interchange (JFIF)',
12: 'Photo-CD Image-Pac (Eastman Kodak)',
13: 'Bit Mapped Graphics File [.BMP] (Microsoft)',
14: 'Digital Audio File [.WAV] (Microsoft & Creative Labs)',
15: 'Audio plus Moving Video [.AVI] (Microsoft)',
16: 'PC DOS/Windows Executable Files [.COM][.EXE]',
17: 'Compressed Binary File [.ZIP] (PKWare Inc)',
18: 'Audio Interchange File Format AIFF (Apple Computer Inc)',
19: 'RIFF Wave (Microsoft Corporation)',
20: 'Freehand (Macromedia/Aldus)',
21: 'Hypertext Markup Language [.HTML] (The Internet Society)',
22: 'MPEG 2 Audio Layer 2 (Musicom), ISO/IEC',
23: 'MPEG 2 Audio Layer 3, ISO/IEC',
24: 'Portable Document File [.PDF] Adobe',
25: 'News Industry Text Format (NITF)',
26: 'Tape Archive [.TAR]',
27: 'Tidningarnas Telegrambyra NITF version (TTNITF DTD)',
28: 'Ritzaus Bureau NITF version (RBNITF DTD)',
29: 'Corel Draw [.CDR]',
}],
*/
])
+15
View File
@@ -0,0 +1,15 @@
import {tagKeys, createDictionary} from '../tags.mjs'
// JPEG Header Tags
// the number is not a tag code but an offset in buffer (standard jpg header)
// so there's no missing 1,2,3,5,6,7, etc... tag
createDictionary(tagKeys, 'jfif', [
[0, 'JFIFVersion'],
[2, 'ResolutionUnit'],
[3, 'XResolution'],
[5, 'YResolution'],
[7, 'ThumbnailWidth'],
[8, 'ThumbnailHeight']
])
+113
View File
@@ -0,0 +1,113 @@
import {tagKeys, createDictionary} from '../tags.mjs'
// inspired by
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
// TODO: check and add missing ones from:
// https://metacpan.org/pod/distribution/Image-ExifTool/lib/Image/ExifTool/TagNames.pod#EXIF-Tags
// https://metacpan.org/pod/Image::MetaData::JPEG::TagLists#Exif-tags-for-the-0th-IFD-Exif-private-subdirectory
createDictionary(tagKeys, 'exif', [
[0x829a, 'ExposureTime'],
[0x829d, 'FNumber'],
[0x8822, 'ExposureProgram'],
[0x8824, 'SpectralSensitivity'],
[0x8827, 'ISO'],
[0x882a, 'TimeZoneOffset'],
[0x882b, 'SelfTimerMode'],
[0x8830, 'SensitivityType'],
[0x8831, 'StandardOutputSensitivity'],
[0x8832, 'RecommendedExposureIndex'],
[0x8833, 'ISOSpeed'],
[0x8834, 'ISOSpeedLatitudeyyy'],
[0x8835, 'ISOSpeedLatitudezzz'],
[0x9000, 'ExifVersion'],
[0x9003, 'DateTimeOriginal'],
[0x9004, 'CreateDate'],
[0x9009, 'GooglePlusUploadCode'],
[0x9010, 'OffsetTime'],
[0x9011, 'OffsetTimeOriginal'],
[0x9012, 'OffsetTimeDigitized'],
[0x9101, 'ComponentsConfiguration'],
[0x9102, 'CompressedBitsPerPixel'],
[0x9201, 'ShutterSpeedValue'],
[0x9202, 'ApertureValue'],
[0x9203, 'BrightnessValue'],
[0x9204, 'ExposureCompensation'],
[0x9205, 'MaxApertureValue'],
[0x9206, 'SubjectDistance'],
[0x9207, 'MeteringMode'],
[0x9208, 'LightSource'],
[0x9209, 'Flash'],
[0x920a, 'FocalLength'],
[0x9211, 'ImageNumber'],
[0x9212, 'SecurityClassification'],
[0x9213, 'ImageHistory'],
[0x9214, 'SubjectArea'],
[0x927c, 'MakerNote'],
[0x9286, 'UserComment'],
[0x9290, 'SubSecTime'],
[0x9291, 'SubSecTimeOriginal'],
[0x9292, 'SubSecTimeDigitized'],
[0x9400, 'AmbientTemperature'],
[0x9401, 'Humidity'],
[0x9402, 'Pressure'],
[0x9403, 'WaterDepth'],
[0x9404, 'Acceleration'],
[0x9405, 'CameraElevationAngle'],
[0xa000, 'FlashpixVersion'],
[0xa001, 'ColorSpace'],
[0xa002, 'ExifImageWidth'],
[0xa003, 'ExifImageHeight'],
[0xa004, 'RelatedSoundFile'],
[0xa20b, 'FlashEnergy'],
[0xa20e, 'FocalPlaneXResolution'],
[0xa20f, 'FocalPlaneYResolution'],
[0xa210, 'FocalPlaneResolutionUnit'],
[0xa214, 'SubjectLocation'],
[0xa215, 'ExposureIndex'],
[0xa217, 'SensingMethod'],
[0xa300, 'FileSource'],
[0xa301, 'SceneType'],
[0xa302, 'CFAPattern'],
[0xa401, 'CustomRendered'],
[0xa402, 'ExposureMode'],
[0xa403, 'WhiteBalance'],
[0xa404, 'DigitalZoomRatio'],
[0xa405, 'FocalLengthIn35mmFormat'],
[0xa406, 'SceneCaptureType'],
[0xa407, 'GainControl'],
[0xa408, 'Contrast'],
[0xa409, 'Saturation'],
[0xa40a, 'Sharpness'],
[0xa40c, 'SubjectDistanceRange'],
[0xa420, 'ImageUniqueID'],
[0xa430, 'OwnerName'],
[0xa431, 'SerialNumber'],
[0xa432, 'LensInfo'],
[0xa433, 'LensMake'],
[0xa434, 'LensModel'],
[0xa435, 'LensSerialNumber'],
[0xa460, 'CompositeImage'],
[0xa461, 'CompositeImageCount'],
[0xa462, 'CompositeImageExposureTimes'],
[0xa500, 'Gamma'],
[0xea1c, 'Padding'],
[0xea1d, 'OffsetSchema'],
[0xfde8, 'OwnerName'],
[0xfde9, 'SerialNumber'],
[0xfdea, 'Lens'],
[0xfe4c, 'RawFile'],
[0xfe4d, 'Converter'],
[0xfe4e, 'WhiteBalance'],
[0xfe51, 'Exposure'],
[0xfe52, 'Shadows'],
[0xfe53, 'Brightness'],
[0xfe54, 'Contrast'],
[0xfe55, 'Saturation'],
[0xfe56, 'Sharpness'],
[0xfe57, 'Smoothness'],
[0xfe58, 'MoireFilter'],
// not actually assigned to IFD0 but offten found here
[0xa005, 'InteropIFD'],
])
+195
View File
@@ -0,0 +1,195 @@
import {tagValues, createDictionary} from '../tags.mjs'
let exif = createDictionary(tagValues, 'exif', [
// ExposureProgram
[0x8822, {
0: 'Not defined',
1: 'Manual',
2: 'Normal program',
3: 'Aperture priority',
4: 'Shutter priority',
5: 'Creative program',
6: 'Action program',
7: 'Portrait mode',
8: 'Landscape mode'
}],
// ComponentsConfiguration
[0x9101, {
0: '-',
1: 'Y',
2: 'Cb',
3: 'Cr',
4: 'R',
5: 'G',
6: 'B'
}],
// MeteringMode
[0x9207, {
0: 'Unknown',
1: 'Average',
2: 'CenterWeightedAverage',
3: 'Spot',
4: 'MultiSpot',
5: 'Pattern',
6: 'Partial',
255: 'Other'
}],
// LightSource
[0x9208, {
0: 'Unknown',
1: 'Daylight',
2: 'Fluorescent',
3: 'Tungsten (incandescent light)',
4: 'Flash',
9: 'Fine weather',
10: 'Cloudy weather',
11: 'Shade',
12: 'Daylight fluorescent (D 5700 - 7100K)',
13: 'Day white fluorescent (N 4600 - 5400K)',
14: 'Cool white fluorescent (W 3900 - 4500K)',
15: 'White fluorescent (WW 3200 - 3700K)',
17: 'Standard light A',
18: 'Standard light B',
19: 'Standard light C',
20: 'D55',
21: 'D65',
22: 'D75',
23: 'D50',
24: 'ISO studio tungsten',
255: 'Other'
}],
// Flash
[0x9209, {
0x00: 'Flash did not fire',
0x01: 'Flash fired',
0x05: 'Strobe return light not detected',
0x07: 'Strobe return light detected',
0x09: 'Flash fired, compulsory flash mode',
0x0D: 'Flash fired, compulsory flash mode, return light not detected',
0x0F: 'Flash fired, compulsory flash mode, return light detected',
0x10: 'Flash did not fire, compulsory flash mode',
0x18: 'Flash did not fire, auto mode',
0x19: 'Flash fired, auto mode',
0x1D: 'Flash fired, auto mode, return light not detected',
0x1F: 'Flash fired, auto mode, return light detected',
0x20: 'No flash function',
0x41: 'Flash fired, red-eye reduction mode',
0x45: 'Flash fired, red-eye reduction mode, return light not detected',
0x47: 'Flash fired, red-eye reduction mode, return light detected',
0x49: 'Flash fired, compulsory flash mode, red-eye reduction mode',
0x4D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
0x4F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
0x59: 'Flash fired, auto mode, red-eye reduction mode',
0x5D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
0x5F: 'Flash fired, auto mode, return light detected, red-eye reduction mode'
}],
// SensingMethod
[0xa217, {
1: 'Not defined',
2: 'One-chip color area sensor',
3: 'Two-chip color area sensor',
4: 'Three-chip color area sensor',
5: 'Color sequential area sensor',
7: 'Trilinear sensor',
8: 'Color sequential linear sensor'
}],
// FileSource
[0xa300, {
1: 'Film Scanner',
2: 'Reflection Print Scanner',
3: 'Digital Camera',
}],
// SceneType
[0xa301, {
1: 'Directly photographed'
}],
// CustomRendered
[0xa401, {
0: 'Normal',
1: 'Custom',
2: 'HDR (no original saved)',
3: 'HDR (original saved)',
4: 'Original (for HDR)',
6: 'Panorama',
7: 'Portrait HDR',
8: 'Portrait',
}],
// ExposureMode
[0xa402, {
0: 'Auto',
1: 'Manual',
2: 'Auto bracket',
}],
// WhiteBalance
[0xa403, {
0: 'Auto',
1: 'Manual'
}],
// SceneCaptureType
[0xa406, {
0: 'Standard',
1: 'Landscape',
2: 'Portrait',
3: 'Night',
4: 'Other',
}],
// GainControl
[0xa407, {
0: 'None',
1: 'Low gain up',
2: 'High gain up',
3: 'Low gain down',
4: 'High gain down'
}],
// SubjectDistanceRange
[0xa40c, {
0: 'Unknown',
1: 'Macro',
2: 'Close',
3: 'Distant'
}],
// CompositeImage
[0xa460, {
0: 'Unknown',
1: 'Not a Composite Image',
2: 'General Composite Image',
3: 'Composite Image Captured While Shooting',
}],
])
// FocalPlaneResolutionUnit
const shared1 = {
1: 'No absolute unit of measurement',
2: 'Inch',
3: 'Centimeter',
}
exif.set(0x9210, shared1)
exif.set(0xa210, shared1)
// Contrast, Saturation, Sharpness
const shared2 = {
0: 'Normal',
1: 'Low',
2: 'High'
}
exif.set(0xa408, shared2)
exif.set(0xa409, shared2)
exif.set(0xa40a, shared2)
+37
View File
@@ -0,0 +1,37 @@
import {tagKeys, createDictionary} from '../tags.mjs'
createDictionary(tagKeys, 'gps', [
[0x0000, 'GPSVersionID'],
[0x0001, 'GPSLatitudeRef'],
[0x0002, 'GPSLatitude'],
[0x0003, 'GPSLongitudeRef'],
[0x0004, 'GPSLongitude'],
[0x0005, 'GPSAltitudeRef'],
[0x0006, 'GPSAltitude'],
[0x0007, 'GPSTimeStamp'],
[0x0008, 'GPSSatellites'],
[0x0009, 'GPSStatus'],
[0x000A, 'GPSMeasureMode'],
[0x000B, 'GPSDOP'],
[0x000C, 'GPSSpeedRef'],
[0x000D, 'GPSSpeed'],
[0x000E, 'GPSTrackRef'],
[0x000F, 'GPSTrack'],
[0x0010, 'GPSImgDirectionRef'],
[0x0011, 'GPSImgDirection'],
[0x0012, 'GPSMapDatum'],
[0x0013, 'GPSDestLatitudeRef'],
[0x0014, 'GPSDestLatitude'],
[0x0015, 'GPSDestLongitudeRef'],
[0x0016, 'GPSDestLongitude'],
[0x0017, 'GPSDestBearingRef'],
[0x0018, 'GPSDestBearing'],
[0x0019, 'GPSDestDistanceRef'],
[0x001A, 'GPSDestDistance'],
[0x001B, 'GPSProcessingMethod'],
[0x001C, 'GPSAreaInformation'],
[0x001D, 'GPSDateStamp'],
[0x001E, 'GPSDifferential'],
[0x001F, 'GPSHPositioningError'],
])
+21
View File
@@ -0,0 +1,21 @@
import {tagValues, createDictionary} from '../tags.mjs'
// TODO https://exiftool.org/TagNames/GPS.html
createDictionary(tagValues, 'gps', [
// GPSDestBearingRef
[0x0017, {
M: 'Magnetic North',
T: 'True North',
}],
// GPSDestDistanceRef
[0x0019, {
K: 'Kilometers',
M: 'Miles',
N: 'Nautical Miles',
}],
])
+58
View File
@@ -0,0 +1,58 @@
import {tagKeys, createDictionary} from '../tags.mjs'
// inspired by
// https://exiftool.org/TagNames/EXIF.html
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
// https://metacpan.org/pod/distribution/Image-ExifTool/lib/Image/ExifTool/TagNames.pod#EXIF-Tags
// https://metacpan.org/pod/Image::MetaData::JPEG::TagLists - canonical + custom tags
createDictionary(tagKeys, ['ifd0', 'ifd1'], [
// most of these plus more https://metacpan.org/pod/Image::MetaData::JPEG::TagLists#Canonical-Exif-2.2-and-TIFF-6.0-tags-for-IFD0-and-IFD1
[0x0100, 'ImageWidth'],
[0x0101, 'ImageHeight'],
[0x0102, 'BitsPerSample'],
[0x0103, 'Compression'],
[0x0106, 'PhotometricInterpretation'],
[0x010e, 'ImageDescription'],
[0x010f, 'Make'],
[0x0110, 'Model'],
[0x0111, 'StripOffsets'], // PreviewImageStart
[0x0112, 'Orientation'],
[0x0115, 'SamplesPerPixel'],
[0x0116, 'RowsPerStrip'],
[0x0117, 'StripByteCounts'], // PreviewImageLength
[0x011a, 'XResolution'],
[0x011b, 'YResolution'],
[0x011c, 'PlanarConfiguration'],
[0x0128, 'ResolutionUnit'],
[0x012d, 'TransferFunction'],
[0x0131, 'Software'],
[0x0132, 'ModifyDate'],
[0x013b, 'Artist'],
[0x013c, 'HostComputer'],
[0x013d, 'Predictor'],
[0x013e, 'WhitePoint'],
[0x013f, 'PrimaryChromaticities'],
[0x0201, 'ThumbnailOffset'],
[0x0202, 'ThumbnailLength'],
[0x0211, 'YCbCrCoefficients'],
[0x0212, 'YCbCrSubSampling'],
[0x0213, 'YCbCrPositioning'],
[0x0214, 'ReferenceBlackWhite'],
[0x02bc, 'ApplicationNotes'], // [Adobe XMP technote 9-14-02]
[0x8298, 'Copyright'],
// not core, but useful
[0x83bb, 'IPTC'],
[0x8769, 'ExifIFD'],
[0x8773, 'ICC'],
[0x8825, 'GpsIFD'],
[0x014a, 'SubIFD'], // [Adobe TIFF technote 1]
[0xa005, 'InteropIFD'], // not actually assigned to IFD0 but offten found here
// descriptions, not core
[0x9c9b, 'XPTitle'],
[0x9c9c, 'XPComment'],
[0x9c9d, 'XPAuthor'],
[0x9c9e, 'XPKeywords'],
[0x9c9f, 'XPSubject'],
])
+25
View File
@@ -0,0 +1,25 @@
import {tagValues, createDictionary} from '../tags.mjs'
createDictionary(tagValues, ['ifd0', 'ifd1'], [
// Orientation
[0x0112, {
1: 'Horizontal (normal)',
2: 'Mirror horizontal',
3: 'Rotate 180',
4: 'Mirror vertical',
5: 'Mirror horizontal and rotate 270 CW',
6: 'Rotate 90 CW',
7: 'Mirror horizontal and rotate 90 CW',
8: 'Rotate 270 CW',
}],
// ResolutionUnit
[0x0128, {
1: 'None',
2: 'inches',
3: 'cm',
}],
])
+10
View File
@@ -0,0 +1,10 @@
import {tagKeys, createDictionary} from '../tags.mjs'
createDictionary(tagKeys, 'interop', [
[0x0001, 'InteropIndex'],
[0x0002, 'InteropVersion'],
[0x1000, 'RelatedImageFileFormat'],
[0x1001, 'RelatedImageWidth'],
[0x1002, 'RelatedImageHeight'],
])
+359
View File
@@ -0,0 +1,359 @@
import {tagKeys, extendDictionary} from '../tags.mjs'
// all other uncathegorized or SubIFD tags from:
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
// https://metacpan.org/pod/distribution/Image-ExifTool/lib/Image/ExifTool/TagNames.pod#EXIF-Tags
// Additional and barely used, but known tags in IFD0
extendDictionary(tagKeys, 'ifd0', [
// Additional IFD0 TIFF 6.0 tags not in Exif 2.2
// This is not complete list. This list was taken from https://exiftool.org/TagNames/EXIF.html
// https://metacpan.org/pod/Image::MetaData::JPEG::TagLists#Additional-TIFF-6.0-tags-not-in-Exif-2.2-for-IFD0
[0x000b, 'ProcessingSoftware'],
[0x00fe, 'SubfileType'],
[0x00ff, 'OldSubfileType'],
[0x0107, 'Thresholding'],
[0x0108, 'CellWidth'],
[0x0109, 'CellLength'],
[0x010a, 'FillOrder'],
[0x010d, 'DocumentName'],
[0x0118, 'MinSampleValue'],
[0x0119, 'MaxSampleValue'],
[0x011d, 'PageName'],
[0x011e, 'XPosition'],
[0x011f, 'YPosition'],
[0x0122, 'GrayResponseUnit'],
[0x0129, 'PageNumber'],
[0x0141, 'HalftoneHints'],
[0x0142, 'TileWidth'],
[0x0143, 'TileLength'],
[0x014c, 'InkSet'],
[0x0151, 'TargetPrinter'],
// yet another list
[0x4746, 'Rating'],
[0x4749, 'RatingPercent'],
[0x830e, 'PixelScale'],
[0x85d8, 'ModelTransform'],
[0x8649, 'PhotoshopSettings'],
[0xc612, 'DNGVersion'],
[0xc613, 'DNGBackwardVersion'],
[0xc614, 'UniqueCameraModel'],
[0xc615, 'LocalizedCameraModel'],
[0xc630, 'DNGLensInfo'],
[0xc633, 'ShadowScale'],
[0xc634, 'DNGPrivateData'],
// and more tags
[0x8480, 'IntergraphMatrix'],
[0x8482, 'ModelTiePoint'],
[0x8546, 'SEMInfo'],
[0x87af, 'GeoTiffDirectory'],
[0x87b0, 'GeoTiffDoubleParams'],
[0x87b1, 'GeoTiffAsciiParams'],
[0xc4a5, 'PrintIM'],
[0xc621, 'ColorMatrix1'],
[0xc622, 'ColorMatrix2'],
[0xc623, 'CameraCalibration1'],
[0xc624, 'CameraCalibration2'],
[0xc625, 'ReductionMatrix1'],
[0xc626, 'ReductionMatrix2'],
[0xc627, 'AnalogBalance'],
[0xc628, 'AsShotNeutral'],
[0xc629, 'AsShotWhiteXY'],
[0xc62a, 'BaselineExposure'],
[0xc62b, 'BaselineNoise'],
[0xc62c, 'BaselineSharpness'],
[0xc62e, 'LinearResponseLimit'],
[0xc62f, 'CameraSerialNumber'],
[0xc635, 'MakerNoteSafety'],
[0xc65a, 'CalibrationIlluminant1'],
[0xc65b, 'CalibrationIlluminant2'],
[0xc65d, 'RawDataUniqueID'],
[0xc68b, 'OriginalRawFileName'],
[0xc68c, 'OriginalRawFileData'],
[0xc68f, 'AsShotICCProfile'],
[0xc690, 'AsShotPreProfileMatrix'],
[0xc691, 'CurrentICCProfile'],
[0xc692, 'CurrentPreProfileMatrix'],
[0xc6bf, 'ColorimetricReference'],
[0xc6c5, 'SRawType'],
[0xc6d2, 'PanasonicTitle'],
[0xc6d3, 'PanasonicTitle2'],
[0xc6f3, 'CameraCalibrationSig'],
[0xc6f4, 'ProfileCalibrationSig'],
[0xc6f5, 'ProfileIFD'],
[0xc6f6, 'AsShotProfileName'],
[0xc6f8, 'ProfileName'],
[0xc6f9, 'ProfileHueSatMapDims'],
[0xc6fa, 'ProfileHueSatMapData1'],
[0xc6fb, 'ProfileHueSatMapData2'],
[0xc6fc, 'ProfileToneCurve'],
[0xc6fd, 'ProfileEmbedPolicy'],
[0xc6fe, 'ProfileCopyright'],
[0xc714, 'ForwardMatrix1'],
[0xc715, 'ForwardMatrix2'],
[0xc716, 'PreviewApplicationName'],
[0xc717, 'PreviewApplicationVersion'],
[0xc718, 'PreviewSettingsName'],
[0xc719, 'PreviewSettingsDigest'],
[0xc71a, 'PreviewColorSpace'],
[0xc71b, 'PreviewDateTime'],
[0xc71c, 'RawImageDigest'],
[0xc71d, 'OriginalRawFileDigest'],
[0xc725, 'ProfileLookTableDims'],
[0xc726, 'ProfileLookTableData'],
[0xc763, 'TimeCodes'],
[0xc764, 'FrameRate'],
[0xc772, 'TStop'],
[0xc789, 'ReelName'],
[0xc791, 'OriginalDefaultFinalSize'],
[0xc792, 'OriginalBestQualitySize'],
[0xc793, 'OriginalDefaultCropSize'],
[0xc7a1, 'CameraLabel'],
[0xc7a3, 'ProfileHueSatMapEncoding'],
[0xc7a4, 'ProfileLookTableEncoding'],
[0xc7a5, 'BaselineExposureOffset'],
[0xc7a6, 'DefaultBlackRender'],
[0xc7a7, 'NewRawImageDigest'],
[0xc7a8, 'RawToPreviewGain'],
])
// TODO: check all of these and add missing ones.
// https://metacpan.org/pod/Image::MetaData::JPEG::TagLists#Exif-tags-assigned-to-companies-for-IFD0-and-IFD1
// https://metacpan.org/pod/Image::MetaData::JPEG::TagLists#Exif-tags-for-the-0th-IFD-Exif-private-subdirectory
let otherTiffTags = [
[0x0111, 'StripOffsets'],
[0x0117, 'StripByteCounts'],
[0x0120, 'FreeOffsets'],
[0x0121, 'FreeByteCounts'],
[0x0123, 'GrayResponseCurve'],
[0x0124, 'T4Options'],
[0x0125, 'T6Options'],
[0x012c, 'ColorResponseUnit'],
[0x0140, 'ColorMap'],
[0x0144, 'TileOffsets'],
[0x0145, 'TileByteCounts'],
[0x0146, 'BadFaxLines'],
[0x0147, 'CleanFaxData'],
[0x0148, 'ConsecutiveBadFaxLines'],
[0x014a, 'SubIFD'],
[0x014d, 'InkNames'],
[0x014e, 'NumberofInks'],
[0x0150, 'DotRange'],
[0x0152, 'ExtraSamples'],
[0x0153, 'SampleFormat'],
[0x0154, 'SMinSampleValue'],
[0x0155, 'SMaxSampleValue'],
[0x0156, 'TransferRange'],
[0x0157, 'ClipPath'],
[0x0158, 'XClipPathUnits'],
[0x0159, 'YClipPathUnits'],
[0x015a, 'Indexed'],
[0x015b, 'JPEGTables'],
[0x015f, 'OPIProxy'],
[0x0190, 'GlobalParametersIFD'],
[0x0191, 'ProfileType'],
[0x0192, 'FaxProfile'],
[0x0193, 'CodingMethods'],
[0x0194, 'VersionYear'],
[0x0195, 'ModeNumber'],
[0x01b1, 'Decode'],
[0x01b2, 'DefaultImageColor'],
[0x01b3, 'T82Options'],
[0x01b5, 'JPEGTables'],
[0x0200, 'JPEGProc'],
[0x0203, 'JPEGRestartInterval'],
[0x0205, 'JPEGLosslessPredictors'],
[0x0206, 'JPEGPointTransforms'],
[0x0207, 'JPEGQTables'],
[0x0208, 'JPEGDCTables'],
[0x0209, 'JPEGACTables'],
[0x022f, 'StripRowCounts'],
[0x03e7, 'USPTOMiscellaneous'],
[0x4747, 'XP_DIP_XML'],
[0x4748, 'StitchInfo'],
[0x7000, 'SonyRawFileType'],
[0x7010, 'SonyToneCurve'],
[0x7031, 'VignettingCorrection'],
[0x7032, 'VignettingCorrParams'],
[0x7034, 'ChromaticAberrationCorrection'],
[0x7035, 'ChromaticAberrationCorrParams'],
[0x7036, 'DistortionCorrection'],
[0x7037, 'DistortionCorrParams'],
[0x74c7, 'SonyCropTopLeft'],
[0x74c8, 'SonyCropSize'],
[0x800d, 'ImageID'],
[0x80a3, 'WangTag1'],
[0x80a4, 'WangAnnotation'],
[0x80a5, 'WangTag3'],
[0x80a6, 'WangTag4'],
[0x80b9, 'ImageReferencePoints'],
[0x80ba, 'RegionXformTackPoint'],
[0x80bb, 'WarpQuadrilateral'],
[0x80bc, 'AffineTransformMat'],
[0x80e3, 'Matteing'],
[0x80e4, 'DataType'],
[0x80e5, 'ImageDepth'],
[0x80e6, 'TileDepth'],
[0x8214, 'ImageFullWidth'],
[0x8215, 'ImageFullHeight'],
[0x8216, 'TextureFormat'],
[0x8217, 'WrapModes'],
[0x8218, 'FovCot'],
[0x8219, 'MatrixWorldToScreen'],
[0x821a, 'MatrixWorldToCamera'],
[0x827d, 'Model2'],
[0x828d, 'CFARepeatPatternDim'],
[0x828e, 'CFAPattern2'],
[0x828f, 'BatteryLevel'],
[0x8290, 'KodakIFD'],
[0x82a5, 'MDFileTag'],
[0x82a6, 'MDScalePixel'],
[0x82a7, 'MDColorTable'],
[0x82a8, 'MDLabName'],
[0x82a9, 'MDSampleInfo'],
[0x82aa, 'MDPrepDate'],
[0x82ab, 'MDPrepTime'],
[0x82ac, 'MDFileUnits'],
[0x8335, 'AdventScale'],
[0x8336, 'AdventRevision'],
[0x835c, 'UIC1Tag'],
[0x835d, 'UIC2Tag'],
[0x835e, 'UIC3Tag'],
[0x835f, 'UIC4Tag'],
[0x847e, 'IntergraphPacketData'],
[0x847f, 'IntergraphFlagRegisters'],
[0x8481, 'INGRReserved'],
[0x84e0, 'Site'],
[0x84e1, 'ColorSequence'],
[0x84e2, 'IT8Header'],
[0x84e3, 'RasterPadding'],
[0x84e4, 'BitsPerRunLength'],
[0x84e5, 'BitsPerExtendedRunLength'],
[0x84e6, 'ColorTable'],
[0x84e7, 'ImageColorIndicator'],
[0x84e8, 'BackgroundColorIndicator'],
[0x84e9, 'ImageColorValue'],
[0x84ea, 'BackgroundColorValue'],
[0x84eb, 'PixelIntensityRange'],
[0x84ec, 'TransparencyIndicator'],
[0x84ed, 'ColorCharacterization'],
[0x84ee, 'HCUsage'],
[0x84ef, 'TrapIndicator'],
[0x84f0, 'CMYKEquivalent'],
[0x8568, 'AFCP_IPTC'],
[0x85b8, 'PixelMagicJBIGOptions'],
[0x85d7, 'JPLCartoIFD'],
[0x8602, 'WB_GRGBLevels'],
[0x8606, 'LeafData'],
[0x877f, 'TIFF_FXExtensions'],
[0x8780, 'MultiProfiles'],
[0x8781, 'SharedData'],
[0x8782, 'T88Options'],
[0x87ac, 'ImageLayer'],
[0x87be, 'JBIGOptions'],
[0x8828, 'Opto-ElectricConvFactor'],
[0x8829, 'Interlace'],
[0x885c, 'FaxRecvParams'],
[0x885d, 'FaxSubAddress'],
[0x885e, 'FaxRecvTime'],
[0x8871, 'FedexEDR'],
[0x888a, 'LeafSubIFD'],
[0x920b, 'FlashEnergy'],
[0x920c, 'SpatialFrequencyResponse'],
[0x920d, 'Noise'],
[0x920e, 'FocalPlaneXResolution'],
[0x920f, 'FocalPlaneYResolution'],
[0x9210, 'FocalPlaneResolutionUnit'],
[0x9215, 'ExposureIndex'],
[0x9216, 'TIFF-EPStandardID'],
[0x9217, 'SensingMethod'],
[0x923a, 'CIP3DataFile'],
[0x923b, 'CIP3Sheet'],
[0x923c, 'CIP3Side'],
[0x923f, 'StoNits'],
[0x932f, 'MSDocumentText'],
[0x9330, 'MSPropertySetStorage'],
[0x9331, 'MSDocumentTextPosition'],
[0x935c, 'ImageSourceData'],
[0xa005, 'InteropIFD'],
[0xa010, 'SamsungRawPointersOffset'],
[0xa011, 'SamsungRawPointersLength'],
[0xa101, 'SamsungRawByteOrder'],
[0xa102, 'SamsungRawUnknown'],
[0xa20c, 'SpatialFrequencyResponse'],
[0xa20d, 'Noise'],
[0xa211, 'ImageNumber'],
[0xa212, 'SecurityClassification'],
[0xa213, 'ImageHistory'],
[0xa216, 'TIFF-EPStandardID'],
[0xa40b, 'DeviceSettingDescription'],
[0xa480, 'GDALMetadata'],
[0xa481, 'GDALNoData'],
[0xafc0, 'ExpandSoftware'],
[0xafc1, 'ExpandLens'],
[0xafc2, 'ExpandFilm'],
[0xafc3, 'ExpandFilterLens'],
[0xafc4, 'ExpandScanner'],
[0xafc5, 'ExpandFlashLamp'],
[0xb4c3, 'HasselbladRawImage'],
[0xbc01, 'PixelFormat'],
[0xbc02, 'Transformation'],
[0xbc03, 'Uncompressed'],
[0xbc04, 'ImageType'],
[0xbc80, 'ImageWidth'],
[0xbc81, 'ImageHeight'],
[0xbc82, 'WidthResolution'],
[0xbc83, 'HeightResolution'],
[0xbcc0, 'ImageOffset'],
[0xbcc1, 'ImageByteCount'],
[0xbcc2, 'AlphaOffset'],
[0xbcc3, 'AlphaByteCount'],
[0xbcc4, 'ImageDataDiscard'],
[0xbcc5, 'AlphaDataDiscard'],
[0xc427, 'OceScanjobDesc'],
[0xc428, 'OceApplicationSelector'],
[0xc429, 'OceIDNumber'],
[0xc42a, 'OceImageLogic'],
[0xc44f, 'Annotations'],
[0xc51b, 'HasselbladExif'],
[0xc573, 'OriginalFileName'],
[0xc580, 'USPTOOriginalContentType'],
[0xc5e0, 'CR2CFAPattern'],
[0xc616, 'CFAPlaneColor'],
[0xc617, 'CFALayout'],
[0xc618, 'LinearizationTable'],
[0xc619, 'BlackLevelRepeatDim'],
[0xc61a, 'BlackLevel'],
[0xc61b, 'BlackLevelDeltaH'],
[0xc61c, 'BlackLevelDeltaV'],
[0xc61d, 'WhiteLevel'],
[0xc61e, 'DefaultScale'],
[0xc61f, 'DefaultCropOrigin'],
[0xc620, 'DefaultCropSize'],
[0xc62d, 'BayerGreenSplit'],
[0xc631, 'ChromaBlurRadius'],
[0xc632, 'AntiAliasStrength'],
[0xc640, 'RawImageSegmentation'],
[0xc65c, 'BestQualityScale'],
[0xc660, 'AliasLayerMetadata'],
[0xc68d, 'ActiveArea'],
[0xc68e, 'MaskedAreas'],
[0xc6f7, 'NoiseReductionApplied'],
[0xc71e, 'SubTileBlockSize'],
[0xc71f, 'RowInterleaveFactor'],
[0xc740, 'OpcodeList1'],
[0xc741, 'OpcodeList2'],
[0xc74e, 'OpcodeList3'],
[0xc761, 'NoiseProfile'],
[0xc7aa, 'CacheVersion'],
[0xc7b5, 'DefaultUserCrop'],
[0xc7d5, 'NikonNEFInfo'],
[0xfe00, 'KdcIFD'],
]
extendDictionary(tagKeys, 'ifd0', otherTiffTags)
extendDictionary(tagKeys, 'exif', otherTiffTags)
+80
View File
@@ -0,0 +1,80 @@
import {tagRevivers, createDictionary} from '../tags.mjs'
import {toAsciiString} from '../util/BufferView.mjs'
import {normalizeString} from '../util/helpers.mjs'
createDictionary(tagRevivers, ['ifd0', 'ifd1'], [
[0xC68B, toAsciiString],
[0x0132, reviveDate],
// extensions
[0x9c9b, reviveUcs2String],
[0x9c9c, reviveUcs2String],
[0x9c9d, reviveUcs2String],
[0x9c9e, reviveUcs2String],
[0x9c9f, reviveUcs2String],
])
createDictionary(tagRevivers, 'exif', [
[0xA000, reviveVersion],
[0x9000, reviveVersion],
[0x9003, reviveDate],
[0x9004, reviveDate],
// https://github.com/MikeKovarik/exifr/issues/36
[0xa002, unwrapExifSizeArray],
[0xa003, unwrapExifSizeArray],
])
createDictionary(tagRevivers, 'gps', [
[0x0000, val => Array.from(val).join('.')], // GPSVersionID
[0x0007, val => Array.from(val).join(':')], // GPSTimeStamp
])
function unwrapExifSizeArray(arr) {
if (typeof arr === 'object' && arr.length !== undefined)
return arr[0]
else
return arr
}
function reviveVersion(bytes) {
let array = Array.from(bytes).slice(1)
if (array[1] > 0x0f)
array = array.map(code => String.fromCharCode(code))
if (array[2] === '0' || array[2] === 0) array.pop()
return array.join('.')
}
// can be '2009-09-23 17:40:52 UTC' or '2010:07:06 20:45:12'
function reviveDate(string) {
if (typeof string !== 'string') return undefined
var [year, month, day, hours, minutes, seconds] = string.trim().split(/[-: ]/g).map(Number)
var date = new Date(year, month - 1, day)
if (!Number.isNaN(hours) && !Number.isNaN(minutes) && !Number.isNaN(seconds)) {
date.setHours(hours)
date.setMinutes(minutes)
date.setSeconds(seconds)
}
if (Number.isNaN(+date))
return string
else
return date
}
function reviveUcs2String(arg) {
if (typeof arg === 'string') return arg
let codePoints = []
let le = arg[1] === 0 && arg[arg.length - 1] === 0 // little endian
if (le) {
for (let i = 0; i < arg.length; i += 2)
codePoints.push(mergeBytes(arg[i + 1], arg[i]))
} else {
for (let i = 0; i < arg.length; i += 2)
codePoints.push(mergeBytes(arg[i], arg[i + 1]))
}
return normalizeString(String.fromCodePoint(...codePoints))
}
function mergeBytes(byte1, byte2) {
return (byte1 << 8) | byte2
}