Comparing version 0.1.0 to 0.1.1
@@ -25,2 +25,2 @@ /** | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Exifly={})}(this,(function(e){"use strict";const t={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},o={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},n={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},r={ExposureProgram:{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"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{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:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{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"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};e.getExt=function(e){return e.split(".").at(-1)},e.load=class{buf;opts;constructor(e,t){this.buf=e,this.opts=Object.create(null),this.opts.debug=t?.debug??!1}readTags(e,t,o,n,r){let i,a,s,l=e.getUint16(o,!r),d={};for(s=0;s<l;s++)i=o+12*s+2,a=n[e.getUint16(i,!r)],!a&&this.opts.debug&&console.log("Unknown tag: "+e.getUint16(i,!r)),d[a]=this.readTagValue(e,i,t,o,r);return d}readTagValue(e,t,o,n,r){let i,a,s,l,d,u=e.getUint16(t+2,!r),c=e.getUint32(t+4,!r),g=e.getUint32(t+8,!r)+o;switch(u){case 1:case 7:if(1==c)return e.getUint8(t+8);i=c>4?g:t+8,a=[];for(let t=0;t<c;t++)a[t]=e.getUint8(i+t);return a;case 2:return i=c>4?g:t+8,this.getStringFromDB(e,i,c-1);case 3:if(1==c)return e.getUint16(t+8,!r);i=c>2?g:t+8,a=[];for(let t=0;t<c;t++)a[t]=e.getUint16(i+2*t,!r);return a;case 4:if(1==c)return e.getUint32(t+8,!r);a=[];for(let t=0;t<c;t++)a[t]=e.getUint32(g+4*t,!r);return a;case 5:if(1==c)return l=e.getUint32(g,!r),d=e.getUint32(g+4,!r),s=new Number(l/d),s.numerator=l,s.denominator=d,s;a=[];for(let t=0;t<c;t++)l=e.getUint32(g+8*t,!r),d=e.getUint32(g+4+8*t,!r),a[t]=new Number(l/d),a[t].numerator=l,a[t].denominator=d;return a;case 9:if(1==c)return e.getInt32(t+8,!r);a=[];for(let t=0;t<c;t++)a[t]=e.getInt32(g+4*t,!r);return a;case 10:if(1==c)return e.getInt32(g,!r)/e.getInt32(g+4,!r);a=[];for(let t=0;t<c;t++)a[t]=e.getInt32(g+8*t,!r)/e.getInt32(g+4+8*t,!r);return a}}getStringFromDB(e,t,o){let n="";for(let r=t;r<t+o;r++)n+=String.fromCharCode(e.getUint8(r));return n}readEXIFData(e,i){let a,s,l,d,u;if(18761==e.getUint16(i))a=!1;else{if(19789!=e.getUint16(i))return this.opts.debug&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;a=!0}if(42!=e.getUint16(i+2,!a))return this.opts.debug&&console.log("Not valid TIFF data! (no 0x002A)"),!1;const c=e.getUint32(i+4,!a);if(c<8)return this.opts.debug&&console.log("Not valid TIFF data! (First offset less than 8)"),!1;if(s=this.readTags(e,i,i+c,o,a),s.ExifIFDPointer)for(l in d=this.readTags(e,i,i+s.ExifIFDPointer,t,a),d){switch(l){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":d[l]=r[l][d[l]];break;case"ExifVersion":case"FlashpixVersion":d[l]=String.fromCharCode(d[l][0],d[l][1],d[l][2],d[l][3]);break;case"ComponentsConfiguration":d[l]=r.Components[d[l][0]]+r.Components[d[l][1]]+r.Components[d[l][2]]+r.Components[d[l][3]]}s[l]=d[l]}if(s.GPSInfoIFDPointer)for(l in u=this.readTags(e,i,i+s.GPSInfoIFDPointer,n,a),u){if("GPSVersionID"===l)u[l]=u[l][0]+"."+u[l][1]+"."+u[l][2]+"."+u[l][3];s[l]=u[l]}return s}heic(){const e=new DataView(this.buf),t=e.getUint32(0),o=e.getUint32(t);let n=-1,r=-1;for(let i=t;i<o+t;i++)"Exif"==this.getStringFromDB(e,i,4)?n=i:"iloc"==this.getStringFromDB(e,i,4)&&(r=i);if(-1==n||-1==r)return null;const i=e.getUint16(n-4);for(let a=r+12;a<o+t;a+=16){if(e.getUint16(a)==i){const t=e.getUint32(a+8);e.getUint32(a+12);return n=t+(4+e.getUint32(t)),this.readEXIFData(e,n)}}return null}jpeg(){const e=this.buf,t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return this.opts.debug&&console.log("Not a valid JPEG"),!1;let o,n=2,r=e.byteLength;for(;n<r;){if(255!=t.getUint8(n))return this.opts.debug&&console.log("Not a valid marker at offset "+n+", found: "+t.getUint8(n)),!1;if(o=t.getUint8(n+1),this.opts.debug&&console.log(o),225==o)return this.opts.debug&&console.log("Found 0xFFE1 marker"),this.readEXIFData(t,n+4+6);n+=2+t.getUint16(n+2)}}jpg(){return this.jpeg()}raw(){const e=this.buf;console.log(e)}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Exifly={})}(this,(function(e){"use strict";var t,i,n,o;e.ZEROTH_IFD=void 0,(t=e.ZEROTH_IFD||(e.ZEROTH_IFD={})).Compression="Compression",t.ImageDescription="ImageDescription",t.Make="Make",t.Model="Model",t.XResolution="XResolution",t.YResolution="YResolution",t.ResolutionUnit="ResolutionUnit",t.TransferFunction="TransferFunction",t.Artist="Artist",t.WhitePoint="WhitePoint",t.PrimaryChromaticities="PrimaryChromaticities",t.YcbCrCoefficients="YcbCrCoefficients",t.ReferenceBlackWhite="ReferenceBlackWhite",t.Copyright="Copyright",t.ImageWidth="ImageWidth",t.ImageLength="ImageLength",t.BitsPerSample="BitsPerSample",t.PhotometricInterpretation="PhotometricInterpretation",t.Orientation="Orientation",t.SamplesPerPixel="SamplesPerPixel",t.PlanarConfiguration="PlanarConfiguration",t.YCbCrSubSampling="YCbCrSubSampling",t.YCbCrPositioning="YCbCrPositioning",t.StripOffsets="StripOffsets",t.RowsPerStrip="RowsPerStrip",t.StripByteCounts="StripByteCounts",t.JPEGInterchangeFormat="JPEGInterchangeFormat",t.JPEGInterchangeFormatLength="JPEGInterchangeFormatLength",t.Software="Software",t.DateTime="DateTime",t.ExifIFDPointer="Exif IFD Pointer",t.GPSInfoIFDPointer="GPS Info IFD Pointer",t.InteroperabilityIFDPointer="Interoperability IFD Pointer",e.EXIF_IFD=void 0,(i=e.EXIF_IFD||(e.EXIF_IFD={})).ExposureTime="ExposureTime",i.FNumber="FNumber",i.ExposureProgram="ExposureProgram",i.SpectralSensitivity="SpectralSensitivity",i.PhotographicSensitivity="PhotographicSensitivity",i.OECF="OECF",i.SensitivityType="SensitivityType",i.StandardOutputSensitivity="StandardOutputSensitivity",i.RecommendedExposurelndex="RecommendedExposurelndex",i.ISOSpeed="ISOSpeed",i.ISOSpeedLatitudeyyy="ISOSpeedLatitudeyyy",i.ISOSpeedLatitudezzz="ISOSpeedLatitudezzz",i.ExifVersion="ExifVersion",i.DateTimeOriginal="DateTimeOriginal",i.DateTimeDigitized="DateTimeDigitized",i.ComponentsConfiguration="ComponentsConfiguration",i.ShutterSpeedValue="ShutterSpeedValue",i.ApertureValue="ApertureValue",i.BrightnessValue="Brightness Value",i.ExposureBiasValue="ExposureBiasValue",i.MaxApertureValue="MaxAperture Value",i.SubjectDistance="SubjectDistance",i.MeteringMode="MeteringMode",i.LightSource="LightSource",i.Flash="Flash",i.FocalLength="FocalLength",i.MakerNote="MakerNote",i.UserComment="UserComment",i.SubSecTime="SubSecTime",i.SubSecTimeOriginal="SubSecTimeOriginal",i.SubSecTimeDigitized="SubSecTimeDigitized",i.FlashpixVersion="FlashpixVersion",i.ColorSpace="ColorSpace",i.RelatedSoundFile="RelatedSoundFile",i.FlashEnergy="FlashEnergy",i.SpatialFrequencyResponse="SpatialFrequencyResponse",i["FocalPlaneX-Resolution"]="FocalPlaneX-Resolution",i["FocalPlaneY-Resolution"]="FocalPlaneY-Resolution",i["FocalPlane-ResolutionUnit"]="FocalPlane-ResolutionUnit",i.Exposurelndex="Exposurelndex",i.SensingMethod="SensingMethod",i.FileSource="FileSource",i.SceneType="SceneType",i.CFApattern="CFApattern",i.ExposureMode="ExposureMode",i.WhiteBalance="WhiteBalance",i.DigitalZoomRatio="DigitalZoomRatio",i.FocalLengthIn35mmFilm="FocalLengthIn35mmFilm",i["SceneCapture Type"]="SceneCapture Type",i.GainControl="GainControl",i.Contrast="Contrast",i.Saturation="Saturation",i.Sharpness="Sharpness",i.DeviceSettingDescription="DeviceSettingDescription",i.SubjectDistanceRange="SubjectDistanceRange",i.ImageUniquelD="ImageUniquelD",i.CameraOwnerName="CameraOwnerName",i.BodySerialNumber="BodySerialNumber",i.LensSpecification="LensSpecification",i.LensMake="LensMake",i.LensModel="LensModel",i.LensSerialNumber="LensSerialNumber",i.Gamma="Gamma",i.CompressedBitsPerPixel="CompressedBitsPerPixel",i.PixelXDimension="PixelXDimension",i.PixelYDimension="PixelYDimension",i.SubjectArea="SubjectArea",i.FocalPlaneXResolution="FocalPlaneXResolution",i.FocalPlaneYResolution="FocalPlaneYResolution",i.FocalPlaneResolutionUnit="FocalPlaneResolutionUnit",i.SubjectLocation="SubjectLocation",i.ExposureIndex="ExposureIndex",i.CFAPattern="CFAPattern",i.CustomRendered="CustomRendered",i.DigitalZoomRation="DigitalZoomRation",i.SceneCaptureType="SceneCaptureType",i.ImageUniqueID="ImageUniqueID",e.INTEROPERABILITY_IFD=void 0,(e.INTEROPERABILITY_IFD||(e.INTEROPERABILITY_IFD={})).InteroperabilityIndex="InteroperabilityIndex",e.GPS_INFO_IFD=void 0,(n=e.GPS_INFO_IFD||(e.GPS_INFO_IFD={})).GPSVersionID="GPSVersionID",n.GPSLatitudeRef="GPSLatitudeRef",n.GPSLatitude="GPSLatitude",n.GPSImgDirection="GPSImgDirection",n.GPSLongitudeRef="GPSLongitudeRef",n.GPSLongitude="GPSLongitude",n.GPSAltitudeRef="GPSAltitudeRef",n.GPSAltitude="GPSAltitude",n.GPSTimeStamp="GPSTimeStamp",n.GPSSatellites="GPSSatellites",n.GPSStatus="GPSStatus",n.GPSMeasureMode="GPSMeasureMode",n.GPSDOP="GPSOP",n.GPSSpeedRef="GPSSpeedRef",n.GPSSpeed="GPSSpeed",n.GPSTrackRef="GPSTrackRef",n.GPSTrack="GPSTrack",n.GPSImgDirectionRef="GPSImgDirectionRef",n.GPSImgDirectionGPSMapDatum="GP SImgDirection GPSMapDatum",n.GPSDestLatitudeRef="GPSDestLatitudeRef",n.GPSDestLatitude="GPSDestLatitude",n.GPSDestLongitudeRef="GPSDestLongitudeRef",n.GPSDestLongitude="GPSDestLongitude",n.GPSDestBearingRef="GPSDestBearingRef",n.GPSDestBearing="GPSDestBearing",n.GPSDestDistanceRef="GPSDestDistanceRef",n.GPSDestDistance="GPSDestDistance",n.GPSProcessingMethod="GPSProcessingMethod",n.GPSArealnformation="GPSArealnformation",n.GPSDateStamp="GPSDateStamp",n.GPSDifferential="GPSDifferential",n.GPSHPositioningError="GPSHPositioningError",n.GPSMapDatum="GPSMapDatum",n.GPSAreaInformation="GPSAreaInformation",e.FIRST_IFD=void 0,(o=e.FIRST_IFD||(e.FIRST_IFD={})).Compression="Compression",o.ImageDescription="ImageDescription",o.Make="Make",o.Model="Model",o.TransferFunction="TransferFunction",o.Artist="Artist",o.WhitePoint="WhitePoint",o.PrimaryChromaticities="PrimaryChromaticities",o.YCbCrCoefficients="YCbCrCoefficients",o.ReferenceBlackWhite="ReferenceBlackWhite",o.Copyright="Copyright",o.ExifIFDPointer="Exif IFD Pointer",o.GPSInfoIFDPointer="GPS Info IFD Pointer";const r={ZEROTH_IFD:e.ZEROTH_IFD,EXIF_IFD:e.EXIF_IFD,GPS_INFO_IFD:e.GPS_INFO_IFD,INTEROPERABILITY_IFD:e.INTEROPERABILITY_IFD,FIRST_IFD:e.FIRST_IFD},a={36864:r.EXIF_IFD.ExifVersion,40960:r.EXIF_IFD.FlashpixVersion,40961:r.EXIF_IFD.ColorSpace,40962:r.EXIF_IFD.PixelXDimension,40963:r.EXIF_IFD.PixelYDimension,37121:r.EXIF_IFD.ComponentsConfiguration,37122:r.EXIF_IFD.CompressedBitsPerPixel,37500:r.EXIF_IFD.MakerNote,37510:r.EXIF_IFD.UserComment,40964:r.EXIF_IFD.RelatedSoundFile,36867:r.EXIF_IFD.DateTimeOriginal,36868:r.EXIF_IFD.DateTimeDigitized,37520:r.EXIF_IFD.SubSecTime,37521:r.EXIF_IFD.SubSecTimeOriginal,37522:r.EXIF_IFD.SubSecTimeDigitized,33434:r.EXIF_IFD.ExposureTime,33437:r.EXIF_IFD.FNumber,34850:r.EXIF_IFD.ExposureProgram,34852:r.EXIF_IFD.SpectralSensitivity,34855:r.EXIF_IFD.PhotographicSensitivity,34856:r.EXIF_IFD.OECF,37377:r.EXIF_IFD.ShutterSpeedValue,37378:r.EXIF_IFD.ApertureValue,37379:r.EXIF_IFD.BrightnessValue,37380:r.EXIF_IFD.ExposureBiasValue,37381:r.EXIF_IFD.MaxApertureValue,37382:r.EXIF_IFD.SubjectDistance,37383:r.EXIF_IFD.MeteringMode,37384:r.EXIF_IFD.LightSource,37385:r.EXIF_IFD.Flash,37396:r.EXIF_IFD.SubjectArea,37386:r.EXIF_IFD.FocalLength,41483:r.EXIF_IFD.FlashEnergy,41484:r.EXIF_IFD.SpatialFrequencyResponse,41486:r.EXIF_IFD.FocalPlaneXResolution,41487:r.EXIF_IFD.FocalPlaneYResolution,41488:r.EXIF_IFD.FocalPlaneResolutionUnit,41492:r.EXIF_IFD.SubjectLocation,41493:r.EXIF_IFD.ExposureIndex,41495:r.EXIF_IFD.SensingMethod,41728:r.EXIF_IFD.FileSource,41729:r.EXIF_IFD.SceneType,41730:r.EXIF_IFD.CFAPattern,41985:r.EXIF_IFD.CustomRendered,41986:r.EXIF_IFD.ExposureMode,41987:r.EXIF_IFD.WhiteBalance,41988:r.EXIF_IFD.DigitalZoomRation,41989:r.EXIF_IFD.FocalLengthIn35mmFilm,41990:r.EXIF_IFD.SceneCaptureType,41991:r.EXIF_IFD.GainControl,41992:r.EXIF_IFD.Contrast,41993:r.EXIF_IFD.Saturation,41994:r.EXIF_IFD.Sharpness,41995:r.EXIF_IFD.DeviceSettingDescription,41996:r.EXIF_IFD.SubjectDistanceRange,40965:r.ZEROTH_IFD.InteroperabilityIFDPointer,42016:r.EXIF_IFD.ImageUniqueID,42034:r.EXIF_IFD.LensSpecification,42035:r.EXIF_IFD.LensMake,42036:r.EXIF_IFD.LensModel,42037:r.EXIF_IFD.LensSerialNumber},s={256:r.ZEROTH_IFD.ImageWidth,257:r.ZEROTH_IFD.ImageLength,34665:r.ZEROTH_IFD.ExifIFDPointer,34853:r.ZEROTH_IFD.GPSInfoIFDPointer,40965:r.ZEROTH_IFD.InteroperabilityIFDPointer,258:r.ZEROTH_IFD.BitsPerSample,259:r.ZEROTH_IFD.Compression,262:r.ZEROTH_IFD.PhotometricInterpretation,274:r.ZEROTH_IFD.Orientation,277:r.ZEROTH_IFD.SamplesPerPixel,284:r.ZEROTH_IFD.PlanarConfiguration,530:r.ZEROTH_IFD.YCbCrSubSampling,531:r.ZEROTH_IFD.YCbCrPositioning,282:r.ZEROTH_IFD.XResolution,283:r.ZEROTH_IFD.YResolution,296:r.ZEROTH_IFD.ResolutionUnit,273:r.ZEROTH_IFD.StripOffsets,278:r.ZEROTH_IFD.RowsPerStrip,279:r.ZEROTH_IFD.StripByteCounts,513:r.ZEROTH_IFD.JPEGInterchangeFormat,514:r.ZEROTH_IFD.JPEGInterchangeFormatLength,301:r.ZEROTH_IFD.TransferFunction,318:r.ZEROTH_IFD.WhitePoint,319:r.ZEROTH_IFD.PrimaryChromaticities,529:r.ZEROTH_IFD.YcbCrCoefficients,532:r.ZEROTH_IFD.ReferenceBlackWhite,306:r.ZEROTH_IFD.DateTime,270:r.ZEROTH_IFD.ImageDescription,271:r.ZEROTH_IFD.Make,272:r.ZEROTH_IFD.Model,305:r.ZEROTH_IFD.Software,315:r.ZEROTH_IFD.Artist,33432:r.ZEROTH_IFD.Copyright},F={0:r.GPS_INFO_IFD.GPSVersionID,1:r.GPS_INFO_IFD.GPSLatitudeRef,2:r.GPS_INFO_IFD.GPSLatitude,3:r.GPS_INFO_IFD.GPSLongitudeRef,4:r.GPS_INFO_IFD.GPSLongitude,5:r.GPS_INFO_IFD.GPSAltitudeRef,6:r.GPS_INFO_IFD.GPSAltitude,7:r.GPS_INFO_IFD.GPSTimeStamp,8:r.GPS_INFO_IFD.GPSSatellites,9:r.GPS_INFO_IFD.GPSStatus,10:r.GPS_INFO_IFD.GPSMeasureMode,11:r.GPS_INFO_IFD.GPSDOP,12:r.GPS_INFO_IFD.GPSSpeedRef,13:r.GPS_INFO_IFD.GPSSpeed,14:r.GPS_INFO_IFD.GPSTrackRef,15:r.GPS_INFO_IFD.GPSTrack,16:r.GPS_INFO_IFD.GPSImgDirectionRef,17:r.GPS_INFO_IFD.GPSImgDirection,18:r.GPS_INFO_IFD.GPSMapDatum,19:r.GPS_INFO_IFD.GPSDestLatitudeRef,20:r.GPS_INFO_IFD.GPSDestLatitude,21:r.GPS_INFO_IFD.GPSDestLongitudeRef,22:r.GPS_INFO_IFD.GPSDestLongitude,23:r.GPS_INFO_IFD.GPSDestBearingRef,24:r.GPS_INFO_IFD.GPSDestBearing,25:r.GPS_INFO_IFD.GPSDestDistanceRef,26:r.GPS_INFO_IFD.GPSDestDistance,27:r.GPS_INFO_IFD.GPSProcessingMethod,28:r.GPS_INFO_IFD.GPSAreaInformation,29:r.GPS_INFO_IFD.GPSDateStamp,30:r.GPS_INFO_IFD.GPSDifferential},I={ExposureProgram:{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"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{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:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{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"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};e.EXIF_TAGS=r,e.ExifTags=a,e.GPSTags=F,e.StringValues=I,e.TiffTags=s,e.getExt=function(e){return e.split(".").at(-1)},e.load=class{buf;opts;constructor(e,t){this.buf=e,this.opts=Object.create(null),this.opts.debug=t?.debug??!1}readTags(e,t,i,n,o){let r,a,s,F=e.getUint16(i,!o),I={};for(s=0;s<F;s++)r=i+12*s+2,a=n[e.getUint16(r,!o)],!a&&this.opts.debug&&console.log("Unknown tag: "+e.getUint16(r,!o)),I[a]=this.readTagValue(e,r,t,i,o);return I}readTagValue(e,t,i,n,o){let r,a,s,F,I,l=e.getUint16(t+2,!o),S=e.getUint32(t+4,!o),u=e.getUint32(t+8,!o)+i;switch(l){case 1:case 7:if(1==S)return e.getUint8(t+8);r=S>4?u:t+8,a=[];for(let t=0;t<S;t++)a[t]=e.getUint8(r+t);return a;case 2:return r=S>4?u:t+8,this.getStringFromDB(e,r,S-1);case 3:if(1==S)return e.getUint16(t+8,!o);r=S>2?u:t+8,a=[];for(let t=0;t<S;t++)a[t]=e.getUint16(r+2*t,!o);return a;case 4:if(1==S)return e.getUint32(t+8,!o);a=[];for(let t=0;t<S;t++)a[t]=e.getUint32(u+4*t,!o);return a;case 5:if(1==S)return F=e.getUint32(u,!o),I=e.getUint32(u+4,!o),s=new Number(F/I),s.numerator=F,s.denominator=I,s;a=[];for(let t=0;t<S;t++)F=e.getUint32(u+8*t,!o),I=e.getUint32(u+4+8*t,!o),a[t]=new Number(F/I),a[t].numerator=F,a[t].denominator=I;return a;case 9:if(1==S)return e.getInt32(t+8,!o);a=[];for(let t=0;t<S;t++)a[t]=e.getInt32(u+4*t,!o);return a;case 10:if(1==S)return e.getInt32(u,!o)/e.getInt32(u+4,!o);a=[];for(let t=0;t<S;t++)a[t]=e.getInt32(u+8*t,!o)/e.getInt32(u+4+8*t,!o);return a}}getStringFromDB(e,t,i){let n="";for(let o=t;o<t+i;o++)n+=String.fromCharCode(e.getUint8(o));return n}readEXIFData(e,t){let i,n,o,r,l;if(18761==e.getUint16(t))i=!1;else{if(19789!=e.getUint16(t))return this.opts.debug&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;i=!0}if(42!=e.getUint16(t+2,!i))return this.opts.debug&&console.log("Not valid TIFF data! (no 0x002A)"),!1;const S=e.getUint32(t+4,!i);if(S<8)return this.opts.debug&&console.log("Not valid TIFF data! (First offset less than 8)"),!1;if(n=this.readTags(e,t,t+S,s,i),n.ExifIFDPointer)for(o in r=this.readTags(e,t,t+n.ExifIFDPointer,a,i),r){switch(o){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":r[o]=I[o][r[o]];break;case"ExifVersion":case"FlashpixVersion":r[o]=String.fromCharCode(r[o][0],r[o][1],r[o][2],r[o][3]);break;case"ComponentsConfiguration":r[o]=I.Components[r[o][0]]+I.Components[r[o][1]]+I.Components[r[o][2]]+I.Components[r[o][3]]}n[o]=r[o]}if(n.GPSInfoIFDPointer)for(o in l=this.readTags(e,t,t+n.GPSInfoIFDPointer,F,i),l){if("GPSVersionID"===o)l[o]=l[o][0]+"."+l[o][1]+"."+l[o][2]+"."+l[o][3];n[o]=l[o]}return n}heic(){const e=new DataView(this.buf),t=e.getUint32(0),i=e.getUint32(t);let n=-1,o=-1;for(let r=t;r<i+t;r++)"Exif"==this.getStringFromDB(e,r,4)?n=r:"iloc"==this.getStringFromDB(e,r,4)&&(o=r);if(-1==n||-1==o)return null;const r=e.getUint16(n-4);for(let a=o+12;a<i+t;a+=16){if(e.getUint16(a)==r){const t=e.getUint32(a+8);e.getUint32(a+12);return n=t+(4+e.getUint32(t)),this.readEXIFData(e,n)}}return null}jpeg(){const e=this.buf,t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return this.opts.debug&&console.log("Not a valid JPEG"),!1;let i,n=2,o=e.byteLength;for(;n<o;){if(255!=t.getUint8(n))return this.opts.debug&&console.log("Not a valid marker at offset "+n+", found: "+t.getUint8(n)),!1;if(i=t.getUint8(n+1),this.opts.debug&&console.log(i),225==i)return this.opts.debug&&console.log("Found 0xFFE1 marker"),this.readEXIFData(t,n+4+6);n+=2+t.getUint16(n+2)}}jpg(){return this.jpeg()}raw(){const e=this.buf;console.log(e)}},Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -33,277 +33,467 @@ /** | ||
// 0th IFD | ||
exports.ZEROTH_IFD = void 0; | ||
(function (ZEROTH_IFD) { | ||
ZEROTH_IFD["Compression"] = "Compression"; | ||
ZEROTH_IFD["ImageDescription"] = "ImageDescription"; | ||
ZEROTH_IFD["Make"] = "Make"; | ||
ZEROTH_IFD["Model"] = "Model"; | ||
ZEROTH_IFD["XResolution"] = "XResolution"; | ||
ZEROTH_IFD["YResolution"] = "YResolution"; | ||
ZEROTH_IFD["ResolutionUnit"] = "ResolutionUnit"; | ||
ZEROTH_IFD["TransferFunction"] = "TransferFunction"; | ||
ZEROTH_IFD["Artist"] = "Artist"; | ||
ZEROTH_IFD["WhitePoint"] = "WhitePoint"; | ||
ZEROTH_IFD["PrimaryChromaticities"] = "PrimaryChromaticities"; | ||
ZEROTH_IFD["YcbCrCoefficients"] = "YcbCrCoefficients"; | ||
ZEROTH_IFD["ReferenceBlackWhite"] = "ReferenceBlackWhite"; | ||
ZEROTH_IFD["Copyright"] = "Copyright"; | ||
ZEROTH_IFD["ImageWidth"] = "ImageWidth"; | ||
ZEROTH_IFD["ImageLength"] = "ImageLength"; | ||
ZEROTH_IFD["BitsPerSample"] = "BitsPerSample"; | ||
ZEROTH_IFD["PhotometricInterpretation"] = "PhotometricInterpretation"; | ||
ZEROTH_IFD["Orientation"] = "Orientation"; | ||
ZEROTH_IFD["SamplesPerPixel"] = "SamplesPerPixel"; | ||
ZEROTH_IFD["PlanarConfiguration"] = "PlanarConfiguration"; | ||
ZEROTH_IFD["YCbCrSubSampling"] = "YCbCrSubSampling"; | ||
ZEROTH_IFD["YCbCrPositioning"] = "YCbCrPositioning"; | ||
ZEROTH_IFD["StripOffsets"] = "StripOffsets"; | ||
ZEROTH_IFD["RowsPerStrip"] = "RowsPerStrip"; | ||
ZEROTH_IFD["StripByteCounts"] = "StripByteCounts"; | ||
ZEROTH_IFD["JPEGInterchangeFormat"] = "JPEGInterchangeFormat"; | ||
ZEROTH_IFD["JPEGInterchangeFormatLength"] = "JPEGInterchangeFormatLength"; | ||
ZEROTH_IFD["Software"] = "Software"; | ||
ZEROTH_IFD["DateTime"] = "DateTime"; | ||
ZEROTH_IFD["ExifIFDPointer"] = "Exif IFD Pointer"; | ||
ZEROTH_IFD["GPSInfoIFDPointer"] = "GPS Info IFD Pointer"; | ||
ZEROTH_IFD["InteroperabilityIFDPointer"] = "Interoperability IFD Pointer"; | ||
})(exports.ZEROTH_IFD || (exports.ZEROTH_IFD = {})); | ||
// Exif IFD | ||
exports.EXIF_IFD = void 0; | ||
(function (EXIF_IFD) { | ||
EXIF_IFD["ExposureTime"] = "ExposureTime"; | ||
EXIF_IFD["FNumber"] = "FNumber"; | ||
EXIF_IFD["ExposureProgram"] = "ExposureProgram"; | ||
EXIF_IFD["SpectralSensitivity"] = "SpectralSensitivity"; | ||
EXIF_IFD["PhotographicSensitivity"] = "PhotographicSensitivity"; | ||
EXIF_IFD["OECF"] = "OECF"; | ||
EXIF_IFD["SensitivityType"] = "SensitivityType"; | ||
EXIF_IFD["StandardOutputSensitivity"] = "StandardOutputSensitivity"; | ||
EXIF_IFD["RecommendedExposurelndex"] = "RecommendedExposurelndex"; | ||
EXIF_IFD["ISOSpeed"] = "ISOSpeed"; | ||
EXIF_IFD["ISOSpeedLatitudeyyy"] = "ISOSpeedLatitudeyyy"; | ||
EXIF_IFD["ISOSpeedLatitudezzz"] = "ISOSpeedLatitudezzz"; | ||
EXIF_IFD["ExifVersion"] = "ExifVersion"; | ||
EXIF_IFD["DateTimeOriginal"] = "DateTimeOriginal"; | ||
EXIF_IFD["DateTimeDigitized"] = "DateTimeDigitized"; | ||
EXIF_IFD["ComponentsConfiguration"] = "ComponentsConfiguration"; | ||
EXIF_IFD["ShutterSpeedValue"] = "ShutterSpeedValue"; | ||
EXIF_IFD["ApertureValue"] = "ApertureValue"; | ||
EXIF_IFD["BrightnessValue"] = "Brightness Value"; | ||
EXIF_IFD["ExposureBiasValue"] = "ExposureBiasValue"; | ||
EXIF_IFD["MaxApertureValue"] = "MaxAperture Value"; | ||
EXIF_IFD["SubjectDistance"] = "SubjectDistance"; | ||
EXIF_IFD["MeteringMode"] = "MeteringMode"; | ||
EXIF_IFD["LightSource"] = "LightSource"; | ||
EXIF_IFD["Flash"] = "Flash"; | ||
EXIF_IFD["FocalLength"] = "FocalLength"; | ||
EXIF_IFD["MakerNote"] = "MakerNote"; | ||
EXIF_IFD["UserComment"] = "UserComment"; | ||
EXIF_IFD["SubSecTime"] = "SubSecTime"; | ||
EXIF_IFD["SubSecTimeOriginal"] = "SubSecTimeOriginal"; | ||
EXIF_IFD["SubSecTimeDigitized"] = "SubSecTimeDigitized"; | ||
EXIF_IFD["FlashpixVersion"] = "FlashpixVersion"; | ||
EXIF_IFD["ColorSpace"] = "ColorSpace"; | ||
EXIF_IFD["RelatedSoundFile"] = "RelatedSoundFile"; | ||
EXIF_IFD["FlashEnergy"] = "FlashEnergy"; | ||
EXIF_IFD["SpatialFrequencyResponse"] = "SpatialFrequencyResponse"; | ||
EXIF_IFD["FocalPlaneX-Resolution"] = "FocalPlaneX-Resolution"; | ||
EXIF_IFD["FocalPlaneY-Resolution"] = "FocalPlaneY-Resolution"; | ||
EXIF_IFD["FocalPlane-ResolutionUnit"] = "FocalPlane-ResolutionUnit"; | ||
EXIF_IFD["Exposurelndex"] = "Exposurelndex"; | ||
EXIF_IFD["SensingMethod"] = "SensingMethod"; | ||
EXIF_IFD["FileSource"] = "FileSource"; | ||
EXIF_IFD["SceneType"] = "SceneType"; | ||
EXIF_IFD["CFApattern"] = "CFApattern"; | ||
EXIF_IFD["ExposureMode"] = "ExposureMode"; | ||
EXIF_IFD["WhiteBalance"] = "WhiteBalance"; | ||
EXIF_IFD["DigitalZoomRatio"] = "DigitalZoomRatio"; | ||
EXIF_IFD["FocalLengthIn35mmFilm"] = "FocalLengthIn35mmFilm"; | ||
EXIF_IFD["SceneCapture Type"] = "SceneCapture Type"; | ||
EXIF_IFD["GainControl"] = "GainControl"; | ||
EXIF_IFD["Contrast"] = "Contrast"; | ||
EXIF_IFD["Saturation"] = "Saturation"; | ||
EXIF_IFD["Sharpness"] = "Sharpness"; | ||
EXIF_IFD["DeviceSettingDescription"] = "DeviceSettingDescription"; | ||
EXIF_IFD["SubjectDistanceRange"] = "SubjectDistanceRange"; | ||
EXIF_IFD["ImageUniquelD"] = "ImageUniquelD"; | ||
EXIF_IFD["CameraOwnerName"] = "CameraOwnerName"; | ||
EXIF_IFD["BodySerialNumber"] = "BodySerialNumber"; | ||
EXIF_IFD["LensSpecification"] = "LensSpecification"; | ||
EXIF_IFD["LensMake"] = "LensMake"; | ||
EXIF_IFD["LensModel"] = "LensModel"; | ||
EXIF_IFD["LensSerialNumber"] = "LensSerialNumber"; | ||
EXIF_IFD["Gamma"] = "Gamma"; | ||
EXIF_IFD["CompressedBitsPerPixel"] = "CompressedBitsPerPixel"; | ||
EXIF_IFD["PixelXDimension"] = "PixelXDimension"; | ||
EXIF_IFD["PixelYDimension"] = "PixelYDimension"; | ||
EXIF_IFD["SubjectArea"] = "SubjectArea"; | ||
EXIF_IFD["FocalPlaneXResolution"] = "FocalPlaneXResolution"; | ||
EXIF_IFD["FocalPlaneYResolution"] = "FocalPlaneYResolution"; | ||
EXIF_IFD["FocalPlaneResolutionUnit"] = "FocalPlaneResolutionUnit"; | ||
EXIF_IFD["SubjectLocation"] = "SubjectLocation"; | ||
EXIF_IFD["ExposureIndex"] = "ExposureIndex"; | ||
EXIF_IFD["CFAPattern"] = "CFAPattern"; | ||
EXIF_IFD["CustomRendered"] = "CustomRendered"; | ||
EXIF_IFD["DigitalZoomRation"] = "DigitalZoomRation"; | ||
EXIF_IFD["SceneCaptureType"] = "SceneCaptureType"; | ||
EXIF_IFD["ImageUniqueID"] = "ImageUniqueID"; | ||
})(exports.EXIF_IFD || (exports.EXIF_IFD = {})); | ||
// Interoperability IFD | ||
exports.INTEROPERABILITY_IFD = void 0; | ||
(function (INTEROPERABILITY_IFD) { | ||
INTEROPERABILITY_IFD["InteroperabilityIndex"] = "InteroperabilityIndex"; | ||
})(exports.INTEROPERABILITY_IFD || (exports.INTEROPERABILITY_IFD = {})); | ||
// GPS info IFD | ||
exports.GPS_INFO_IFD = void 0; | ||
(function (GPS_INFO_IFD) { | ||
GPS_INFO_IFD["GPSVersionID"] = "GPSVersionID"; | ||
GPS_INFO_IFD["GPSLatitudeRef"] = "GPSLatitudeRef"; | ||
GPS_INFO_IFD["GPSLatitude"] = "GPSLatitude"; | ||
GPS_INFO_IFD["GPSImgDirection"] = "GPSImgDirection"; | ||
GPS_INFO_IFD["GPSLongitudeRef"] = "GPSLongitudeRef"; | ||
GPS_INFO_IFD["GPSLongitude"] = "GPSLongitude"; | ||
GPS_INFO_IFD["GPSAltitudeRef"] = "GPSAltitudeRef"; | ||
GPS_INFO_IFD["GPSAltitude"] = "GPSAltitude"; | ||
GPS_INFO_IFD["GPSTimeStamp"] = "GPSTimeStamp"; | ||
GPS_INFO_IFD["GPSSatellites"] = "GPSSatellites"; | ||
GPS_INFO_IFD["GPSStatus"] = "GPSStatus"; | ||
GPS_INFO_IFD["GPSMeasureMode"] = "GPSMeasureMode"; | ||
GPS_INFO_IFD["GPSDOP"] = "GPSOP"; | ||
GPS_INFO_IFD["GPSSpeedRef"] = "GPSSpeedRef"; | ||
GPS_INFO_IFD["GPSSpeed"] = "GPSSpeed"; | ||
GPS_INFO_IFD["GPSTrackRef"] = "GPSTrackRef"; | ||
GPS_INFO_IFD["GPSTrack"] = "GPSTrack"; | ||
GPS_INFO_IFD["GPSImgDirectionRef"] = "GPSImgDirectionRef"; | ||
GPS_INFO_IFD["GPSImgDirectionGPSMapDatum"] = "GP SImgDirection GPSMapDatum"; | ||
GPS_INFO_IFD["GPSDestLatitudeRef"] = "GPSDestLatitudeRef"; | ||
GPS_INFO_IFD["GPSDestLatitude"] = "GPSDestLatitude"; | ||
GPS_INFO_IFD["GPSDestLongitudeRef"] = "GPSDestLongitudeRef"; | ||
GPS_INFO_IFD["GPSDestLongitude"] = "GPSDestLongitude"; | ||
GPS_INFO_IFD["GPSDestBearingRef"] = "GPSDestBearingRef"; | ||
GPS_INFO_IFD["GPSDestBearing"] = "GPSDestBearing"; | ||
GPS_INFO_IFD["GPSDestDistanceRef"] = "GPSDestDistanceRef"; | ||
GPS_INFO_IFD["GPSDestDistance"] = "GPSDestDistance"; | ||
GPS_INFO_IFD["GPSProcessingMethod"] = "GPSProcessingMethod"; | ||
GPS_INFO_IFD["GPSArealnformation"] = "GPSArealnformation"; | ||
GPS_INFO_IFD["GPSDateStamp"] = "GPSDateStamp"; | ||
GPS_INFO_IFD["GPSDifferential"] = "GPSDifferential"; | ||
GPS_INFO_IFD["GPSHPositioningError"] = "GPSHPositioningError"; | ||
GPS_INFO_IFD["GPSMapDatum"] = "GPSMapDatum"; | ||
GPS_INFO_IFD["GPSAreaInformation"] = "GPSAreaInformation"; | ||
})(exports.GPS_INFO_IFD || (exports.GPS_INFO_IFD = {})); | ||
// 1st IFD | ||
exports.FIRST_IFD = void 0; | ||
(function (FIRST_IFD) { | ||
FIRST_IFD["Compression"] = "Compression"; | ||
FIRST_IFD["ImageDescription"] = "ImageDescription"; | ||
FIRST_IFD["Make"] = "Make"; | ||
FIRST_IFD["Model"] = "Model"; | ||
FIRST_IFD["TransferFunction"] = "TransferFunction"; | ||
FIRST_IFD["Artist"] = "Artist"; | ||
FIRST_IFD["WhitePoint"] = "WhitePoint"; | ||
FIRST_IFD["PrimaryChromaticities"] = "PrimaryChromaticities"; | ||
FIRST_IFD["YCbCrCoefficients"] = "YCbCrCoefficients"; | ||
FIRST_IFD["ReferenceBlackWhite"] = "ReferenceBlackWhite"; | ||
FIRST_IFD["Copyright"] = "Copyright"; | ||
FIRST_IFD["ExifIFDPointer"] = "Exif IFD Pointer"; | ||
FIRST_IFD["GPSInfoIFDPointer"] = "GPS Info IFD Pointer"; | ||
})(exports.FIRST_IFD || (exports.FIRST_IFD = {})); | ||
/** | ||
* based on CIPA DC-008-2012 Exif Version 2.3 | ||
* @see https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf | ||
*/ | ||
const EXIF_TAGS = { | ||
ZEROTH_IFD: exports.ZEROTH_IFD, | ||
EXIF_IFD: exports.EXIF_IFD, | ||
GPS_INFO_IFD: exports.GPS_INFO_IFD, | ||
INTEROPERABILITY_IFD: exports.INTEROPERABILITY_IFD, | ||
FIRST_IFD: exports.FIRST_IFD, | ||
}; | ||
const ExifTags = { | ||
// version tags | ||
0x9000: "ExifVersion", | ||
0xA000: "FlashpixVersion", | ||
0x9000: EXIF_TAGS.EXIF_IFD['ExifVersion'], | ||
0xa000: EXIF_TAGS.EXIF_IFD['FlashpixVersion'], | ||
// colorspace tags | ||
0xA001: "ColorSpace", | ||
0xa001: EXIF_TAGS.EXIF_IFD['ColorSpace'], | ||
// image configuration | ||
0xA002: "PixelXDimension", | ||
0xA003: "PixelYDimension", | ||
0x9101: "ComponentsConfiguration", | ||
0x9102: "CompressedBitsPerPixel", | ||
0xa002: EXIF_TAGS.EXIF_IFD['PixelXDimension'], | ||
0xa003: EXIF_TAGS.EXIF_IFD['PixelYDimension'], | ||
0x9101: EXIF_TAGS.EXIF_IFD['ComponentsConfiguration'], | ||
0x9102: EXIF_TAGS.EXIF_IFD['CompressedBitsPerPixel'], | ||
// user information | ||
0x927C: "MakerNote", | ||
0x9286: "UserComment", | ||
0x927c: EXIF_TAGS.EXIF_IFD['MakerNote'], | ||
0x9286: EXIF_TAGS.EXIF_IFD['UserComment'], | ||
// related file | ||
0xA004: "RelatedSoundFile", | ||
0xa004: EXIF_TAGS.EXIF_IFD['RelatedSoundFile'], | ||
// date and time | ||
0x9003: "DateTimeOriginal", | ||
0x9004: "DateTimeDigitized", | ||
0x9290: "SubsecTime", | ||
0x9291: "SubsecTimeOriginal", | ||
0x9292: "SubsecTimeDigitized", | ||
0x9003: EXIF_TAGS.EXIF_IFD['DateTimeOriginal'], | ||
0x9004: EXIF_TAGS.EXIF_IFD['DateTimeDigitized'], | ||
0x9290: EXIF_TAGS.EXIF_IFD['SubSecTime'], | ||
0x9291: EXIF_TAGS.EXIF_IFD['SubSecTimeOriginal'], | ||
0x9292: EXIF_TAGS.EXIF_IFD['SubSecTimeDigitized'], | ||
// picture-taking conditions | ||
0x829A: "ExposureTime", | ||
0x829D: "FNumber", | ||
0x8822: "ExposureProgram", | ||
0x8824: "SpectralSensitivity", | ||
0x8827: "ISOSpeedRatings", | ||
0x8828: "OECF", | ||
0x9201: "ShutterSpeedValue", | ||
0x9202: "ApertureValue", | ||
0x9203: "BrightnessValue", | ||
0x9204: "ExposureBias", | ||
0x9205: "MaxApertureValue", | ||
0x9206: "SubjectDistance", | ||
0x9207: "MeteringMode", | ||
0x9208: "LightSource", | ||
0x9209: "Flash", | ||
0x9214: "SubjectArea", | ||
0x920A: "FocalLength", | ||
0xA20B: "FlashEnergy", | ||
0xA20C: "SpatialFrequencyResponse", | ||
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: "DigitalZoomRation", | ||
0xA405: "FocalLengthIn35mmFilm", | ||
0xA406: "SceneCaptureType", | ||
0xA407: "GainControl", | ||
0xA408: "Contrast", | ||
0xA409: "Saturation", | ||
0xA40A: "Sharpness", | ||
0xA40B: "DeviceSettingDescription", | ||
0xA40C: "SubjectDistanceRange", | ||
0x829a: EXIF_TAGS.EXIF_IFD['ExposureTime'], | ||
0x829d: EXIF_TAGS.EXIF_IFD['FNumber'], | ||
0x8822: EXIF_TAGS.EXIF_IFD['ExposureProgram'], | ||
0x8824: EXIF_TAGS.EXIF_IFD['SpectralSensitivity'], | ||
0x8827: EXIF_TAGS.EXIF_IFD['PhotographicSensitivity'], | ||
0x8828: EXIF_TAGS.EXIF_IFD['OECF'], | ||
0x9201: EXIF_TAGS.EXIF_IFD['ShutterSpeedValue'], | ||
0x9202: EXIF_TAGS.EXIF_IFD['ApertureValue'], | ||
0x9203: EXIF_TAGS.EXIF_IFD['BrightnessValue'], | ||
0x9204: EXIF_TAGS.EXIF_IFD['ExposureBiasValue'], | ||
0x9205: EXIF_TAGS.EXIF_IFD['MaxApertureValue'], | ||
0x9206: EXIF_TAGS.EXIF_IFD['SubjectDistance'], | ||
0x9207: EXIF_TAGS.EXIF_IFD['MeteringMode'], | ||
0x9208: EXIF_TAGS.EXIF_IFD['LightSource'], | ||
0x9209: EXIF_TAGS.EXIF_IFD['Flash'], | ||
0x9214: EXIF_TAGS.EXIF_IFD['SubjectArea'], | ||
0x920a: EXIF_TAGS.EXIF_IFD['FocalLength'], | ||
0xa20b: EXIF_TAGS.EXIF_IFD['FlashEnergy'], | ||
0xa20c: EXIF_TAGS.EXIF_IFD['SpatialFrequencyResponse'], | ||
0xa20e: EXIF_TAGS.EXIF_IFD['FocalPlaneXResolution'], | ||
0xa20f: EXIF_TAGS.EXIF_IFD['FocalPlaneYResolution'], | ||
0xa210: EXIF_TAGS.EXIF_IFD['FocalPlaneResolutionUnit'], | ||
0xa214: EXIF_TAGS.EXIF_IFD['SubjectLocation'], | ||
0xa215: EXIF_TAGS.EXIF_IFD['ExposureIndex'], | ||
0xa217: EXIF_TAGS.EXIF_IFD['SensingMethod'], | ||
0xa300: EXIF_TAGS.EXIF_IFD['FileSource'], | ||
0xa301: EXIF_TAGS.EXIF_IFD['SceneType'], | ||
0xa302: EXIF_TAGS.EXIF_IFD['CFAPattern'], | ||
0xa401: EXIF_TAGS.EXIF_IFD['CustomRendered'], | ||
0xa402: EXIF_TAGS.EXIF_IFD['ExposureMode'], | ||
0xa403: EXIF_TAGS.EXIF_IFD['WhiteBalance'], | ||
0xa404: EXIF_TAGS.EXIF_IFD['DigitalZoomRation'], | ||
0xa405: EXIF_TAGS.EXIF_IFD['FocalLengthIn35mmFilm'], | ||
0xa406: EXIF_TAGS.EXIF_IFD['SceneCaptureType'], | ||
0xa407: EXIF_TAGS.EXIF_IFD['GainControl'], | ||
0xa408: EXIF_TAGS.EXIF_IFD['Contrast'], | ||
0xa409: EXIF_TAGS.EXIF_IFD['Saturation'], | ||
0xa40a: EXIF_TAGS.EXIF_IFD['Sharpness'], | ||
0xa40b: EXIF_TAGS.EXIF_IFD['DeviceSettingDescription'], | ||
0xa40c: EXIF_TAGS.EXIF_IFD['SubjectDistanceRange'], | ||
// other tags | ||
0xA005: "InteroperabilityIFDPointer", | ||
0xA420: "ImageUniqueID", | ||
0xa005: EXIF_TAGS.ZEROTH_IFD['InteroperabilityIFDPointer'], | ||
0xa420: EXIF_TAGS.EXIF_IFD['ImageUniqueID'], | ||
// Lens info | ||
0xA432: "LensSpecification", | ||
0xA433: "LensMake", | ||
0xA434: "LensModel", | ||
0xA435: "LensSerialNumber", | ||
0xa432: EXIF_TAGS.EXIF_IFD['LensSpecification'], | ||
0xa433: EXIF_TAGS.EXIF_IFD['LensMake'], | ||
0xa434: EXIF_TAGS.EXIF_IFD['LensModel'], | ||
0xa435: EXIF_TAGS.EXIF_IFD['LensSerialNumber'], | ||
}; | ||
const TiffTags = { | ||
0x0100: "ImageWidth", | ||
0x0101: "ImageHeight", | ||
0x8769: "ExifIFDPointer", | ||
0x8825: "GPSInfoIFDPointer", | ||
0xA005: "InteroperabilityIFDPointer", | ||
0x0102: "BitsPerSample", | ||
0x0103: "Compression", | ||
0x0106: "PhotometricInterpretation", | ||
0x0112: "Orientation", | ||
0x0115: "SamplesPerPixel", | ||
0x011C: "PlanarConfiguration", | ||
0x0212: "YCbCrSubSampling", | ||
0x0213: "YCbCrPositioning", | ||
0x011A: "XResolution", | ||
0x011B: "YResolution", | ||
0x0128: "ResolutionUnit", | ||
0x0111: "StripOffsets", | ||
0x0116: "RowsPerStrip", | ||
0x0117: "StripByteCounts", | ||
0x0201: "JPEGInterchangeFormat", | ||
0x0202: "JPEGInterchangeFormatLength", | ||
0x012D: "TransferFunction", | ||
0x013E: "WhitePoint", | ||
0x013F: "PrimaryChromaticities", | ||
0x0211: "YCbCrCoefficients", | ||
0x0214: "ReferenceBlackWhite", | ||
0x0132: "DateTime", | ||
0x010E: "ImageDescription", | ||
0x010F: "Make", | ||
0x0110: "Model", | ||
0x0131: "Software", | ||
0x013B: "Artist", | ||
0x8298: "Copyright" | ||
0x0100: EXIF_TAGS.ZEROTH_IFD['ImageWidth'], | ||
0x0101: EXIF_TAGS.ZEROTH_IFD['ImageLength'], | ||
0x8769: EXIF_TAGS.ZEROTH_IFD['ExifIFDPointer'], | ||
0x8825: EXIF_TAGS.ZEROTH_IFD['GPSInfoIFDPointer'], | ||
0xa005: EXIF_TAGS.ZEROTH_IFD['InteroperabilityIFDPointer'], | ||
0x0102: EXIF_TAGS.ZEROTH_IFD['BitsPerSample'], | ||
0x0103: EXIF_TAGS.ZEROTH_IFD['Compression'], | ||
0x0106: EXIF_TAGS.ZEROTH_IFD['PhotometricInterpretation'], | ||
0x0112: EXIF_TAGS.ZEROTH_IFD['Orientation'], | ||
0x0115: EXIF_TAGS.ZEROTH_IFD['SamplesPerPixel'], | ||
0x011c: EXIF_TAGS.ZEROTH_IFD['PlanarConfiguration'], | ||
0x0212: EXIF_TAGS.ZEROTH_IFD['YCbCrSubSampling'], | ||
0x0213: EXIF_TAGS.ZEROTH_IFD['YCbCrPositioning'], | ||
0x011a: EXIF_TAGS.ZEROTH_IFD['XResolution'], | ||
0x011b: EXIF_TAGS.ZEROTH_IFD['YResolution'], | ||
0x0128: EXIF_TAGS.ZEROTH_IFD['ResolutionUnit'], | ||
0x0111: EXIF_TAGS.ZEROTH_IFD['StripOffsets'], | ||
0x0116: EXIF_TAGS.ZEROTH_IFD['RowsPerStrip'], | ||
0x0117: EXIF_TAGS.ZEROTH_IFD['StripByteCounts'], | ||
0x0201: EXIF_TAGS.ZEROTH_IFD['JPEGInterchangeFormat'], | ||
0x0202: EXIF_TAGS.ZEROTH_IFD['JPEGInterchangeFormatLength'], | ||
0x012d: EXIF_TAGS.ZEROTH_IFD['TransferFunction'], | ||
0x013e: EXIF_TAGS.ZEROTH_IFD['WhitePoint'], | ||
0x013f: EXIF_TAGS.ZEROTH_IFD['PrimaryChromaticities'], | ||
0x0211: EXIF_TAGS.ZEROTH_IFD.YcbCrCoefficients, | ||
0x0214: EXIF_TAGS.ZEROTH_IFD['ReferenceBlackWhite'], | ||
0x0132: EXIF_TAGS.ZEROTH_IFD['DateTime'], | ||
0x010e: EXIF_TAGS.ZEROTH_IFD['ImageDescription'], | ||
0x010f: EXIF_TAGS.ZEROTH_IFD['Make'], | ||
0x0110: EXIF_TAGS.ZEROTH_IFD['Model'], | ||
0x0131: EXIF_TAGS.ZEROTH_IFD['Software'], | ||
0x013b: EXIF_TAGS.ZEROTH_IFD['Artist'], | ||
0x8298: EXIF_TAGS.ZEROTH_IFD['Copyright'], | ||
}; | ||
const GPSTags = { | ||
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" | ||
0x0000: EXIF_TAGS.GPS_INFO_IFD['GPSVersionID'], | ||
0x0001: EXIF_TAGS.GPS_INFO_IFD['GPSLatitudeRef'], | ||
0x0002: EXIF_TAGS.GPS_INFO_IFD['GPSLatitude'], | ||
0x0003: EXIF_TAGS.GPS_INFO_IFD['GPSLongitudeRef'], | ||
0x0004: EXIF_TAGS.GPS_INFO_IFD['GPSLongitude'], | ||
0x0005: EXIF_TAGS.GPS_INFO_IFD['GPSAltitudeRef'], | ||
0x0006: EXIF_TAGS.GPS_INFO_IFD['GPSAltitude'], | ||
0x0007: EXIF_TAGS.GPS_INFO_IFD['GPSTimeStamp'], | ||
0x0008: EXIF_TAGS.GPS_INFO_IFD['GPSSatellites'], | ||
0x0009: EXIF_TAGS.GPS_INFO_IFD['GPSStatus'], | ||
0x000a: EXIF_TAGS.GPS_INFO_IFD['GPSMeasureMode'], | ||
0x000b: EXIF_TAGS.GPS_INFO_IFD['GPSDOP'], | ||
0x000c: EXIF_TAGS.GPS_INFO_IFD['GPSSpeedRef'], | ||
0x000d: EXIF_TAGS.GPS_INFO_IFD['GPSSpeed'], | ||
0x000e: EXIF_TAGS.GPS_INFO_IFD['GPSTrackRef'], | ||
0x000f: EXIF_TAGS.GPS_INFO_IFD['GPSTrack'], | ||
0x0010: EXIF_TAGS.GPS_INFO_IFD['GPSImgDirectionRef'], | ||
0x0011: EXIF_TAGS.GPS_INFO_IFD['GPSImgDirection'], | ||
0x0012: EXIF_TAGS.GPS_INFO_IFD['GPSMapDatum'], | ||
0x0013: EXIF_TAGS.GPS_INFO_IFD['GPSDestLatitudeRef'], | ||
0x0014: EXIF_TAGS.GPS_INFO_IFD['GPSDestLatitude'], | ||
0x0015: EXIF_TAGS.GPS_INFO_IFD['GPSDestLongitudeRef'], | ||
0x0016: EXIF_TAGS.GPS_INFO_IFD['GPSDestLongitude'], | ||
0x0017: EXIF_TAGS.GPS_INFO_IFD['GPSDestBearingRef'], | ||
0x0018: EXIF_TAGS.GPS_INFO_IFD['GPSDestBearing'], | ||
0x0019: EXIF_TAGS.GPS_INFO_IFD['GPSDestDistanceRef'], | ||
0x001a: EXIF_TAGS.GPS_INFO_IFD['GPSDestDistance'], | ||
0x001b: EXIF_TAGS.GPS_INFO_IFD['GPSProcessingMethod'], | ||
0x001c: EXIF_TAGS.GPS_INFO_IFD['GPSAreaInformation'], | ||
0x001d: EXIF_TAGS.GPS_INFO_IFD['GPSDateStamp'], | ||
0x001e: EXIF_TAGS.GPS_INFO_IFD['GPSDifferential'], | ||
}; | ||
const StringValues = { | ||
ExposureProgram: { | ||
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" | ||
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', | ||
}, | ||
MeteringMode: { | ||
0: "Unknown", | ||
1: "Average", | ||
2: "CenterWeightedAverage", | ||
3: "Spot", | ||
4: "MultiSpot", | ||
5: "Pattern", | ||
6: "Partial", | ||
255: "Other" | ||
0: 'Unknown', | ||
1: 'Average', | ||
2: 'CenterWeightedAverage', | ||
3: 'Spot', | ||
4: 'MultiSpot', | ||
5: 'Pattern', | ||
6: 'Partial', | ||
255: 'Other', | ||
}, | ||
LightSource: { | ||
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" | ||
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: { | ||
0x0000: "Flash did not fire", | ||
0x0001: "Flash fired", | ||
0x0005: "Strobe return light not detected", | ||
0x0007: "Strobe return light detected", | ||
0x0009: "Flash fired, compulsory flash mode", | ||
0x000D: "Flash fired, compulsory flash mode, return light not detected", | ||
0x000F: "Flash fired, compulsory flash mode, return light detected", | ||
0x0010: "Flash did not fire, compulsory flash mode", | ||
0x0018: "Flash did not fire, auto mode", | ||
0x0019: "Flash fired, auto mode", | ||
0x001D: "Flash fired, auto mode, return light not detected", | ||
0x001F: "Flash fired, auto mode, return light detected", | ||
0x0020: "No flash function", | ||
0x0041: "Flash fired, red-eye reduction mode", | ||
0x0045: "Flash fired, red-eye reduction mode, return light not detected", | ||
0x0047: "Flash fired, red-eye reduction mode, return light detected", | ||
0x0049: "Flash fired, compulsory flash mode, red-eye reduction mode", | ||
0x004D: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", | ||
0x004F: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", | ||
0x0059: "Flash fired, auto mode, red-eye reduction mode", | ||
0x005D: "Flash fired, auto mode, return light not detected, red-eye reduction mode", | ||
0x005F: "Flash fired, auto mode, return light detected, red-eye reduction mode" | ||
0x0000: 'Flash did not fire', | ||
0x0001: 'Flash fired', | ||
0x0005: 'Strobe return light not detected', | ||
0x0007: 'Strobe return light detected', | ||
0x0009: 'Flash fired, compulsory flash mode', | ||
0x000d: 'Flash fired, compulsory flash mode, return light not detected', | ||
0x000f: 'Flash fired, compulsory flash mode, return light detected', | ||
0x0010: 'Flash did not fire, compulsory flash mode', | ||
0x0018: 'Flash did not fire, auto mode', | ||
0x0019: 'Flash fired, auto mode', | ||
0x001d: 'Flash fired, auto mode, return light not detected', | ||
0x001f: 'Flash fired, auto mode, return light detected', | ||
0x0020: 'No flash function', | ||
0x0041: 'Flash fired, red-eye reduction mode', | ||
0x0045: 'Flash fired, red-eye reduction mode, return light not detected', | ||
0x0047: 'Flash fired, red-eye reduction mode, return light detected', | ||
0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode', | ||
0x004d: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected', | ||
0x004f: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected', | ||
0x0059: 'Flash fired, auto mode, red-eye reduction mode', | ||
0x005d: 'Flash fired, auto mode, return light not detected, red-eye reduction mode', | ||
0x005f: 'Flash fired, auto mode, return light detected, red-eye reduction mode', | ||
}, | ||
SensingMethod: { | ||
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" | ||
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', | ||
}, | ||
SceneCaptureType: { | ||
0: "Standard", | ||
1: "Landscape", | ||
2: "Portrait", | ||
3: "Night scene" | ||
0: 'Standard', | ||
1: 'Landscape', | ||
2: 'Portrait', | ||
3: 'Night scene', | ||
}, | ||
SceneType: { | ||
1: "Directly photographed" | ||
1: 'Directly photographed', | ||
}, | ||
CustomRendered: { | ||
0: "Normal process", | ||
1: "Custom process" | ||
0: 'Normal process', | ||
1: 'Custom process', | ||
}, | ||
WhiteBalance: { | ||
0: "Auto white balance", | ||
1: "Manual white balance" | ||
0: 'Auto white balance', | ||
1: 'Manual white balance', | ||
}, | ||
GainControl: { | ||
0: "None", | ||
1: "Low gain up", | ||
2: "High gain up", | ||
3: "Low gain down", | ||
4: "High gain down" | ||
0: 'None', | ||
1: 'Low gain up', | ||
2: 'High gain up', | ||
3: 'Low gain down', | ||
4: 'High gain down', | ||
}, | ||
Contrast: { | ||
0: "Normal", | ||
1: "Soft", | ||
2: "Hard" | ||
0: 'Normal', | ||
1: 'Soft', | ||
2: 'Hard', | ||
}, | ||
Saturation: { | ||
0: "Normal", | ||
1: "Low saturation", | ||
2: "High saturation" | ||
0: 'Normal', | ||
1: 'Low saturation', | ||
2: 'High saturation', | ||
}, | ||
Sharpness: { | ||
0: "Normal", | ||
1: "Soft", | ||
2: "Hard" | ||
0: 'Normal', | ||
1: 'Soft', | ||
2: 'Hard', | ||
}, | ||
SubjectDistanceRange: { | ||
0: "Unknown", | ||
1: "Macro", | ||
2: "Close view", | ||
3: "Distant view" | ||
0: 'Unknown', | ||
1: 'Macro', | ||
2: 'Close view', | ||
3: 'Distant view', | ||
}, | ||
FileSource: { | ||
3: "DSC" | ||
3: 'DSC', | ||
}, | ||
Components: { | ||
0: "", | ||
1: "Y", | ||
2: "Cb", | ||
3: "Cr", | ||
4: "R", | ||
5: "G", | ||
6: "B" | ||
} | ||
0: '', | ||
1: 'Y', | ||
2: 'Cb', | ||
3: 'Cr', | ||
4: 'R', | ||
5: 'G', | ||
6: 'B', | ||
}, | ||
}; | ||
@@ -616,3 +806,8 @@ | ||
exports.EXIF_TAGS = EXIF_TAGS; | ||
exports.ExifTags = ExifTags; | ||
exports.GPSTags = GPSTags; | ||
exports.StringValues = StringValues; | ||
exports.TiffTags = TiffTags; | ||
exports.getExt = getExt; | ||
exports.load = Exifly; |
export * from './helpers'; | ||
export { default as load } from './Exifly'; | ||
export * from './tags'; | ||
export * from './typings'; |
@@ -29,277 +29,467 @@ /** | ||
// 0th IFD | ||
var ZEROTH_IFD; | ||
(function (ZEROTH_IFD) { | ||
ZEROTH_IFD["Compression"] = "Compression"; | ||
ZEROTH_IFD["ImageDescription"] = "ImageDescription"; | ||
ZEROTH_IFD["Make"] = "Make"; | ||
ZEROTH_IFD["Model"] = "Model"; | ||
ZEROTH_IFD["XResolution"] = "XResolution"; | ||
ZEROTH_IFD["YResolution"] = "YResolution"; | ||
ZEROTH_IFD["ResolutionUnit"] = "ResolutionUnit"; | ||
ZEROTH_IFD["TransferFunction"] = "TransferFunction"; | ||
ZEROTH_IFD["Artist"] = "Artist"; | ||
ZEROTH_IFD["WhitePoint"] = "WhitePoint"; | ||
ZEROTH_IFD["PrimaryChromaticities"] = "PrimaryChromaticities"; | ||
ZEROTH_IFD["YcbCrCoefficients"] = "YcbCrCoefficients"; | ||
ZEROTH_IFD["ReferenceBlackWhite"] = "ReferenceBlackWhite"; | ||
ZEROTH_IFD["Copyright"] = "Copyright"; | ||
ZEROTH_IFD["ImageWidth"] = "ImageWidth"; | ||
ZEROTH_IFD["ImageLength"] = "ImageLength"; | ||
ZEROTH_IFD["BitsPerSample"] = "BitsPerSample"; | ||
ZEROTH_IFD["PhotometricInterpretation"] = "PhotometricInterpretation"; | ||
ZEROTH_IFD["Orientation"] = "Orientation"; | ||
ZEROTH_IFD["SamplesPerPixel"] = "SamplesPerPixel"; | ||
ZEROTH_IFD["PlanarConfiguration"] = "PlanarConfiguration"; | ||
ZEROTH_IFD["YCbCrSubSampling"] = "YCbCrSubSampling"; | ||
ZEROTH_IFD["YCbCrPositioning"] = "YCbCrPositioning"; | ||
ZEROTH_IFD["StripOffsets"] = "StripOffsets"; | ||
ZEROTH_IFD["RowsPerStrip"] = "RowsPerStrip"; | ||
ZEROTH_IFD["StripByteCounts"] = "StripByteCounts"; | ||
ZEROTH_IFD["JPEGInterchangeFormat"] = "JPEGInterchangeFormat"; | ||
ZEROTH_IFD["JPEGInterchangeFormatLength"] = "JPEGInterchangeFormatLength"; | ||
ZEROTH_IFD["Software"] = "Software"; | ||
ZEROTH_IFD["DateTime"] = "DateTime"; | ||
ZEROTH_IFD["ExifIFDPointer"] = "Exif IFD Pointer"; | ||
ZEROTH_IFD["GPSInfoIFDPointer"] = "GPS Info IFD Pointer"; | ||
ZEROTH_IFD["InteroperabilityIFDPointer"] = "Interoperability IFD Pointer"; | ||
})(ZEROTH_IFD || (ZEROTH_IFD = {})); | ||
// Exif IFD | ||
var EXIF_IFD; | ||
(function (EXIF_IFD) { | ||
EXIF_IFD["ExposureTime"] = "ExposureTime"; | ||
EXIF_IFD["FNumber"] = "FNumber"; | ||
EXIF_IFD["ExposureProgram"] = "ExposureProgram"; | ||
EXIF_IFD["SpectralSensitivity"] = "SpectralSensitivity"; | ||
EXIF_IFD["PhotographicSensitivity"] = "PhotographicSensitivity"; | ||
EXIF_IFD["OECF"] = "OECF"; | ||
EXIF_IFD["SensitivityType"] = "SensitivityType"; | ||
EXIF_IFD["StandardOutputSensitivity"] = "StandardOutputSensitivity"; | ||
EXIF_IFD["RecommendedExposurelndex"] = "RecommendedExposurelndex"; | ||
EXIF_IFD["ISOSpeed"] = "ISOSpeed"; | ||
EXIF_IFD["ISOSpeedLatitudeyyy"] = "ISOSpeedLatitudeyyy"; | ||
EXIF_IFD["ISOSpeedLatitudezzz"] = "ISOSpeedLatitudezzz"; | ||
EXIF_IFD["ExifVersion"] = "ExifVersion"; | ||
EXIF_IFD["DateTimeOriginal"] = "DateTimeOriginal"; | ||
EXIF_IFD["DateTimeDigitized"] = "DateTimeDigitized"; | ||
EXIF_IFD["ComponentsConfiguration"] = "ComponentsConfiguration"; | ||
EXIF_IFD["ShutterSpeedValue"] = "ShutterSpeedValue"; | ||
EXIF_IFD["ApertureValue"] = "ApertureValue"; | ||
EXIF_IFD["BrightnessValue"] = "Brightness Value"; | ||
EXIF_IFD["ExposureBiasValue"] = "ExposureBiasValue"; | ||
EXIF_IFD["MaxApertureValue"] = "MaxAperture Value"; | ||
EXIF_IFD["SubjectDistance"] = "SubjectDistance"; | ||
EXIF_IFD["MeteringMode"] = "MeteringMode"; | ||
EXIF_IFD["LightSource"] = "LightSource"; | ||
EXIF_IFD["Flash"] = "Flash"; | ||
EXIF_IFD["FocalLength"] = "FocalLength"; | ||
EXIF_IFD["MakerNote"] = "MakerNote"; | ||
EXIF_IFD["UserComment"] = "UserComment"; | ||
EXIF_IFD["SubSecTime"] = "SubSecTime"; | ||
EXIF_IFD["SubSecTimeOriginal"] = "SubSecTimeOriginal"; | ||
EXIF_IFD["SubSecTimeDigitized"] = "SubSecTimeDigitized"; | ||
EXIF_IFD["FlashpixVersion"] = "FlashpixVersion"; | ||
EXIF_IFD["ColorSpace"] = "ColorSpace"; | ||
EXIF_IFD["RelatedSoundFile"] = "RelatedSoundFile"; | ||
EXIF_IFD["FlashEnergy"] = "FlashEnergy"; | ||
EXIF_IFD["SpatialFrequencyResponse"] = "SpatialFrequencyResponse"; | ||
EXIF_IFD["FocalPlaneX-Resolution"] = "FocalPlaneX-Resolution"; | ||
EXIF_IFD["FocalPlaneY-Resolution"] = "FocalPlaneY-Resolution"; | ||
EXIF_IFD["FocalPlane-ResolutionUnit"] = "FocalPlane-ResolutionUnit"; | ||
EXIF_IFD["Exposurelndex"] = "Exposurelndex"; | ||
EXIF_IFD["SensingMethod"] = "SensingMethod"; | ||
EXIF_IFD["FileSource"] = "FileSource"; | ||
EXIF_IFD["SceneType"] = "SceneType"; | ||
EXIF_IFD["CFApattern"] = "CFApattern"; | ||
EXIF_IFD["ExposureMode"] = "ExposureMode"; | ||
EXIF_IFD["WhiteBalance"] = "WhiteBalance"; | ||
EXIF_IFD["DigitalZoomRatio"] = "DigitalZoomRatio"; | ||
EXIF_IFD["FocalLengthIn35mmFilm"] = "FocalLengthIn35mmFilm"; | ||
EXIF_IFD["SceneCapture Type"] = "SceneCapture Type"; | ||
EXIF_IFD["GainControl"] = "GainControl"; | ||
EXIF_IFD["Contrast"] = "Contrast"; | ||
EXIF_IFD["Saturation"] = "Saturation"; | ||
EXIF_IFD["Sharpness"] = "Sharpness"; | ||
EXIF_IFD["DeviceSettingDescription"] = "DeviceSettingDescription"; | ||
EXIF_IFD["SubjectDistanceRange"] = "SubjectDistanceRange"; | ||
EXIF_IFD["ImageUniquelD"] = "ImageUniquelD"; | ||
EXIF_IFD["CameraOwnerName"] = "CameraOwnerName"; | ||
EXIF_IFD["BodySerialNumber"] = "BodySerialNumber"; | ||
EXIF_IFD["LensSpecification"] = "LensSpecification"; | ||
EXIF_IFD["LensMake"] = "LensMake"; | ||
EXIF_IFD["LensModel"] = "LensModel"; | ||
EXIF_IFD["LensSerialNumber"] = "LensSerialNumber"; | ||
EXIF_IFD["Gamma"] = "Gamma"; | ||
EXIF_IFD["CompressedBitsPerPixel"] = "CompressedBitsPerPixel"; | ||
EXIF_IFD["PixelXDimension"] = "PixelXDimension"; | ||
EXIF_IFD["PixelYDimension"] = "PixelYDimension"; | ||
EXIF_IFD["SubjectArea"] = "SubjectArea"; | ||
EXIF_IFD["FocalPlaneXResolution"] = "FocalPlaneXResolution"; | ||
EXIF_IFD["FocalPlaneYResolution"] = "FocalPlaneYResolution"; | ||
EXIF_IFD["FocalPlaneResolutionUnit"] = "FocalPlaneResolutionUnit"; | ||
EXIF_IFD["SubjectLocation"] = "SubjectLocation"; | ||
EXIF_IFD["ExposureIndex"] = "ExposureIndex"; | ||
EXIF_IFD["CFAPattern"] = "CFAPattern"; | ||
EXIF_IFD["CustomRendered"] = "CustomRendered"; | ||
EXIF_IFD["DigitalZoomRation"] = "DigitalZoomRation"; | ||
EXIF_IFD["SceneCaptureType"] = "SceneCaptureType"; | ||
EXIF_IFD["ImageUniqueID"] = "ImageUniqueID"; | ||
})(EXIF_IFD || (EXIF_IFD = {})); | ||
// Interoperability IFD | ||
var INTEROPERABILITY_IFD; | ||
(function (INTEROPERABILITY_IFD) { | ||
INTEROPERABILITY_IFD["InteroperabilityIndex"] = "InteroperabilityIndex"; | ||
})(INTEROPERABILITY_IFD || (INTEROPERABILITY_IFD = {})); | ||
// GPS info IFD | ||
var GPS_INFO_IFD; | ||
(function (GPS_INFO_IFD) { | ||
GPS_INFO_IFD["GPSVersionID"] = "GPSVersionID"; | ||
GPS_INFO_IFD["GPSLatitudeRef"] = "GPSLatitudeRef"; | ||
GPS_INFO_IFD["GPSLatitude"] = "GPSLatitude"; | ||
GPS_INFO_IFD["GPSImgDirection"] = "GPSImgDirection"; | ||
GPS_INFO_IFD["GPSLongitudeRef"] = "GPSLongitudeRef"; | ||
GPS_INFO_IFD["GPSLongitude"] = "GPSLongitude"; | ||
GPS_INFO_IFD["GPSAltitudeRef"] = "GPSAltitudeRef"; | ||
GPS_INFO_IFD["GPSAltitude"] = "GPSAltitude"; | ||
GPS_INFO_IFD["GPSTimeStamp"] = "GPSTimeStamp"; | ||
GPS_INFO_IFD["GPSSatellites"] = "GPSSatellites"; | ||
GPS_INFO_IFD["GPSStatus"] = "GPSStatus"; | ||
GPS_INFO_IFD["GPSMeasureMode"] = "GPSMeasureMode"; | ||
GPS_INFO_IFD["GPSDOP"] = "GPSOP"; | ||
GPS_INFO_IFD["GPSSpeedRef"] = "GPSSpeedRef"; | ||
GPS_INFO_IFD["GPSSpeed"] = "GPSSpeed"; | ||
GPS_INFO_IFD["GPSTrackRef"] = "GPSTrackRef"; | ||
GPS_INFO_IFD["GPSTrack"] = "GPSTrack"; | ||
GPS_INFO_IFD["GPSImgDirectionRef"] = "GPSImgDirectionRef"; | ||
GPS_INFO_IFD["GPSImgDirectionGPSMapDatum"] = "GP SImgDirection GPSMapDatum"; | ||
GPS_INFO_IFD["GPSDestLatitudeRef"] = "GPSDestLatitudeRef"; | ||
GPS_INFO_IFD["GPSDestLatitude"] = "GPSDestLatitude"; | ||
GPS_INFO_IFD["GPSDestLongitudeRef"] = "GPSDestLongitudeRef"; | ||
GPS_INFO_IFD["GPSDestLongitude"] = "GPSDestLongitude"; | ||
GPS_INFO_IFD["GPSDestBearingRef"] = "GPSDestBearingRef"; | ||
GPS_INFO_IFD["GPSDestBearing"] = "GPSDestBearing"; | ||
GPS_INFO_IFD["GPSDestDistanceRef"] = "GPSDestDistanceRef"; | ||
GPS_INFO_IFD["GPSDestDistance"] = "GPSDestDistance"; | ||
GPS_INFO_IFD["GPSProcessingMethod"] = "GPSProcessingMethod"; | ||
GPS_INFO_IFD["GPSArealnformation"] = "GPSArealnformation"; | ||
GPS_INFO_IFD["GPSDateStamp"] = "GPSDateStamp"; | ||
GPS_INFO_IFD["GPSDifferential"] = "GPSDifferential"; | ||
GPS_INFO_IFD["GPSHPositioningError"] = "GPSHPositioningError"; | ||
GPS_INFO_IFD["GPSMapDatum"] = "GPSMapDatum"; | ||
GPS_INFO_IFD["GPSAreaInformation"] = "GPSAreaInformation"; | ||
})(GPS_INFO_IFD || (GPS_INFO_IFD = {})); | ||
// 1st IFD | ||
var FIRST_IFD; | ||
(function (FIRST_IFD) { | ||
FIRST_IFD["Compression"] = "Compression"; | ||
FIRST_IFD["ImageDescription"] = "ImageDescription"; | ||
FIRST_IFD["Make"] = "Make"; | ||
FIRST_IFD["Model"] = "Model"; | ||
FIRST_IFD["TransferFunction"] = "TransferFunction"; | ||
FIRST_IFD["Artist"] = "Artist"; | ||
FIRST_IFD["WhitePoint"] = "WhitePoint"; | ||
FIRST_IFD["PrimaryChromaticities"] = "PrimaryChromaticities"; | ||
FIRST_IFD["YCbCrCoefficients"] = "YCbCrCoefficients"; | ||
FIRST_IFD["ReferenceBlackWhite"] = "ReferenceBlackWhite"; | ||
FIRST_IFD["Copyright"] = "Copyright"; | ||
FIRST_IFD["ExifIFDPointer"] = "Exif IFD Pointer"; | ||
FIRST_IFD["GPSInfoIFDPointer"] = "GPS Info IFD Pointer"; | ||
})(FIRST_IFD || (FIRST_IFD = {})); | ||
/** | ||
* based on CIPA DC-008-2012 Exif Version 2.3 | ||
* @see https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf | ||
*/ | ||
const EXIF_TAGS = { | ||
ZEROTH_IFD: ZEROTH_IFD, | ||
EXIF_IFD: EXIF_IFD, | ||
GPS_INFO_IFD: GPS_INFO_IFD, | ||
INTEROPERABILITY_IFD: INTEROPERABILITY_IFD, | ||
FIRST_IFD: FIRST_IFD, | ||
}; | ||
const ExifTags = { | ||
// version tags | ||
0x9000: "ExifVersion", | ||
0xA000: "FlashpixVersion", | ||
0x9000: EXIF_TAGS.EXIF_IFD['ExifVersion'], | ||
0xa000: EXIF_TAGS.EXIF_IFD['FlashpixVersion'], | ||
// colorspace tags | ||
0xA001: "ColorSpace", | ||
0xa001: EXIF_TAGS.EXIF_IFD['ColorSpace'], | ||
// image configuration | ||
0xA002: "PixelXDimension", | ||
0xA003: "PixelYDimension", | ||
0x9101: "ComponentsConfiguration", | ||
0x9102: "CompressedBitsPerPixel", | ||
0xa002: EXIF_TAGS.EXIF_IFD['PixelXDimension'], | ||
0xa003: EXIF_TAGS.EXIF_IFD['PixelYDimension'], | ||
0x9101: EXIF_TAGS.EXIF_IFD['ComponentsConfiguration'], | ||
0x9102: EXIF_TAGS.EXIF_IFD['CompressedBitsPerPixel'], | ||
// user information | ||
0x927C: "MakerNote", | ||
0x9286: "UserComment", | ||
0x927c: EXIF_TAGS.EXIF_IFD['MakerNote'], | ||
0x9286: EXIF_TAGS.EXIF_IFD['UserComment'], | ||
// related file | ||
0xA004: "RelatedSoundFile", | ||
0xa004: EXIF_TAGS.EXIF_IFD['RelatedSoundFile'], | ||
// date and time | ||
0x9003: "DateTimeOriginal", | ||
0x9004: "DateTimeDigitized", | ||
0x9290: "SubsecTime", | ||
0x9291: "SubsecTimeOriginal", | ||
0x9292: "SubsecTimeDigitized", | ||
0x9003: EXIF_TAGS.EXIF_IFD['DateTimeOriginal'], | ||
0x9004: EXIF_TAGS.EXIF_IFD['DateTimeDigitized'], | ||
0x9290: EXIF_TAGS.EXIF_IFD['SubSecTime'], | ||
0x9291: EXIF_TAGS.EXIF_IFD['SubSecTimeOriginal'], | ||
0x9292: EXIF_TAGS.EXIF_IFD['SubSecTimeDigitized'], | ||
// picture-taking conditions | ||
0x829A: "ExposureTime", | ||
0x829D: "FNumber", | ||
0x8822: "ExposureProgram", | ||
0x8824: "SpectralSensitivity", | ||
0x8827: "ISOSpeedRatings", | ||
0x8828: "OECF", | ||
0x9201: "ShutterSpeedValue", | ||
0x9202: "ApertureValue", | ||
0x9203: "BrightnessValue", | ||
0x9204: "ExposureBias", | ||
0x9205: "MaxApertureValue", | ||
0x9206: "SubjectDistance", | ||
0x9207: "MeteringMode", | ||
0x9208: "LightSource", | ||
0x9209: "Flash", | ||
0x9214: "SubjectArea", | ||
0x920A: "FocalLength", | ||
0xA20B: "FlashEnergy", | ||
0xA20C: "SpatialFrequencyResponse", | ||
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: "DigitalZoomRation", | ||
0xA405: "FocalLengthIn35mmFilm", | ||
0xA406: "SceneCaptureType", | ||
0xA407: "GainControl", | ||
0xA408: "Contrast", | ||
0xA409: "Saturation", | ||
0xA40A: "Sharpness", | ||
0xA40B: "DeviceSettingDescription", | ||
0xA40C: "SubjectDistanceRange", | ||
0x829a: EXIF_TAGS.EXIF_IFD['ExposureTime'], | ||
0x829d: EXIF_TAGS.EXIF_IFD['FNumber'], | ||
0x8822: EXIF_TAGS.EXIF_IFD['ExposureProgram'], | ||
0x8824: EXIF_TAGS.EXIF_IFD['SpectralSensitivity'], | ||
0x8827: EXIF_TAGS.EXIF_IFD['PhotographicSensitivity'], | ||
0x8828: EXIF_TAGS.EXIF_IFD['OECF'], | ||
0x9201: EXIF_TAGS.EXIF_IFD['ShutterSpeedValue'], | ||
0x9202: EXIF_TAGS.EXIF_IFD['ApertureValue'], | ||
0x9203: EXIF_TAGS.EXIF_IFD['BrightnessValue'], | ||
0x9204: EXIF_TAGS.EXIF_IFD['ExposureBiasValue'], | ||
0x9205: EXIF_TAGS.EXIF_IFD['MaxApertureValue'], | ||
0x9206: EXIF_TAGS.EXIF_IFD['SubjectDistance'], | ||
0x9207: EXIF_TAGS.EXIF_IFD['MeteringMode'], | ||
0x9208: EXIF_TAGS.EXIF_IFD['LightSource'], | ||
0x9209: EXIF_TAGS.EXIF_IFD['Flash'], | ||
0x9214: EXIF_TAGS.EXIF_IFD['SubjectArea'], | ||
0x920a: EXIF_TAGS.EXIF_IFD['FocalLength'], | ||
0xa20b: EXIF_TAGS.EXIF_IFD['FlashEnergy'], | ||
0xa20c: EXIF_TAGS.EXIF_IFD['SpatialFrequencyResponse'], | ||
0xa20e: EXIF_TAGS.EXIF_IFD['FocalPlaneXResolution'], | ||
0xa20f: EXIF_TAGS.EXIF_IFD['FocalPlaneYResolution'], | ||
0xa210: EXIF_TAGS.EXIF_IFD['FocalPlaneResolutionUnit'], | ||
0xa214: EXIF_TAGS.EXIF_IFD['SubjectLocation'], | ||
0xa215: EXIF_TAGS.EXIF_IFD['ExposureIndex'], | ||
0xa217: EXIF_TAGS.EXIF_IFD['SensingMethod'], | ||
0xa300: EXIF_TAGS.EXIF_IFD['FileSource'], | ||
0xa301: EXIF_TAGS.EXIF_IFD['SceneType'], | ||
0xa302: EXIF_TAGS.EXIF_IFD['CFAPattern'], | ||
0xa401: EXIF_TAGS.EXIF_IFD['CustomRendered'], | ||
0xa402: EXIF_TAGS.EXIF_IFD['ExposureMode'], | ||
0xa403: EXIF_TAGS.EXIF_IFD['WhiteBalance'], | ||
0xa404: EXIF_TAGS.EXIF_IFD['DigitalZoomRation'], | ||
0xa405: EXIF_TAGS.EXIF_IFD['FocalLengthIn35mmFilm'], | ||
0xa406: EXIF_TAGS.EXIF_IFD['SceneCaptureType'], | ||
0xa407: EXIF_TAGS.EXIF_IFD['GainControl'], | ||
0xa408: EXIF_TAGS.EXIF_IFD['Contrast'], | ||
0xa409: EXIF_TAGS.EXIF_IFD['Saturation'], | ||
0xa40a: EXIF_TAGS.EXIF_IFD['Sharpness'], | ||
0xa40b: EXIF_TAGS.EXIF_IFD['DeviceSettingDescription'], | ||
0xa40c: EXIF_TAGS.EXIF_IFD['SubjectDistanceRange'], | ||
// other tags | ||
0xA005: "InteroperabilityIFDPointer", | ||
0xA420: "ImageUniqueID", | ||
0xa005: EXIF_TAGS.ZEROTH_IFD['InteroperabilityIFDPointer'], | ||
0xa420: EXIF_TAGS.EXIF_IFD['ImageUniqueID'], | ||
// Lens info | ||
0xA432: "LensSpecification", | ||
0xA433: "LensMake", | ||
0xA434: "LensModel", | ||
0xA435: "LensSerialNumber", | ||
0xa432: EXIF_TAGS.EXIF_IFD['LensSpecification'], | ||
0xa433: EXIF_TAGS.EXIF_IFD['LensMake'], | ||
0xa434: EXIF_TAGS.EXIF_IFD['LensModel'], | ||
0xa435: EXIF_TAGS.EXIF_IFD['LensSerialNumber'], | ||
}; | ||
const TiffTags = { | ||
0x0100: "ImageWidth", | ||
0x0101: "ImageHeight", | ||
0x8769: "ExifIFDPointer", | ||
0x8825: "GPSInfoIFDPointer", | ||
0xA005: "InteroperabilityIFDPointer", | ||
0x0102: "BitsPerSample", | ||
0x0103: "Compression", | ||
0x0106: "PhotometricInterpretation", | ||
0x0112: "Orientation", | ||
0x0115: "SamplesPerPixel", | ||
0x011C: "PlanarConfiguration", | ||
0x0212: "YCbCrSubSampling", | ||
0x0213: "YCbCrPositioning", | ||
0x011A: "XResolution", | ||
0x011B: "YResolution", | ||
0x0128: "ResolutionUnit", | ||
0x0111: "StripOffsets", | ||
0x0116: "RowsPerStrip", | ||
0x0117: "StripByteCounts", | ||
0x0201: "JPEGInterchangeFormat", | ||
0x0202: "JPEGInterchangeFormatLength", | ||
0x012D: "TransferFunction", | ||
0x013E: "WhitePoint", | ||
0x013F: "PrimaryChromaticities", | ||
0x0211: "YCbCrCoefficients", | ||
0x0214: "ReferenceBlackWhite", | ||
0x0132: "DateTime", | ||
0x010E: "ImageDescription", | ||
0x010F: "Make", | ||
0x0110: "Model", | ||
0x0131: "Software", | ||
0x013B: "Artist", | ||
0x8298: "Copyright" | ||
0x0100: EXIF_TAGS.ZEROTH_IFD['ImageWidth'], | ||
0x0101: EXIF_TAGS.ZEROTH_IFD['ImageLength'], | ||
0x8769: EXIF_TAGS.ZEROTH_IFD['ExifIFDPointer'], | ||
0x8825: EXIF_TAGS.ZEROTH_IFD['GPSInfoIFDPointer'], | ||
0xa005: EXIF_TAGS.ZEROTH_IFD['InteroperabilityIFDPointer'], | ||
0x0102: EXIF_TAGS.ZEROTH_IFD['BitsPerSample'], | ||
0x0103: EXIF_TAGS.ZEROTH_IFD['Compression'], | ||
0x0106: EXIF_TAGS.ZEROTH_IFD['PhotometricInterpretation'], | ||
0x0112: EXIF_TAGS.ZEROTH_IFD['Orientation'], | ||
0x0115: EXIF_TAGS.ZEROTH_IFD['SamplesPerPixel'], | ||
0x011c: EXIF_TAGS.ZEROTH_IFD['PlanarConfiguration'], | ||
0x0212: EXIF_TAGS.ZEROTH_IFD['YCbCrSubSampling'], | ||
0x0213: EXIF_TAGS.ZEROTH_IFD['YCbCrPositioning'], | ||
0x011a: EXIF_TAGS.ZEROTH_IFD['XResolution'], | ||
0x011b: EXIF_TAGS.ZEROTH_IFD['YResolution'], | ||
0x0128: EXIF_TAGS.ZEROTH_IFD['ResolutionUnit'], | ||
0x0111: EXIF_TAGS.ZEROTH_IFD['StripOffsets'], | ||
0x0116: EXIF_TAGS.ZEROTH_IFD['RowsPerStrip'], | ||
0x0117: EXIF_TAGS.ZEROTH_IFD['StripByteCounts'], | ||
0x0201: EXIF_TAGS.ZEROTH_IFD['JPEGInterchangeFormat'], | ||
0x0202: EXIF_TAGS.ZEROTH_IFD['JPEGInterchangeFormatLength'], | ||
0x012d: EXIF_TAGS.ZEROTH_IFD['TransferFunction'], | ||
0x013e: EXIF_TAGS.ZEROTH_IFD['WhitePoint'], | ||
0x013f: EXIF_TAGS.ZEROTH_IFD['PrimaryChromaticities'], | ||
0x0211: EXIF_TAGS.ZEROTH_IFD.YcbCrCoefficients, | ||
0x0214: EXIF_TAGS.ZEROTH_IFD['ReferenceBlackWhite'], | ||
0x0132: EXIF_TAGS.ZEROTH_IFD['DateTime'], | ||
0x010e: EXIF_TAGS.ZEROTH_IFD['ImageDescription'], | ||
0x010f: EXIF_TAGS.ZEROTH_IFD['Make'], | ||
0x0110: EXIF_TAGS.ZEROTH_IFD['Model'], | ||
0x0131: EXIF_TAGS.ZEROTH_IFD['Software'], | ||
0x013b: EXIF_TAGS.ZEROTH_IFD['Artist'], | ||
0x8298: EXIF_TAGS.ZEROTH_IFD['Copyright'], | ||
}; | ||
const GPSTags = { | ||
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" | ||
0x0000: EXIF_TAGS.GPS_INFO_IFD['GPSVersionID'], | ||
0x0001: EXIF_TAGS.GPS_INFO_IFD['GPSLatitudeRef'], | ||
0x0002: EXIF_TAGS.GPS_INFO_IFD['GPSLatitude'], | ||
0x0003: EXIF_TAGS.GPS_INFO_IFD['GPSLongitudeRef'], | ||
0x0004: EXIF_TAGS.GPS_INFO_IFD['GPSLongitude'], | ||
0x0005: EXIF_TAGS.GPS_INFO_IFD['GPSAltitudeRef'], | ||
0x0006: EXIF_TAGS.GPS_INFO_IFD['GPSAltitude'], | ||
0x0007: EXIF_TAGS.GPS_INFO_IFD['GPSTimeStamp'], | ||
0x0008: EXIF_TAGS.GPS_INFO_IFD['GPSSatellites'], | ||
0x0009: EXIF_TAGS.GPS_INFO_IFD['GPSStatus'], | ||
0x000a: EXIF_TAGS.GPS_INFO_IFD['GPSMeasureMode'], | ||
0x000b: EXIF_TAGS.GPS_INFO_IFD['GPSDOP'], | ||
0x000c: EXIF_TAGS.GPS_INFO_IFD['GPSSpeedRef'], | ||
0x000d: EXIF_TAGS.GPS_INFO_IFD['GPSSpeed'], | ||
0x000e: EXIF_TAGS.GPS_INFO_IFD['GPSTrackRef'], | ||
0x000f: EXIF_TAGS.GPS_INFO_IFD['GPSTrack'], | ||
0x0010: EXIF_TAGS.GPS_INFO_IFD['GPSImgDirectionRef'], | ||
0x0011: EXIF_TAGS.GPS_INFO_IFD['GPSImgDirection'], | ||
0x0012: EXIF_TAGS.GPS_INFO_IFD['GPSMapDatum'], | ||
0x0013: EXIF_TAGS.GPS_INFO_IFD['GPSDestLatitudeRef'], | ||
0x0014: EXIF_TAGS.GPS_INFO_IFD['GPSDestLatitude'], | ||
0x0015: EXIF_TAGS.GPS_INFO_IFD['GPSDestLongitudeRef'], | ||
0x0016: EXIF_TAGS.GPS_INFO_IFD['GPSDestLongitude'], | ||
0x0017: EXIF_TAGS.GPS_INFO_IFD['GPSDestBearingRef'], | ||
0x0018: EXIF_TAGS.GPS_INFO_IFD['GPSDestBearing'], | ||
0x0019: EXIF_TAGS.GPS_INFO_IFD['GPSDestDistanceRef'], | ||
0x001a: EXIF_TAGS.GPS_INFO_IFD['GPSDestDistance'], | ||
0x001b: EXIF_TAGS.GPS_INFO_IFD['GPSProcessingMethod'], | ||
0x001c: EXIF_TAGS.GPS_INFO_IFD['GPSAreaInformation'], | ||
0x001d: EXIF_TAGS.GPS_INFO_IFD['GPSDateStamp'], | ||
0x001e: EXIF_TAGS.GPS_INFO_IFD['GPSDifferential'], | ||
}; | ||
const StringValues = { | ||
ExposureProgram: { | ||
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" | ||
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', | ||
}, | ||
MeteringMode: { | ||
0: "Unknown", | ||
1: "Average", | ||
2: "CenterWeightedAverage", | ||
3: "Spot", | ||
4: "MultiSpot", | ||
5: "Pattern", | ||
6: "Partial", | ||
255: "Other" | ||
0: 'Unknown', | ||
1: 'Average', | ||
2: 'CenterWeightedAverage', | ||
3: 'Spot', | ||
4: 'MultiSpot', | ||
5: 'Pattern', | ||
6: 'Partial', | ||
255: 'Other', | ||
}, | ||
LightSource: { | ||
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" | ||
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: { | ||
0x0000: "Flash did not fire", | ||
0x0001: "Flash fired", | ||
0x0005: "Strobe return light not detected", | ||
0x0007: "Strobe return light detected", | ||
0x0009: "Flash fired, compulsory flash mode", | ||
0x000D: "Flash fired, compulsory flash mode, return light not detected", | ||
0x000F: "Flash fired, compulsory flash mode, return light detected", | ||
0x0010: "Flash did not fire, compulsory flash mode", | ||
0x0018: "Flash did not fire, auto mode", | ||
0x0019: "Flash fired, auto mode", | ||
0x001D: "Flash fired, auto mode, return light not detected", | ||
0x001F: "Flash fired, auto mode, return light detected", | ||
0x0020: "No flash function", | ||
0x0041: "Flash fired, red-eye reduction mode", | ||
0x0045: "Flash fired, red-eye reduction mode, return light not detected", | ||
0x0047: "Flash fired, red-eye reduction mode, return light detected", | ||
0x0049: "Flash fired, compulsory flash mode, red-eye reduction mode", | ||
0x004D: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", | ||
0x004F: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", | ||
0x0059: "Flash fired, auto mode, red-eye reduction mode", | ||
0x005D: "Flash fired, auto mode, return light not detected, red-eye reduction mode", | ||
0x005F: "Flash fired, auto mode, return light detected, red-eye reduction mode" | ||
0x0000: 'Flash did not fire', | ||
0x0001: 'Flash fired', | ||
0x0005: 'Strobe return light not detected', | ||
0x0007: 'Strobe return light detected', | ||
0x0009: 'Flash fired, compulsory flash mode', | ||
0x000d: 'Flash fired, compulsory flash mode, return light not detected', | ||
0x000f: 'Flash fired, compulsory flash mode, return light detected', | ||
0x0010: 'Flash did not fire, compulsory flash mode', | ||
0x0018: 'Flash did not fire, auto mode', | ||
0x0019: 'Flash fired, auto mode', | ||
0x001d: 'Flash fired, auto mode, return light not detected', | ||
0x001f: 'Flash fired, auto mode, return light detected', | ||
0x0020: 'No flash function', | ||
0x0041: 'Flash fired, red-eye reduction mode', | ||
0x0045: 'Flash fired, red-eye reduction mode, return light not detected', | ||
0x0047: 'Flash fired, red-eye reduction mode, return light detected', | ||
0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode', | ||
0x004d: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected', | ||
0x004f: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected', | ||
0x0059: 'Flash fired, auto mode, red-eye reduction mode', | ||
0x005d: 'Flash fired, auto mode, return light not detected, red-eye reduction mode', | ||
0x005f: 'Flash fired, auto mode, return light detected, red-eye reduction mode', | ||
}, | ||
SensingMethod: { | ||
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" | ||
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', | ||
}, | ||
SceneCaptureType: { | ||
0: "Standard", | ||
1: "Landscape", | ||
2: "Portrait", | ||
3: "Night scene" | ||
0: 'Standard', | ||
1: 'Landscape', | ||
2: 'Portrait', | ||
3: 'Night scene', | ||
}, | ||
SceneType: { | ||
1: "Directly photographed" | ||
1: 'Directly photographed', | ||
}, | ||
CustomRendered: { | ||
0: "Normal process", | ||
1: "Custom process" | ||
0: 'Normal process', | ||
1: 'Custom process', | ||
}, | ||
WhiteBalance: { | ||
0: "Auto white balance", | ||
1: "Manual white balance" | ||
0: 'Auto white balance', | ||
1: 'Manual white balance', | ||
}, | ||
GainControl: { | ||
0: "None", | ||
1: "Low gain up", | ||
2: "High gain up", | ||
3: "Low gain down", | ||
4: "High gain down" | ||
0: 'None', | ||
1: 'Low gain up', | ||
2: 'High gain up', | ||
3: 'Low gain down', | ||
4: 'High gain down', | ||
}, | ||
Contrast: { | ||
0: "Normal", | ||
1: "Soft", | ||
2: "Hard" | ||
0: 'Normal', | ||
1: 'Soft', | ||
2: 'Hard', | ||
}, | ||
Saturation: { | ||
0: "Normal", | ||
1: "Low saturation", | ||
2: "High saturation" | ||
0: 'Normal', | ||
1: 'Low saturation', | ||
2: 'High saturation', | ||
}, | ||
Sharpness: { | ||
0: "Normal", | ||
1: "Soft", | ||
2: "Hard" | ||
0: 'Normal', | ||
1: 'Soft', | ||
2: 'Hard', | ||
}, | ||
SubjectDistanceRange: { | ||
0: "Unknown", | ||
1: "Macro", | ||
2: "Close view", | ||
3: "Distant view" | ||
0: 'Unknown', | ||
1: 'Macro', | ||
2: 'Close view', | ||
3: 'Distant view', | ||
}, | ||
FileSource: { | ||
3: "DSC" | ||
3: 'DSC', | ||
}, | ||
Components: { | ||
0: "", | ||
1: "Y", | ||
2: "Cb", | ||
3: "Cr", | ||
4: "R", | ||
5: "G", | ||
6: "B" | ||
} | ||
0: '', | ||
1: 'Y', | ||
2: 'Cb', | ||
3: 'Cr', | ||
4: 'R', | ||
5: 'G', | ||
6: 'B', | ||
}, | ||
}; | ||
@@ -612,2 +802,2 @@ | ||
export { getExt, Exifly as load }; | ||
export { EXIF_IFD, EXIF_TAGS, ExifTags, FIRST_IFD, GPSTags, GPS_INFO_IFD, INTEROPERABILITY_IFD, StringValues, TiffTags, ZEROTH_IFD, getExt, Exifly as load }; |
export declare const ExifTags: { | ||
36864: string; | ||
40960: string; | ||
40961: string; | ||
40962: string; | ||
40963: string; | ||
37121: string; | ||
37122: string; | ||
37500: string; | ||
37510: string; | ||
40964: string; | ||
36867: string; | ||
36868: string; | ||
37520: string; | ||
37521: string; | ||
37522: string; | ||
33434: string; | ||
33437: string; | ||
34850: string; | ||
34852: string; | ||
34855: string; | ||
34856: string; | ||
37377: string; | ||
37378: string; | ||
37379: string; | ||
37380: string; | ||
37381: string; | ||
37382: string; | ||
37383: string; | ||
37384: string; | ||
37385: string; | ||
37396: string; | ||
37386: string; | ||
41483: string; | ||
41484: string; | ||
41486: string; | ||
41487: string; | ||
41488: string; | ||
41492: string; | ||
41493: string; | ||
41495: string; | ||
41728: string; | ||
41729: string; | ||
41730: string; | ||
41985: string; | ||
41986: string; | ||
41987: string; | ||
41988: string; | ||
41989: string; | ||
41990: string; | ||
41991: string; | ||
41992: string; | ||
41993: string; | ||
41994: string; | ||
41995: string; | ||
41996: string; | ||
40965: string; | ||
42016: string; | ||
42034: string; | ||
42035: string; | ||
42036: string; | ||
42037: string; | ||
36864: import("./typings").EXIF_IFD; | ||
40960: import("./typings").EXIF_IFD; | ||
40961: import("./typings").EXIF_IFD; | ||
40962: import("./typings").EXIF_IFD; | ||
40963: import("./typings").EXIF_IFD; | ||
37121: import("./typings").EXIF_IFD; | ||
37122: import("./typings").EXIF_IFD; | ||
37500: import("./typings").EXIF_IFD; | ||
37510: import("./typings").EXIF_IFD; | ||
40964: import("./typings").EXIF_IFD; | ||
36867: import("./typings").EXIF_IFD; | ||
36868: import("./typings").EXIF_IFD; | ||
37520: import("./typings").EXIF_IFD; | ||
37521: import("./typings").EXIF_IFD; | ||
37522: import("./typings").EXIF_IFD; | ||
33434: import("./typings").EXIF_IFD; | ||
33437: import("./typings").EXIF_IFD; | ||
34850: import("./typings").EXIF_IFD; | ||
34852: import("./typings").EXIF_IFD; | ||
34855: import("./typings").EXIF_IFD; | ||
34856: import("./typings").EXIF_IFD; | ||
37377: import("./typings").EXIF_IFD; | ||
37378: import("./typings").EXIF_IFD; | ||
37379: import("./typings").EXIF_IFD; | ||
37380: import("./typings").EXIF_IFD; | ||
37381: import("./typings").EXIF_IFD; | ||
37382: import("./typings").EXIF_IFD; | ||
37383: import("./typings").EXIF_IFD; | ||
37384: import("./typings").EXIF_IFD; | ||
37385: import("./typings").EXIF_IFD; | ||
37396: import("./typings").EXIF_IFD; | ||
37386: import("./typings").EXIF_IFD; | ||
41483: import("./typings").EXIF_IFD; | ||
41484: import("./typings").EXIF_IFD; | ||
41486: import("./typings").EXIF_IFD; | ||
41487: import("./typings").EXIF_IFD; | ||
41488: import("./typings").EXIF_IFD; | ||
41492: import("./typings").EXIF_IFD; | ||
41493: import("./typings").EXIF_IFD; | ||
41495: import("./typings").EXIF_IFD; | ||
41728: import("./typings").EXIF_IFD; | ||
41729: import("./typings").EXIF_IFD; | ||
41730: import("./typings").EXIF_IFD; | ||
41985: import("./typings").EXIF_IFD; | ||
41986: import("./typings").EXIF_IFD; | ||
41987: import("./typings").EXIF_IFD; | ||
41988: import("./typings").EXIF_IFD; | ||
41989: import("./typings").EXIF_IFD; | ||
41990: import("./typings").EXIF_IFD; | ||
41991: import("./typings").EXIF_IFD; | ||
41992: import("./typings").EXIF_IFD; | ||
41993: import("./typings").EXIF_IFD; | ||
41994: import("./typings").EXIF_IFD; | ||
41995: import("./typings").EXIF_IFD; | ||
41996: import("./typings").EXIF_IFD; | ||
40965: import("./typings").ZEROTH_IFD; | ||
42016: import("./typings").EXIF_IFD; | ||
42034: import("./typings").EXIF_IFD; | ||
42035: import("./typings").EXIF_IFD; | ||
42036: import("./typings").EXIF_IFD; | ||
42037: import("./typings").EXIF_IFD; | ||
}; | ||
export declare const TiffTags: { | ||
256: string; | ||
257: string; | ||
34665: string; | ||
34853: string; | ||
40965: string; | ||
258: string; | ||
259: string; | ||
262: string; | ||
274: string; | ||
277: string; | ||
284: string; | ||
530: string; | ||
531: string; | ||
282: string; | ||
283: string; | ||
296: string; | ||
273: string; | ||
278: string; | ||
279: string; | ||
513: string; | ||
514: string; | ||
301: string; | ||
318: string; | ||
319: string; | ||
529: string; | ||
532: string; | ||
306: string; | ||
270: string; | ||
271: string; | ||
272: string; | ||
305: string; | ||
315: string; | ||
33432: string; | ||
256: import("./typings").ZEROTH_IFD; | ||
257: import("./typings").ZEROTH_IFD; | ||
34665: import("./typings").ZEROTH_IFD; | ||
34853: import("./typings").ZEROTH_IFD; | ||
40965: import("./typings").ZEROTH_IFD; | ||
258: import("./typings").ZEROTH_IFD; | ||
259: import("./typings").ZEROTH_IFD; | ||
262: import("./typings").ZEROTH_IFD; | ||
274: import("./typings").ZEROTH_IFD; | ||
277: import("./typings").ZEROTH_IFD; | ||
284: import("./typings").ZEROTH_IFD; | ||
530: import("./typings").ZEROTH_IFD; | ||
531: import("./typings").ZEROTH_IFD; | ||
282: import("./typings").ZEROTH_IFD; | ||
283: import("./typings").ZEROTH_IFD; | ||
296: import("./typings").ZEROTH_IFD; | ||
273: import("./typings").ZEROTH_IFD; | ||
278: import("./typings").ZEROTH_IFD; | ||
279: import("./typings").ZEROTH_IFD; | ||
513: import("./typings").ZEROTH_IFD; | ||
514: import("./typings").ZEROTH_IFD; | ||
301: import("./typings").ZEROTH_IFD; | ||
318: import("./typings").ZEROTH_IFD; | ||
319: import("./typings").ZEROTH_IFD; | ||
529: import("./typings").ZEROTH_IFD; | ||
532: import("./typings").ZEROTH_IFD; | ||
306: import("./typings").ZEROTH_IFD; | ||
270: import("./typings").ZEROTH_IFD; | ||
271: import("./typings").ZEROTH_IFD; | ||
272: import("./typings").ZEROTH_IFD; | ||
305: import("./typings").ZEROTH_IFD; | ||
315: import("./typings").ZEROTH_IFD; | ||
33432: import("./typings").ZEROTH_IFD; | ||
}; | ||
export declare const GPSTags: { | ||
0: string; | ||
1: string; | ||
2: string; | ||
3: string; | ||
4: string; | ||
5: string; | ||
6: string; | ||
7: string; | ||
8: string; | ||
9: string; | ||
10: string; | ||
11: string; | ||
12: string; | ||
13: string; | ||
14: string; | ||
15: string; | ||
16: string; | ||
17: string; | ||
18: string; | ||
19: string; | ||
20: string; | ||
21: string; | ||
22: string; | ||
23: string; | ||
24: string; | ||
25: string; | ||
26: string; | ||
27: string; | ||
28: string; | ||
29: string; | ||
30: string; | ||
0: import("./typings").GPS_INFO_IFD; | ||
1: import("./typings").GPS_INFO_IFD; | ||
2: import("./typings").GPS_INFO_IFD; | ||
3: import("./typings").GPS_INFO_IFD; | ||
4: import("./typings").GPS_INFO_IFD; | ||
5: import("./typings").GPS_INFO_IFD; | ||
6: import("./typings").GPS_INFO_IFD; | ||
7: import("./typings").GPS_INFO_IFD; | ||
8: import("./typings").GPS_INFO_IFD; | ||
9: import("./typings").GPS_INFO_IFD; | ||
10: import("./typings").GPS_INFO_IFD; | ||
11: import("./typings").GPS_INFO_IFD; | ||
12: import("./typings").GPS_INFO_IFD; | ||
13: import("./typings").GPS_INFO_IFD; | ||
14: import("./typings").GPS_INFO_IFD; | ||
15: import("./typings").GPS_INFO_IFD; | ||
16: import("./typings").GPS_INFO_IFD; | ||
17: import("./typings").GPS_INFO_IFD; | ||
18: import("./typings").GPS_INFO_IFD; | ||
19: import("./typings").GPS_INFO_IFD; | ||
20: import("./typings").GPS_INFO_IFD; | ||
21: import("./typings").GPS_INFO_IFD; | ||
22: import("./typings").GPS_INFO_IFD; | ||
23: import("./typings").GPS_INFO_IFD; | ||
24: import("./typings").GPS_INFO_IFD; | ||
25: import("./typings").GPS_INFO_IFD; | ||
26: import("./typings").GPS_INFO_IFD; | ||
27: import("./typings").GPS_INFO_IFD; | ||
28: import("./typings").GPS_INFO_IFD; | ||
29: import("./typings").GPS_INFO_IFD; | ||
30: import("./typings").GPS_INFO_IFD; | ||
}; | ||
@@ -132,0 +132,0 @@ export declare const StringValues: { |
export interface ExiflyOpts { | ||
debug: boolean; | ||
} | ||
export declare enum ZEROTH_IFD { | ||
'Compression' = "Compression", | ||
'ImageDescription' = "ImageDescription", | ||
'Make' = "Make", | ||
'Model' = "Model", | ||
'XResolution' = "XResolution", | ||
'YResolution' = "YResolution", | ||
'ResolutionUnit' = "ResolutionUnit", | ||
'TransferFunction' = "TransferFunction", | ||
'Artist' = "Artist", | ||
'WhitePoint' = "WhitePoint", | ||
'PrimaryChromaticities' = "PrimaryChromaticities", | ||
'YcbCrCoefficients' = "YcbCrCoefficients", | ||
'ReferenceBlackWhite' = "ReferenceBlackWhite", | ||
'Copyright' = "Copyright", | ||
'ImageWidth' = "ImageWidth", | ||
'ImageLength' = "ImageLength", | ||
'BitsPerSample' = "BitsPerSample", | ||
'PhotometricInterpretation' = "PhotometricInterpretation", | ||
'Orientation' = "Orientation", | ||
'SamplesPerPixel' = "SamplesPerPixel", | ||
'PlanarConfiguration' = "PlanarConfiguration", | ||
'YCbCrSubSampling' = "YCbCrSubSampling", | ||
'YCbCrPositioning' = "YCbCrPositioning", | ||
'StripOffsets' = "StripOffsets", | ||
'RowsPerStrip' = "RowsPerStrip", | ||
'StripByteCounts' = "StripByteCounts", | ||
'JPEGInterchangeFormat' = "JPEGInterchangeFormat", | ||
'JPEGInterchangeFormatLength' = "JPEGInterchangeFormatLength", | ||
'Software' = "Software", | ||
'DateTime' = "DateTime", | ||
'ExifIFDPointer' = "Exif IFD Pointer", | ||
'GPSInfoIFDPointer' = "GPS Info IFD Pointer", | ||
'InteroperabilityIFDPointer' = "Interoperability IFD Pointer" | ||
} | ||
export declare enum EXIF_IFD { | ||
'ExposureTime' = "ExposureTime", | ||
'FNumber' = "FNumber", | ||
'ExposureProgram' = "ExposureProgram", | ||
'SpectralSensitivity' = "SpectralSensitivity", | ||
'PhotographicSensitivity' = "PhotographicSensitivity", | ||
'OECF' = "OECF", | ||
'SensitivityType' = "SensitivityType", | ||
'StandardOutputSensitivity' = "StandardOutputSensitivity", | ||
'RecommendedExposurelndex' = "RecommendedExposurelndex", | ||
'ISOSpeed' = "ISOSpeed", | ||
'ISOSpeedLatitudeyyy' = "ISOSpeedLatitudeyyy", | ||
'ISOSpeedLatitudezzz' = "ISOSpeedLatitudezzz", | ||
'ExifVersion' = "ExifVersion", | ||
'DateTimeOriginal' = "DateTimeOriginal", | ||
'DateTimeDigitized' = "DateTimeDigitized", | ||
'ComponentsConfiguration' = "ComponentsConfiguration", | ||
'ShutterSpeedValue' = "ShutterSpeedValue", | ||
'ApertureValue' = "ApertureValue", | ||
'BrightnessValue' = "Brightness Value", | ||
'ExposureBiasValue' = "ExposureBiasValue", | ||
'MaxApertureValue' = "MaxAperture Value", | ||
'SubjectDistance' = "SubjectDistance", | ||
'MeteringMode' = "MeteringMode", | ||
'LightSource' = "LightSource", | ||
'Flash' = "Flash", | ||
'FocalLength' = "FocalLength", | ||
'MakerNote' = "MakerNote", | ||
'UserComment' = "UserComment", | ||
'SubSecTime' = "SubSecTime", | ||
'SubSecTimeOriginal' = "SubSecTimeOriginal", | ||
'SubSecTimeDigitized' = "SubSecTimeDigitized", | ||
'FlashpixVersion' = "FlashpixVersion", | ||
'ColorSpace' = "ColorSpace", | ||
'RelatedSoundFile' = "RelatedSoundFile", | ||
'FlashEnergy' = "FlashEnergy", | ||
'SpatialFrequencyResponse' = "SpatialFrequencyResponse", | ||
'FocalPlaneX-Resolution' = "FocalPlaneX-Resolution", | ||
'FocalPlaneY-Resolution' = "FocalPlaneY-Resolution", | ||
'FocalPlane-ResolutionUnit' = "FocalPlane-ResolutionUnit", | ||
'Exposurelndex' = "Exposurelndex", | ||
'SensingMethod' = "SensingMethod", | ||
'FileSource' = "FileSource", | ||
'SceneType' = "SceneType", | ||
'CFApattern' = "CFApattern", | ||
'ExposureMode' = "ExposureMode", | ||
'WhiteBalance' = "WhiteBalance", | ||
'DigitalZoomRatio' = "DigitalZoomRatio", | ||
'FocalLengthIn35mmFilm' = "FocalLengthIn35mmFilm", | ||
'SceneCapture Type' = "SceneCapture Type", | ||
'GainControl' = "GainControl", | ||
'Contrast' = "Contrast", | ||
'Saturation' = "Saturation", | ||
'Sharpness' = "Sharpness", | ||
'DeviceSettingDescription' = "DeviceSettingDescription", | ||
'SubjectDistanceRange' = "SubjectDistanceRange", | ||
'ImageUniquelD' = "ImageUniquelD", | ||
'CameraOwnerName' = "CameraOwnerName", | ||
'BodySerialNumber' = "BodySerialNumber", | ||
'LensSpecification' = "LensSpecification", | ||
'LensMake' = "LensMake", | ||
'LensModel' = "LensModel", | ||
'LensSerialNumber' = "LensSerialNumber", | ||
'Gamma' = "Gamma", | ||
'CompressedBitsPerPixel' = "CompressedBitsPerPixel", | ||
'PixelXDimension' = "PixelXDimension", | ||
'PixelYDimension' = "PixelYDimension", | ||
'SubjectArea' = "SubjectArea", | ||
'FocalPlaneXResolution' = "FocalPlaneXResolution", | ||
'FocalPlaneYResolution' = "FocalPlaneYResolution", | ||
'FocalPlaneResolutionUnit' = "FocalPlaneResolutionUnit", | ||
'SubjectLocation' = "SubjectLocation", | ||
'ExposureIndex' = "ExposureIndex", | ||
'CFAPattern' = "CFAPattern", | ||
'CustomRendered' = "CustomRendered", | ||
'DigitalZoomRation' = "DigitalZoomRation", | ||
'SceneCaptureType' = "SceneCaptureType", | ||
'ImageUniqueID' = "ImageUniqueID" | ||
} | ||
export declare enum INTEROPERABILITY_IFD { | ||
'InteroperabilityIndex' = "InteroperabilityIndex" | ||
} | ||
export declare enum GPS_INFO_IFD { | ||
'GPSVersionID' = "GPSVersionID", | ||
'GPSLatitudeRef' = "GPSLatitudeRef", | ||
'GPSLatitude' = "GPSLatitude", | ||
'GPSImgDirection' = "GPSImgDirection", | ||
'GPSLongitudeRef' = "GPSLongitudeRef", | ||
'GPSLongitude' = "GPSLongitude", | ||
'GPSAltitudeRef' = "GPSAltitudeRef", | ||
'GPSAltitude' = "GPSAltitude", | ||
'GPSTimeStamp' = "GPSTimeStamp", | ||
'GPSSatellites' = "GPSSatellites", | ||
'GPSStatus' = "GPSStatus", | ||
'GPSMeasureMode' = "GPSMeasureMode", | ||
'GPSDOP' = "GPSOP", | ||
'GPSSpeedRef' = "GPSSpeedRef", | ||
'GPSSpeed' = "GPSSpeed", | ||
'GPSTrackRef' = "GPSTrackRef", | ||
'GPSTrack' = "GPSTrack", | ||
'GPSImgDirectionRef' = "GPSImgDirectionRef", | ||
'GPSImgDirectionGPSMapDatum' = "GP SImgDirection GPSMapDatum", | ||
'GPSDestLatitudeRef' = "GPSDestLatitudeRef", | ||
'GPSDestLatitude' = "GPSDestLatitude", | ||
'GPSDestLongitudeRef' = "GPSDestLongitudeRef", | ||
'GPSDestLongitude' = "GPSDestLongitude", | ||
'GPSDestBearingRef' = "GPSDestBearingRef", | ||
'GPSDestBearing' = "GPSDestBearing", | ||
'GPSDestDistanceRef' = "GPSDestDistanceRef", | ||
'GPSDestDistance' = "GPSDestDistance", | ||
'GPSProcessingMethod' = "GPSProcessingMethod", | ||
'GPSArealnformation' = "GPSArealnformation", | ||
'GPSDateStamp' = "GPSDateStamp", | ||
'GPSDifferential' = "GPSDifferential", | ||
'GPSHPositioningError' = "GPSHPositioningError", | ||
'GPSMapDatum' = "GPSMapDatum", | ||
'GPSAreaInformation' = "GPSAreaInformation" | ||
} | ||
export declare enum FIRST_IFD { | ||
'Compression' = "Compression", | ||
'ImageDescription' = "ImageDescription", | ||
'Make' = "Make", | ||
'Model' = "Model", | ||
'TransferFunction' = "TransferFunction", | ||
'Artist' = "Artist", | ||
'WhitePoint' = "WhitePoint", | ||
'PrimaryChromaticities' = "PrimaryChromaticities", | ||
'YCbCrCoefficients' = "YCbCrCoefficients", | ||
'ReferenceBlackWhite' = "ReferenceBlackWhite", | ||
'Copyright' = "Copyright", | ||
'ExifIFDPointer' = "Exif IFD Pointer", | ||
'GPSInfoIFDPointer' = "GPS Info IFD Pointer" | ||
} | ||
/** | ||
* based on CIPA DC-008-2012 Exif Version 2.3 | ||
* @see https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf | ||
*/ | ||
export declare const EXIF_TAGS: { | ||
ZEROTH_IFD: typeof ZEROTH_IFD; | ||
EXIF_IFD: typeof EXIF_IFD; | ||
GPS_INFO_IFD: typeof GPS_INFO_IFD; | ||
INTEROPERABILITY_IFD: typeof INTEROPERABILITY_IFD; | ||
FIRST_IFD: typeof FIRST_IFD; | ||
}; |
{ | ||
"name": "exifly", | ||
"version": "0.1.0", | ||
"description": "An ES modules implementation to get EXIF of an image", | ||
"version": "0.1.1", | ||
"description": "An ES modules Typescript implementation to get EXIF of an image", | ||
"scripts": { | ||
@@ -25,3 +25,6 @@ "build": "rollup -c", | ||
"jpg", | ||
"jpeg" | ||
"jpeg", | ||
"exif-heic-js", | ||
"exif-heic-ts", | ||
"exif.js" | ||
], | ||
@@ -35,10 +38,24 @@ "author": "winjeysong <winjey-song@163.com>", | ||
"devDependencies": { | ||
"rollup": "^2.35.1", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-node-resolve": "^11.0.1", | ||
"rollup-plugin-license": "^3.2.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.29.0", | ||
"typescript": "^4.5.4" | ||
"rollup": "~2.79.1", | ||
"@rollup/plugin-commonjs": "~17.1.0", | ||
"@rollup/plugin-node-resolve": "~11.2.1", | ||
"@rollup/plugin-terser": "~0.4.4", | ||
"husky": "~3.1.0", | ||
"lint-staged": "~9.5.0", | ||
"prettier": "~3.2.5", | ||
"rollup-plugin-license": "~3.2.0", | ||
"rollup-plugin-typescript2": "~0.29.0", | ||
"typescript": "~4.9.5" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"**/*.{js,jsx,tsx,ts,md,json}": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
} | ||
} |
127
README.md
# Exifly | ||
An ES modules implementation based on [exif-heic-js](https://github.com/exif-heic-js/exif-heic-js) to get EXIF of an image. | ||
An ES modules Typescript implementation based on [exif-heic-js](https://github.com/exif-heic-js/exif-heic-js) to get EXIF of an image. | ||
@@ -11,37 +11,42 @@ ## Example | ||
import { useState } from 'react'; | ||
import * as Exifly from "exifly"; | ||
import * as Exifly from 'exifly'; | ||
export default function () { | ||
const [tags, setTags] = useState(''); | ||
const handleFileChange = e => { | ||
let extension = e.target.files[0].name.toLowerCase().split('.').at(-1); | ||
let reader = new FileReader(); | ||
reader.onload = function () { | ||
const exifly = new Exifly.load(reader.result); | ||
if (extension === 'heic') { | ||
tags = exifly.heic() | ||
} else if (extension === 'jpg' || extension === 'jpeg') { | ||
tags = exifly.jpeg(); | ||
} else { | ||
tags = exifly.raw(); | ||
} | ||
console.log(tags); | ||
setTags(JSON.stringify(tags, null, 2)); | ||
}; | ||
reader.readAsArrayBuffer(e.target.files[0]); | ||
} | ||
return ( | ||
<> | ||
<div> | ||
<input type="file" id="image" accept=".heic,.jpeg,.jpg" onChange={handleFileChange} /> | ||
</div> | ||
<div> | ||
<pre>{tags}</pre> | ||
</div> | ||
</> | ||
) | ||
const [tags, setTags] = useState(''); | ||
const handleFileChange = e => { | ||
let extension = e.target.files[0].name.toLowerCase().split('.').at(-1); | ||
let reader = new FileReader(); | ||
reader.onload = function () { | ||
const exifly = new Exifly.load(reader.result); | ||
if (extension === 'heic') { | ||
tags = exifly.heic(); | ||
} else if (extension === 'jpg' || extension === 'jpeg') { | ||
tags = exifly.jpeg(); | ||
} else { | ||
tags = exifly.raw(); | ||
} | ||
console.log(tags); | ||
setTags(JSON.stringify(tags, null, 2)); | ||
}; | ||
reader.readAsArrayBuffer(e.target.files[0]); | ||
}; | ||
return ( | ||
<> | ||
<div> | ||
<input | ||
type="file" | ||
id="image" | ||
accept=".heic,.jpeg,.jpg" | ||
onChange={handleFileChange} | ||
/> | ||
</div> | ||
<div> | ||
<pre>{tags}</pre> | ||
</div> | ||
</> | ||
); | ||
} | ||
@@ -53,43 +58,45 @@ ``` | ||
```html | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Exifly</title> | ||
</head> | ||
</head> | ||
<body> | ||
<body> | ||
<div> | ||
<input type="file" id="image" accept=".heic,.jpeg,.jpg" /> | ||
<input type="file" id="image" accept=".heic,.jpeg,.jpg" /> | ||
</div> | ||
<div> | ||
<pre id="tags"></pre> | ||
<pre id="tags"></pre> | ||
</div> | ||
<script src="../dist/exifly.umd.js"></script> | ||
<script> | ||
document.getElementById("image").onchange = function (e) { | ||
let extension = e.target.files[0].name.toLowerCase().split('.').at(-1); | ||
let reader = new FileReader(); | ||
document.getElementById('image').onchange = function (e) { | ||
let extension = e.target.files[0].name.toLowerCase().split('.').at(-1); | ||
let reader = new FileReader(); | ||
reader.onload = function () { | ||
const exifly = new Exifly.load(reader.result); | ||
if (extension === 'heic') { | ||
tags = exifly.heic() | ||
} else if (extension === 'jpg' || extension === 'jpeg') { | ||
tags = exifly.jpeg(); | ||
} else { | ||
tags = exifly.raw(); | ||
} | ||
console.log(tags) | ||
document.getElementById('tags').textContent = JSON.stringify(tags, null, 2); | ||
}; | ||
reader.onload = function () { | ||
const exifly = new Exifly.load(reader.result); | ||
if (extension === 'heic') { | ||
tags = exifly.heic(); | ||
} else if (extension === 'jpg' || extension === 'jpeg') { | ||
tags = exifly.jpeg(); | ||
} else { | ||
tags = exifly.raw(); | ||
} | ||
console.log(tags); | ||
document.getElementById('tags').textContent = JSON.stringify( | ||
tags, | ||
null, | ||
2, | ||
); | ||
}; | ||
reader.readAsArrayBuffer(e.target.files[0]); | ||
} | ||
reader.readAsArrayBuffer(e.target.files[0]); | ||
}; | ||
</script> | ||
</body> | ||
</body> | ||
</html> | ||
``` |
110753
2171
101
10