Exemplo n.º 1
0
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package exif

import (
	"math/big"

	"github.com/google/tiff"
)

const GPSIFDTagID = 34853

var (
	gpsTags     = tiff.NewTagSet("GPS", 0, 65535)
	GPSTagSpace = tiff.NewTagSpace("GPS")
	gpsIFDTag   = tiff.NewTag(GPSIFDTagID, "GPSIFD", nil)
)

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))
Exemplo n.º 2
0
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package exif

import "github.com/google/tiff"

const InteroperabilityIFDTagID = 40965

var (
	iopTags     = tiff.NewTagSet("Interoperability", 0, 65535)
	IOPTagSpace = tiff.NewTagSpace("Interoperability")
	iopIFDTag   = tiff.NewTag(InteroperabilityIFDTagID, "InteroperabilityIFD", nil)
)

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.º 3
0
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package nikon

import "github.com/google/tiff"

var (
	MakerNoteTags     = tiff.NewTagSet("NikonMakerNote", 0, 65535)
	MakerNoteTagSpace = tiff.NewTagSpace("NikonMakerNote")
)

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))
Exemplo n.º 4
0
)

/*
http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html
http://www.exiv2.org/tags.html
http://www.cipa.jp/exifprint/index_e.html
http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf
http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf
http://www.jeita.or.jp/cgi-bin/standard_e/list.cgi?cateid=1&subcateid=4
*/

const ExifIFDTagID = 34665

var (
	exifTags     = tiff.NewTagSet("Exif", 0, 65535)
	ExifTagSpace = tiff.NewTagSpace("Exif")
	exifIFDTag   = tiff.NewTag(ExifIFDTagID, "ExifIFD", nil)
)

/*
TODO: Break up these exif tags into sets based on the exif version.  They
still all likely belong in the same space though.  For an example, take
a look at the way DNG was broken up.  Tags introduced in newer versions
are added to a set named for the version.  They still all get put into
the same space, just the sets are identified separately.
*/

/*
TODO: Break up tags into categories
From TIFF:
  A. Tags relating to image data structure