exif

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoOrientation

func AutoOrientation(o Orientation, src *fp16.NRGBAh) *fp16.NRGBAh

AutoOrientation returns an image with the orientation applied.

func Encode

func Encode(w io.Writer, t *TIFF) error

Types

type Exif

type Exif struct {
	// ExposureTime is the exposure time, given in seconds.
	ExposureTime *Rational

	// FNumber is the F number.
	FNumber *Rational

	// ExposureProgram is the exposure program.
	ExposureProgram ExposureProgram

	// SpectralSensitivity is the spectral sensitivity of each channel of the camera used.
	SpectralSensitivity *string

	// ISOSpeedRatings is the ISO speed and ISO latitude of the camera or input device as specified in ISO 12232.
	ISOSpeedRatings []uint16

	// DateTimeOriginal is the date and time when the original image data was generated.
	DateTimeOriginal *string

	// DateTimeDigitized is the date and time when the image was stored as digital data.
	DateTimeDigitized *string

	// ShutterSpeedValue is the shutter speed.
	ShutterSpeedValue *SRational

	// ApertureValue is the lens aperture.
	ApertureValue *Rational

	// BrightnessValue is the value of brightness.
	BrightnessValue *SRational

	// ExposureBiasValue is the exposure bias.
	ExposureBiasValue *SRational
}

type ExposureProgram

type ExposureProgram int
const (
	ExposureProgramUnknown          ExposureProgram = 0
	ExposureProgramManual           ExposureProgram = 1
	ExposureProgramNormal           ExposureProgram = 2
	ExposureProgramAperturePriority ExposureProgram = 3
	ExposureProgramShutterPriority  ExposureProgram = 4
	ExposureProgramCreative         ExposureProgram = 5
	ExposureProgramAction           ExposureProgram = 6
	ExposureProgramPortrait         ExposureProgram = 7
	ExposureProgramLandscape        ExposureProgram = 8
)

func (ExposureProgram) String

func (p ExposureProgram) String() string

type GPS

type GPS struct {
	// VersionID is the version of GPSInfoIFD.
	VersionID [4]byte

	// LatitudeRef is the latitude of the GPS receiver.
	LatitudeRef *string

	// Latitude is the latitude of the GPS receiver.
	Latitude [3]Rational

	// LongitudeRef is the longitude of the GPS receiver.
	LongitudeRef *string

	// Longitude is the longitude of the GPS receiver.
	Longitude [3]Rational

	// AltitudeRef is the altitude of the GPS receiver.
	AltitudeRef *byte

	// Altitude is the altitude of the GPS receiver.
	Altitude *Rational

	// TimeStamp is the time as UTC (Coordinated Universal Time).
	TimeStamp [3]Rational

	// Satellites is the GPS satellites used for measurements.
	Satellites *string

	// Status is the status of the GPS receiver when the image is recorded.
	Status *string

	// MeasureMode is the GPS measurement mode.
	MeasureMode *string

	// DOP is the measurement precision of GPS receiver.
	DOP Rational

	// SpeedRef is the speed unit of GPS receiver.
	SpeedRef *string

	// Speed is the speed of GPS receiver.
	Speed *Rational

	// TrackRef is the reference for giving the direction of GPS receiver movement.
	TrackRef *string

	// Track is the direction of GPS receiver movement.
	Track *Rational

	// ImgDirectionRef is the reference for giving the direction of the image when it is captured.
	ImgDirectionRef *string

	// ImgDirection is the direction of the image when it is captured.
	ImgDirection *Rational

	// MapDatum is the geodetic survey data used by the GPS receiver.
	MapDatum *string

	// DestLatitudeRef is the latitude of the destination point.
	DestLatitudeRef *string

	// DestLatitude is the latitude of the destination point.
	DestLatitude [3]Rational

	// DestLongitudeRef is the longitude of the destination point.
	DestLongitudeRef *string

	// DestLongitude is the longitude of the destination point.
	DestLongitude [3]Rational

	// DestBearingRef is the reference used for giving the bearing to the destination point.
	DestBearingRef *string

	// DestBearing is the bearing to the destination point.
	DestBearing *Rational

	// DestDistanceRef is the unit used for expressing the distance to the destination point.
	DestDistanceRef *string

	// DestDistance is the distance to the destination point.
	DestDistance *Rational

	// ProcessingMethod is the name of the method used for location finding.
	ProcessingMethod []byte

	// AreaInformation is the name of the GPS area.
	AreaInformation []byte

	// DateStamp is the date as UTC (Coordinated Universal Time).
	DateStamp *string

	// Differential is the differential correction applied to the GPS receiver.
	Differential *uint16

	// HPositioningError is the horizontal positioning errors.
	HPositioningError *Rational
}

type Orientation

type Orientation int
const (
	OrientationUnknown     Orientation = 0
	OrientationTopLeft     Orientation = 1
	OrientationTopRight    Orientation = 2
	OrientationBottomRight Orientation = 3
	OrientationBottomLeft  Orientation = 4
	OrientationLeftTop     Orientation = 5
	OrientationRightTop    Orientation = 6
	OrientationRightBottom Orientation = 7
	OrientationLeftBottom  Orientation = 8
)

func (Orientation) String

func (o Orientation) String() string

type Rational

type Rational struct {
	Numerator   uint32
	Denominator uint32
}

type ResolutionUnit

type ResolutionUnit int
const (
	ResolutionUnitUnknown    ResolutionUnit = 0
	ResolutionUnitInch       ResolutionUnit = 2
	ResolutionUnitCentimeter ResolutionUnit = 3
)

func (ResolutionUnit) String

func (u ResolutionUnit) String() string

type SRational

type SRational struct {
	Numerator   int32
	Denominator int32
}

type TIFF

type TIFF struct {
	// Orientation is the orientation of the image.
	Orientation Orientation

	// XResolution is the image resolution in width direction.
	XResolution *Rational

	// YResolution is the image resolution in height direction.
	YResolution *Rational

	// ResolutionUnit is the unit of XResolution and YResolution.
	ResolutionUnit ResolutionUnit

	// ImageDescription is the image title, that is title of the image given by the photographer.
	ImageDescription *string

	// Make is the manufacturer of the recording equipment.
	Make *string

	// Model is the model name or model number of the equipment.
	Model *string

	// Software is the software used for image processing.
	Software *string

	// DateTime is the date and time of image creation.
	DateTime *string

	// Artist is the person who created the image.
	Artist *string

	// Copyright is the copyright.
	Copyright *string

	// Exif is the Exif information.
	Exif *Exif

	//  is the GPS information.
	*GPS
}

func Decode

func Decode(r io.Reader) (*TIFF, error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL