Exemplo n.º 1
0
func init() {
	tiff.PrivateTags.Register(iopIFDTag)

	// http://www.exiv2.org/tags.html
	iopTags.Register(tiff.NewTag(1, "InteroperabilityIndex", nil))
	iopTags.Register(tiff.NewTag(2, "InteroperabilityVersion", nil))
	iopTags.Register(tiff.NewTag(4096, "RelatedImageFileFormat", nil))
	iopTags.Register(tiff.NewTag(4097, "RelatedImageWidth", nil))
	iopTags.Register(tiff.NewTag(4098, "RelatedImageLength", nil))

	iopTags.Lock()

	IOPTagSpace.RegisterTagSet(iopTags)
	tiff.RegisterTagSpace(IOPTagSpace)
}
Exemplo n.º 2
0
func init() {
	tiff.PrivateTags.Register(gpsIFDTag)

	// http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/gps.html
	// http://www.exiv2.org/tags.html
	gpsTags.Register(tiff.NewTag(0, "GPSVersionID", nil))
	gpsTags.Register(tiff.NewTag(1, "GPSLatitudeRef", nil))
	gpsTags.Register(tiff.NewTag(2, "GPSLatitude", nil))
	gpsTags.Register(tiff.NewTag(3, "GPSLongitudeRef", nil))
	gpsTags.Register(tiff.NewTag(4, "GPSLongitude", nil))
	gpsTags.Register(tiff.NewTag(5, "GPSAltitudeRef", nil))
	gpsTags.Register(tiff.NewTag(6, "GPSAltitude", nil))
	gpsTags.Register(tiff.NewTag(7, "GPSTimeStamp", nil))
	gpsTags.Register(tiff.NewTag(8, "GPSSatellites", nil))
	gpsTags.Register(tiff.NewTag(9, "GPSStatus", nil))
	gpsTags.Register(tiff.NewTag(10, "GPSMeasureMode", nil))
	gpsTags.Register(tiff.NewTag(11, "GPSDOP", nil))
	gpsTags.Register(tiff.NewTag(12, "GPSSpeedRef", nil))
	gpsTags.Register(tiff.NewTag(13, "GPSSpeed", nil))
	gpsTags.Register(tiff.NewTag(14, "GPSTrackRef", nil))
	gpsTags.Register(tiff.NewTag(15, "GPSTrack", nil))
	gpsTags.Register(tiff.NewTag(16, "GPSImgDirectionRef", nil))
	gpsTags.Register(tiff.NewTag(17, "GPSImgDirection", nil))
	gpsTags.Register(tiff.NewTag(18, "GPSMapDatum", nil))
	gpsTags.Register(tiff.NewTag(19, "GPSDestLatitudeRef", nil))
	gpsTags.Register(tiff.NewTag(20, "GPSDestLatitude", nil))
	gpsTags.Register(tiff.NewTag(21, "GPSDestLongitudeRef", nil))
	gpsTags.Register(tiff.NewTag(22, "GPSDestLongitude", nil))
	gpsTags.Register(tiff.NewTag(23, "GPSDestBearingRef", nil))
	gpsTags.Register(tiff.NewTag(24, "GPSDestBearing", nil))
	gpsTags.Register(tiff.NewTag(25, "GPSDestDistanceRef", nil))
	gpsTags.Register(tiff.NewTag(26, "GPSDestDistance", nil))
	gpsTags.Register(tiff.NewTag(27, "GPSProcessingMethod", nil))
	gpsTags.Register(tiff.NewTag(28, "GPSAreaInformation", nil))
	gpsTags.Register(tiff.NewTag(29, "GPSDateStamp", nil))
	gpsTags.Register(tiff.NewTag(30, "GPSDifferential", nil))

	gpsTags.Lock()

	GPSTagSpace.RegisterTagSet(gpsTags)
	tiff.RegisterTagSpace(GPSTagSpace)
}
Exemplo n.º 3
0
func init() {
	// Tag 0
	MakerNoteTags.Register(tiff.NewTag(1, "Version", nil))
	MakerNoteTags.Register(tiff.NewTag(2, "ISOSpeed", nil))
	MakerNoteTags.Register(tiff.NewTag(3, "ColorMode", nil))
	MakerNoteTags.Register(tiff.NewTag(4, "Quality", nil))
	MakerNoteTags.Register(tiff.NewTag(5, "WhiteBalance", nil))
	MakerNoteTags.Register(tiff.NewTag(6, "Sharpening", nil))
	MakerNoteTags.Register(tiff.NewTag(7, "FocusMode", nil))
	MakerNoteTags.Register(tiff.NewTag(8, "FlashSetting", nil))
	MakerNoteTags.Register(tiff.NewTag(9, "FlashDevice", nil))
	// Tag 10
	MakerNoteTags.Register(tiff.NewTag(11, "WhiteBalanceFineTune", nil))
	MakerNoteTags.Register(tiff.NewTag(12, "WB_RBLevels", nil))
	MakerNoteTags.Register(tiff.NewTag(13, "ProgramShift", nil))
	MakerNoteTags.Register(tiff.NewTag(14, "ExposureDifference", nil))
	MakerNoteTags.Register(tiff.NewTag(15, "ISOSelection", nil))
	MakerNoteTags.Register(tiff.NewTag(16, "DataDump", nil))
	MakerNoteTags.Register(tiff.NewTag(17, "PreviewIFD", nil))
	MakerNoteTags.Register(tiff.NewTag(18, "FlashExposureComp", nil))
	MakerNoteTags.Register(tiff.NewTag(19, "ISOSetting", nil))
	MakerNoteTags.Register(tiff.NewTag(20, "ColorBalanceA", nil))
	// Tag 21
	MakerNoteTags.Register(tiff.NewTag(22, "ImageBoundary", nil))
	MakerNoteTags.Register(tiff.NewTag(23, "ExternalFlashExposureComp", nil))
	MakerNoteTags.Register(tiff.NewTag(24, "FlashExposureBracketValue", nil))
	MakerNoteTags.Register(tiff.NewTag(25, "ExposureBracketValue", nil))
	MakerNoteTags.Register(tiff.NewTag(26, "ImageProcessing", nil))
	MakerNoteTags.Register(tiff.NewTag(27, "CropHiSpeed", nil))
	MakerNoteTags.Register(tiff.NewTag(28, "ExposureTuning", nil))
	MakerNoteTags.Register(tiff.NewTag(29, "SerialNumber", nil))
	MakerNoteTags.Register(tiff.NewTag(30, "ColorSpace", nil))
	MakerNoteTags.Register(tiff.NewTag(31, "VRInfo", nil))
	MakerNoteTags.Register(tiff.NewTag(32, "ImageAuthentication", nil))
	MakerNoteTags.Register(tiff.NewTag(33, "FaceDetect", nil))
	MakerNoteTags.Register(tiff.NewTag(34, "ActiveD-Lighting", nil))
	MakerNoteTags.Register(tiff.NewTag(35, "PictureControlData", nil))
	MakerNoteTags.Register(tiff.NewTag(36, "WorldTime", nil))
	MakerNoteTags.Register(tiff.NewTag(37, "ISOInfo", nil))
	// Tags 38..41
	MakerNoteTags.Register(tiff.NewTag(42, "VignetteControl", nil))
	MakerNoteTags.Register(tiff.NewTag(43, "DistortInfo", nil))
	// Tags 44..52
	MakerNoteTags.Register(tiff.NewTag(53, "HDRInfo", nil))
	// Tags 54..56
	MakerNoteTags.Register(tiff.NewTag(57, "LocationInfo", nil))
	// Tags 58..60
	MakerNoteTags.Register(tiff.NewTag(61, "BlackLevel", nil))
	// Tags 62..127
	MakerNoteTags.Register(tiff.NewTag(128, "ImageAdjustment", nil))
	MakerNoteTags.Register(tiff.NewTag(129, "ToneComp", nil))
	MakerNoteTags.Register(tiff.NewTag(130, "AuxiliaryLens", nil))
	MakerNoteTags.Register(tiff.NewTag(131, "LensType", nil))
	MakerNoteTags.Register(tiff.NewTag(132, "Lens", nil))
	MakerNoteTags.Register(tiff.NewTag(133, "ManualFocusDistance", nil))
	MakerNoteTags.Register(tiff.NewTag(134, "DigitalZoom", nil))
	MakerNoteTags.Register(tiff.NewTag(135, "FlashMode", nil))
	MakerNoteTags.Register(tiff.NewTag(136, "AFInfo", nil))
	MakerNoteTags.Register(tiff.NewTag(137, "ShootingMode", nil))
	MakerNoteTags.Register(tiff.NewTag(138, "AutoBracketRelease", nil))
	MakerNoteTags.Register(tiff.NewTag(139, "LensFStops", nil))
	MakerNoteTags.Register(tiff.NewTag(140, "ContrastCurve", nil))
	MakerNoteTags.Register(tiff.NewTag(141, "ColorHue", nil))
	// Tag 142
	MakerNoteTags.Register(tiff.NewTag(143, "SceneMode", nil))
	MakerNoteTags.Register(tiff.NewTag(144, "LightSource", nil))
	MakerNoteTags.Register(tiff.NewTag(145, "ShotInfo", nil))
	MakerNoteTags.Register(tiff.NewTag(146, "HueAdjustment", nil))
	MakerNoteTags.Register(tiff.NewTag(147, "NEFCompression", nil))
	MakerNoteTags.Register(tiff.NewTag(148, "Saturation", nil))
	MakerNoteTags.Register(tiff.NewTag(149, "NoiseReduction", nil))
	MakerNoteTags.Register(tiff.NewTag(150, "NEFLinearizationTable", nil))
	MakerNoteTags.Register(tiff.NewTag(151, "ColorBalance", nil))
	MakerNoteTags.Register(tiff.NewTag(152, "LensData", nil))
	MakerNoteTags.Register(tiff.NewTag(153, "RawImageCenter", nil))
	MakerNoteTags.Register(tiff.NewTag(154, "SensorPixelSize", nil))
	// Tag 155
	MakerNoteTags.Register(tiff.NewTag(156, "SceneAssist", nil))
	// Tag 157
	MakerNoteTags.Register(tiff.NewTag(158, "RetouchHistory", nil))
	// Tag 159
	MakerNoteTags.Register(tiff.NewTag(160, "SerialNumber", nil))
	// Tag 161
	MakerNoteTags.Register(tiff.NewTag(162, "ImageDataSize", nil))
	// Tags 163..164
	MakerNoteTags.Register(tiff.NewTag(165, "ImageCount", nil))
	MakerNoteTags.Register(tiff.NewTag(166, "DeletedImageCount", nil))
	MakerNoteTags.Register(tiff.NewTag(167, "ShutterCount", nil))
	MakerNoteTags.Register(tiff.NewTag(168, "FlashInfo", nil))
	MakerNoteTags.Register(tiff.NewTag(169, "ImageOptimization", nil))
	MakerNoteTags.Register(tiff.NewTag(170, "Saturation", nil))
	MakerNoteTags.Register(tiff.NewTag(171, "VariProgram", nil))
	MakerNoteTags.Register(tiff.NewTag(172, "ImageStabilization", nil))
	MakerNoteTags.Register(tiff.NewTag(173, "AFResponse", nil))
	// Tags 174..175
	MakerNoteTags.Register(tiff.NewTag(176, "MultiExposure", nil))
	MakerNoteTags.Register(tiff.NewTag(177, "HighISONoiseReduction", nil))
	// Tag 178
	MakerNoteTags.Register(tiff.NewTag(179, "ToningEffect", nil))
	// Tags 180..181
	MakerNoteTags.Register(tiff.NewTag(182, "PowerUpTime", nil))
	MakerNoteTags.Register(tiff.NewTag(183, "AFInfo2", nil))
	MakerNoteTags.Register(tiff.NewTag(184, "FileInfo", nil))
	MakerNoteTags.Register(tiff.NewTag(185, "AFTune", nil))
	// Tags 186..188
	MakerNoteTags.Register(tiff.NewTag(189, "PictureControlData", nil))
	// Tags 190..194
	MakerNoteTags.Register(tiff.NewTag(195, "BarometerInfo", nil))
	// Tags 196..3583
	MakerNoteTags.Register(tiff.NewTag(3584, "PrintIM", nil))
	MakerNoteTags.Register(tiff.NewTag(3585, "CaptureData", nil))
	// Tags 3586..3592
	MakerNoteTags.Register(tiff.NewTag(3593, "CaptureVersion", nil))
	// Tags 3594..3597
	MakerNoteTags.Register(tiff.NewTag(3598, "CaptureOffsets", nil))
	// Tag 3599
	MakerNoteTags.Register(tiff.NewTag(3600, "ScanIFD", nil))
	// Tags 3601..3602
	MakerNoteTags.Register(tiff.NewTag(3603, "CaptureEditVersions", nil))
	// Tags 3604..3612
	MakerNoteTags.Register(tiff.NewTag(3613, "ICCProfile", nil))
	MakerNoteTags.Register(tiff.NewTag(3614, "CaptureOutput", nil))
	// Tags 3615..3617
	MakerNoteTags.Register(tiff.NewTag(3618, "NEFBitDepth", nil))
	// Tags 3619..65535

	MakerNoteTagSpace.RegisterTagSet(MakerNoteTags)

	/*
		TODO: Find tag names for the following that we know to exist...
		Tag 163/0x00a3
		Tag 164/0x00a4
		Tag 186/0x00ba
		Tag 187/0x00bb
		Tag 188/0x00bc
	*/
	tiff.RegisterTagSpace(MakerNoteTagSpace)
}
Exemplo n.º 4
0
func init() {
	tiff.PrivateTags.Register(exifIFDTag)

	exifTags.Register(tiff.NewTag(33434, "ExposureTime", fiRat))
	exifTags.Register(tiff.NewTag(33437, "FNumber", fiFNumber))
	exifTags.Register(tiff.NewTag(34850, "ExposureProgram", fiExposureProgram))
	exifTags.Register(tiff.NewTag(34852, "SpectralSensitivity", nil))
	exifTags.Register(tiff.NewTag(34855, "ISOSpeedRatings", nil))
	exifTags.Register(tiff.NewTag(34856, "OECF", nil))
	exifTags.Register(tiff.NewTag(34864, "SensitivityType", nil))
	exifTags.Register(tiff.NewTag(34866, "RecommendedExposureIndex", nil))
	exifTags.Register(tiff.NewTag(36864, "ExifVersion", nil))
	exifTags.Register(tiff.NewTag(36867, "DateTimeOriginal", nil))
	exifTags.Register(tiff.NewTag(36868, "DateTimeDigitized", nil))
	exifTags.Register(tiff.NewTag(37121, "ComponentsConfiguration", nil))
	exifTags.Register(tiff.NewTag(37122, "CompressedBitsPerPixel", nil))
	exifTags.Register(tiff.NewTag(37377, "ShutterSpeedValue", nil))
	exifTags.Register(tiff.NewTag(37378, "ApertureValue", nil))
	exifTags.Register(tiff.NewTag(37379, "BrightnessValue", nil))
	exifTags.Register(tiff.NewTag(37380, "ExposureBiasValue", nil))
	exifTags.Register(tiff.NewTag(37381, "MaxApertureValue", nil))
	exifTags.Register(tiff.NewTag(37382, "SubjectDistance", nil))
	exifTags.Register(tiff.NewTag(37383, "MeteringMode", nil))
	exifTags.Register(tiff.NewTag(37384, "LightSource", nil))
	exifTags.Register(tiff.NewTag(37385, "Flash", nil))
	exifTags.Register(tiff.NewTag(37386, "FocalLength", nil))
	exifTags.Register(tiff.NewTag(37396, "SubjectArea", nil))
	exifTags.Register(tiff.NewTag(37500, "MakerNote", nil))
	exifTags.Register(tiff.NewTag(37510, "UserComment", nil))
	exifTags.Register(tiff.NewTag(37520, "SubsecTime", nil))
	exifTags.Register(tiff.NewTag(37521, "SubsecTimeOriginal", nil))
	exifTags.Register(tiff.NewTag(37522, "SubsecTimeDigitized", nil))
	exifTags.Register(tiff.NewTag(40960, "FlashpixVersion", nil))
	exifTags.Register(tiff.NewTag(40961, "ColorSpace", nil))
	exifTags.Register(tiff.NewTag(40962, "PixelXDimension", nil))
	exifTags.Register(tiff.NewTag(40963, "PixelYDimension", nil))
	exifTags.Register(tiff.NewTag(40964, "RelatedSoundFile", nil))
	exifTags.Register(tiff.NewTag(41483, "FlashEnergy", nil))
	exifTags.Register(tiff.NewTag(41484, "SpatialFrequencyResponse", nil))
	exifTags.Register(tiff.NewTag(41486, "FocalPlaneXResolution", nil))
	exifTags.Register(tiff.NewTag(41487, "FocalPlaneYResolution", nil))
	exifTags.Register(tiff.NewTag(41488, "FocalPlaneResolutionUnit", nil))
	exifTags.Register(tiff.NewTag(41492, "SubjectLocation", nil))
	exifTags.Register(tiff.NewTag(41493, "ExposureIndex", nil))
	exifTags.Register(tiff.NewTag(41495, "SensingMethod", nil))
	exifTags.Register(tiff.NewTag(41728, "FileSource", nil))
	exifTags.Register(tiff.NewTag(41729, "SceneType", nil))
	exifTags.Register(tiff.NewTag(41730, "CFAPattern", nil))
	exifTags.Register(tiff.NewTag(41985, "CustomRendered", nil))
	exifTags.Register(tiff.NewTag(41986, "ExposureMode", nil))
	exifTags.Register(tiff.NewTag(41987, "WhiteBalance", nil))
	exifTags.Register(tiff.NewTag(41988, "DigitalZoomRatio", nil))
	exifTags.Register(tiff.NewTag(41989, "FocalLengthIn35mmFilm", nil))
	exifTags.Register(tiff.NewTag(41990, "SceneCaptureType", nil))
	exifTags.Register(tiff.NewTag(41991, "GainControl", nil))
	exifTags.Register(tiff.NewTag(41992, "Contrast", nil))
	exifTags.Register(tiff.NewTag(41993, "Saturation", nil))
	exifTags.Register(tiff.NewTag(41994, "Sharpness", nil))
	exifTags.Register(tiff.NewTag(41995, "DeviceSettingDescription", nil))
	exifTags.Register(tiff.NewTag(41996, "SubjectDistanceRange", nil))
	exifTags.Register(tiff.NewTag(42016, "ImageUniqueID", nil))
	exifTags.Register(tiff.NewTag(42032, "CameraOwnerName", nil))
	exifTags.Register(tiff.NewTag(42033, "BodySerialNumber", nil))
	exifTags.Register(tiff.NewTag(42034, "LensSpecification", nil))
	exifTags.Register(tiff.NewTag(42035, "LensMake", nil))
	exifTags.Register(tiff.NewTag(42036, "LensModel", nil))
	exifTags.Register(tiff.NewTag(42037, "LensSerialNumber", nil))

	// Tags that indicate the offsets to the respective IFDs.
	exifTags.Register(exifIFDTag)
	exifTags.Register(gpsIFDTag)
	exifTags.Register(iopIFDTag)

	// Not sure if this actually belongs in Exif, but it has shown up in an ExifIFD.
	exifTags.Register(tiff.NewTag(18246, "Rating", nil))

	// Prevent further registration in exif.  If tags are missing, they
	// should be added here instead of added from the outside.
	exifTags.Lock()

	tiff.DefaultTagSpace.RegisterTagSet(exifTags)

	ExifTagSpace.RegisterTagSet(tiff.BaselineTags)
	ExifTagSpace.RegisterTagSet(tiff.ExtendedTags)
	ExifTagSpace.RegisterTagSet(exifTags)

	tiff.RegisterTagSpace(ExifTagSpace)
}