ImgMeta

package
v0.0.0-...-b1ce241 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExifTagImageWidth                  uint16 = 0x100
	ExifTagImageHeight                 uint16 = 0x101
	ExifTagBitsPerSample               uint16 = 0x102
	ExifTagCompression                 uint16 = 0x103
	ExifTagPhotometricInterpretation   uint16 = 0x106
	ExifTagImageDescription            uint16 = 0x10E
	ExifTagMake                        uint16 = 0x10F
	ExifTagModel                       uint16 = 0x110
	ExifTagStripOffsets                uint16 = 0x111
	ExifTagOrientation                 uint16 = 0x112
	ExifTagSamplesPerPixel             uint16 = 0x115
	ExifTagRowsPerStrip                uint16 = 0x116
	ExifTagStripByteCounts             uint16 = 0x117
	ExifTagXResolution                 uint16 = 0x11A
	ExifTagYResolution                 uint16 = 0x11B
	ExifTagPlanarConfiguration         uint16 = 0x11C
	ExifTagResolutionUnit              uint16 = 0x128
	ExifTagTransferFunction            uint16 = 0x12D
	ExifTagSoftware                    uint16 = 0x131
	ExifTagDateTime                    uint16 = 0x132
	ExifTagArtist                      uint16 = 0x13B
	ExifTagWhitePoint                  uint16 = 0x13E
	ExifTagPrimaryChromaticities       uint16 = 0x13F
	ExifTagJPEGInterchangeFormat       uint16 = 0x201
	ExifTagJPEGInterchangeFormatLength uint16 = 0x202
	ExifTagYCbCrCoefficients           uint16 = 0x211
	ExifTagYCbCrSubSampling            uint16 = 0x212
	ExifTagYCbCrPositioning            uint16 = 0x213
	ExifTagReferenceBlackWhite         uint16 = 0x214
	ExifTagCopyright                   uint16 = 0x8298

	ExifTagExposureTime              uint16 = 0x829A
	ExifTagFNumber                   uint16 = 0x829D
	ExifTagExposureProgram           uint16 = 0x8822
	ExifTagSpectralSensitivity       uint16 = 0x8824
	ExifTagPhotographicSensitivity   uint16 = 0x8827
	ExifTagOECF                      uint16 = 0x8828
	ExifTagSensitivityType           uint16 = 0x8830
	ExifTagStandardOutputSensitivity uint16 = 0x8831
	ExifTagRecommendedExposureIndex  uint16 = 0x8832
	ExifTagISOSpeed                  uint16 = 0x8833
	ExifTagISOSpeedLatitudeyyy       uint16 = 0x8834
	ExifTagISOSpeedLatitudezzz       uint16 = 0x8835
	ExifTagExifVersion               uint16 = 0x9000
	ExifTagDateTimeOriginal          uint16 = 0x9003
	ExifTagDateTimeDigitized         uint16 = 0x9004
	ExifTagComponentsConfiguration   uint16 = 0x9101
	ExifTagCompressedBitsPerPixel    uint16 = 0x9102
	ExifTagShutterSpeedValue         uint16 = 0x9201
	ExifTagApertureValue             uint16 = 0x9202
	ExifTagBrightnessValue           uint16 = 0x9203
	ExifTagExposureBiasValue         uint16 = 0x9204
	ExifTagMaxApertureValue          uint16 = 0x9205
	ExifTagSubjectDistance           uint16 = 0x9206
	ExifTagMeteringMode              uint16 = 0x9207
	ExifTagLightSource               uint16 = 0x9208
	ExifTagFlash                     uint16 = 0x9209
	ExifTagFocalLength               uint16 = 0x920A
	ExifTagSubjectArea               uint16 = 0x9214
	ExifTagMakerNote                 uint16 = 0x927C
	ExifTagUserComment               uint16 = 0x9286
	ExifTagSubsecTime                uint16 = 0x9290
	ExifTagSubsecTimeOriginal        uint16 = 0x9291
	ExifTagSubsecTimeDigitized       uint16 = 0x9292
	ExifTagFlashpixVersion           uint16 = 0xA000
	ExifTagColorSpace                uint16 = 0xA001
	ExifTagPixelXDimension           uint16 = 0xA002
	ExifTagPixelYDimension           uint16 = 0xA003
	ExifTagRelatedSoundFile          uint16 = 0xA004
	ExifTagFlashEnergy               uint16 = 0xA20B
	ExifTagSpatialFrequencyResponse  uint16 = 0xA20C
	ExifTagFocalPlaneXResolution     uint16 = 0xA20E
	ExifTagFocalPlaneYResolution     uint16 = 0xA20F
	ExifTagFocalPlaneResolutionUnit  uint16 = 0xA210
	ExifTagSubjectLocation           uint16 = 0xA214
	ExifTagExposureIndex             uint16 = 0xA215
	ExifTagSensingMethod             uint16 = 0xA217
	ExifTagFileSource                uint16 = 0xA300
	ExifTagSceneType                 uint16 = 0xA301
	ExifTagCFAPattern                uint16 = 0xA302
	ExifTagCustomRendered            uint16 = 0xA401
	ExifTagExposureMode              uint16 = 0xA402
	ExifTagWhiteBalance              uint16 = 0xA403
	ExifTagDigitalZoomRatio          uint16 = 0xA404
	ExifTagFocalLengthIn35mmFilm     uint16 = 0xA405
	ExifTagSceneCaptureType          uint16 = 0xA406
	ExifTagGainControl               uint16 = 0xA407
	ExifTagContrast                  uint16 = 0xA408
	ExifTagSaturation                uint16 = 0xA409
	ExifTagSharpness                 uint16 = 0xA40A
	ExifTagDeviceSettingDescription  uint16 = 0xA40B
	ExifTagSubjectDistanceRange      uint16 = 0xA40C
	ExifTagImageUniqueID             uint16 = 0xA420
	ExifTagCameraOwnerName           uint16 = 0xA430
	ExifTagBodySerialNumber          uint16 = 0xA431
	ExifTagLensSpecification         uint16 = 0xA432
	ExifTagLensMake                  uint16 = 0xA433
	ExifTagLensModel                 uint16 = 0xA434
	ExifTagLensSerialNumber          uint16 = 0xA435

	ExifGpsTagGPSVersionID         uint16 = 0x0
	ExifGpsTagGPSLatitudeRef       uint16 = 0x1
	ExifGpsTagGPSLatitude          uint16 = 0x2
	ExifGpsTagGPSLongitudeRef      uint16 = 0x3
	ExifGpsTagGPSLongitude         uint16 = 0x4
	ExifGpsTagGPSAltitudeRef       uint16 = 0x5
	ExifGpsTagGPSAltitude          uint16 = 0x6
	ExifGpsTagGPSTimestamp         uint16 = 0x7
	ExifGpsTagGPSSatellites        uint16 = 0x8
	ExifGpsTagGPSStatus            uint16 = 0x9
	ExifGpsTagGPSMeasureMode       uint16 = 0xA
	ExifGpsTagGPSDOP               uint16 = 0xB
	ExifGpsTagGPSSpeedRef          uint16 = 0xC
	ExifGpsTagGPSSpeed             uint16 = 0xD
	ExifGpsTagGPSTrackRef          uint16 = 0xE
	ExifGpsTagGPSTrack             uint16 = 0xF
	ExifGpsTagGPSImgDirectionRef   uint16 = 0x10
	ExifGpsTagGPSImgDirection      uint16 = 0x11
	ExifGpsTagGPSMapDatum          uint16 = 0x12
	ExifGpsTagGPSDestLatitudeRef   uint16 = 0x13
	ExifGpsTagGPSDestLatitude      uint16 = 0x14
	ExifGpsTagGPSDestLongitudeRef  uint16 = 0x15
	ExifGpsTagGPSDestLongitude     uint16 = 0x16
	ExifGpsTagGPSDestBearingRef    uint16 = 0x17
	ExifGpsTagGPSDestBearing       uint16 = 0x18
	ExifGpsTagGPSDestDistanceRef   uint16 = 0x19
	ExifGpsTagGPSDestDistance      uint16 = 0x1A
	ExifGpsTagGPSProcessingMethod  uint16 = 0x1B
	ExifGpsTagGPSAreaInformation   uint16 = 0x1C
	ExifGpsTagGPSDateStamp         uint16 = 0x1D
	ExifGpsTagGPSDifferential      uint16 = 0x1E
	ExifGpsTagGPSHPositioningError uint16 = 0x1F

	ExifXpTagXPTitle    uint16 = 0x9c9b
	ExifXpTagXPComment  uint16 = 0x9c9c
	ExifXpTagXPAuthor   uint16 = 0x9c9d
	ExifXpTagXPKeywords uint16 = 0x9c9e
	ExifXpTagXPSubject  uint16 = 0x9c9f
)
View Source
const (
	IptcTagGroupEnvelope    = 0x0100
	IptcTagGroupApplication = 0x0200
)
View Source
const (
	IptcTagEnvelopeModelVersion              = IptcTagGroupEnvelope | 0x0000
	IptcTagEnvelopeDestination               = IptcTagGroupEnvelope | 0x0005
	IptcTagEnvelopeFileFormat                = IptcTagGroupEnvelope | 0x0014
	IptcTagEnvelopeFileVersion               = IptcTagGroupEnvelope | 0x0016
	IptcTagEnvelopeServiceID                 = IptcTagGroupEnvelope | 0x001e
	IptcTagEnvelopeEnvelopeNumber            = IptcTagGroupEnvelope | 0x0028
	IptcTagEnvelopeProductID                 = IptcTagGroupEnvelope | 0x0032
	IptcTagEnvelopeEnvelopePriority          = IptcTagGroupEnvelope | 0x003c
	IptcTagEnvelopeDateSent                  = IptcTagGroupEnvelope | 0x0046
	IptcTagEnvelopeTimeSent                  = IptcTagGroupEnvelope | 0x0050
	IptcTagEnvelopeCharacterSet              = IptcTagGroupEnvelope | 0x005a
	IptcTagEnvelopeUNO                       = IptcTagGroupEnvelope | 0x0064
	IptcTagEnvelopeARMId                     = IptcTagGroupEnvelope | 0x0078
	IptcTagEnvelopeARMVersion                = IptcTagGroupEnvelope | 0x007a
	IptcTagApplication2RecordVersion         = IptcTagGroupApplication | 0x0000
	IptcTagApplication2ObjectType            = IptcTagGroupApplication | 0x0003
	IptcTagApplication2ObjectAttribute       = IptcTagGroupApplication | 0x0004
	IptcTagApplication2ObjectName            = IptcTagGroupApplication | 0x0005
	IptcTagApplication2EditStatus            = IptcTagGroupApplication | 0x0007
	IptcTagApplication2EditorialUpdate       = IptcTagGroupApplication | 0x0008
	IptcTagApplication2Urgency               = IptcTagGroupApplication | 0x000a
	IptcTagApplication2Subject               = IptcTagGroupApplication | 0x000c
	IptcTagApplication2Category              = IptcTagGroupApplication | 0x000f
	IptcTagApplication2SuppCategory          = IptcTagGroupApplication | 0x0014
	IptcTagApplication2FixtureID             = IptcTagGroupApplication | 0x0016
	IptcTagApplication2Keywords              = IptcTagGroupApplication | 0x0019
	IptcTagApplication2LocationCode          = IptcTagGroupApplication | 0x001a
	IptcTagApplication2LocationName          = IptcTagGroupApplication | 0x001b
	IptcTagApplication2ReleaseDate           = IptcTagGroupApplication | 0x001e
	IptcTagApplication2ReleaseTime           = IptcTagGroupApplication | 0x0023
	IptcTagApplication2ExpirationDate        = IptcTagGroupApplication | 0x0025
	IptcTagApplication2ExpirationTime        = IptcTagGroupApplication | 0x0026
	IptcTagApplication2SpecialInstructions   = IptcTagGroupApplication | 0x0028
	IptcTagApplication2ActionAdvised         = IptcTagGroupApplication | 0x002a
	IptcTagApplication2ReferenceService      = IptcTagGroupApplication | 0x002d
	IptcTagApplication2ReferenceDate         = IptcTagGroupApplication | 0x002f
	IptcTagApplication2ReferenceNumber       = IptcTagGroupApplication | 0x0032
	IptcTagApplication2DateCreated           = IptcTagGroupApplication | 0x0037
	IptcTagApplication2TimeCreated           = IptcTagGroupApplication | 0x003c
	IptcTagApplication2DigitizationDate      = IptcTagGroupApplication | 0x003e
	IptcTagApplication2DigitizationTime      = IptcTagGroupApplication | 0x003f
	IptcTagApplication2Program               = IptcTagGroupApplication | 0x0041
	IptcTagApplication2ProgramVersion        = IptcTagGroupApplication | 0x0046
	IptcTagApplication2ObjectCycle           = IptcTagGroupApplication | 0x004b
	IptcTagApplication2Byline                = IptcTagGroupApplication | 0x0050
	IptcTagApplication2BylineTitle           = IptcTagGroupApplication | 0x0055
	IptcTagApplication2City                  = IptcTagGroupApplication | 0x005a
	IptcTagApplication2SubLocation           = IptcTagGroupApplication | 0x005c
	IptcTagApplication2ProvinceState         = IptcTagGroupApplication | 0x005f
	IptcTagApplication2CountryCode           = IptcTagGroupApplication | 0x0064
	IptcTagApplication2CountryName           = IptcTagGroupApplication | 0x0065
	IptcTagApplication2TransmissionReference = IptcTagGroupApplication | 0x0067
	IptcTagApplication2Headline              = IptcTagGroupApplication | 0x0069
	IptcTagApplication2Credit                = IptcTagGroupApplication | 0x006e
	IptcTagApplication2Source                = IptcTagGroupApplication | 0x0073
	IptcTagApplication2Copyright             = IptcTagGroupApplication | 0x0074
	IptcTagApplication2Contact               = IptcTagGroupApplication | 0x0076
	IptcTagApplication2Caption               = IptcTagGroupApplication | 0x0078
	IptcTagApplication2Writer                = IptcTagGroupApplication | 0x007a
	IptcTagApplication2RasterizedCaption     = IptcTagGroupApplication | 0x007d
	IptcTagApplication2ImageType             = IptcTagGroupApplication | 0x0082
	IptcTagApplication2ImageOrientation      = IptcTagGroupApplication | 0x0083
	IptcTagApplication2Language              = IptcTagGroupApplication | 0x0087
	IptcTagApplication2AudioType             = IptcTagGroupApplication | 0x0096
	IptcTagApplication2AudioRate             = IptcTagGroupApplication | 0x0097
	IptcTagApplication2AudioResolution       = IptcTagGroupApplication | 0x0098
	IptcTagApplication2AudioDuration         = IptcTagGroupApplication | 0x0099
	IptcTagApplication2AudioOutcue           = IptcTagGroupApplication | 0x009a
	IptcTagApplication2PreviewFormat         = IptcTagGroupApplication | 0x00c8
	IptcTagApplication2PreviewVersion        = IptcTagGroupApplication | 0x00c9
	IptcTagApplication2Preview               = IptcTagGroupApplication | 0x00ca
)
View Source
const (
	IptcFieldTypeShort     uint16 = iota
	IptcFieldTypeString    uint16 = iota
	IptcFieldTypeDate      uint16 = iota
	IptcFieldTypeTime      uint16 = iota
	IptcFieldTypeUndefined uint16 = iota
)
View Source
const (
	Yes bool = true
	No  bool = false
)
View Source
const (
	SOF0ImageBPP    = 0x0004
	SOF0ImageHeight = 0x0005
	SOF0ImageWidth  = 0x0007
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APP

type APP interface {
	Name() string
	Marker() uint16
	Length() uint16
	ID([]byte) []byte
	HasID([]byte) bool
	ReadValue(uint16) (interface{}, error)
}

APP represents an APP section of the image file

type BasicInfo

type BasicInfo struct {
	//Width    interface{}
	//Height   uint32
	//Title    string
	Description string
	Keywords    []string
}

BasicInfo contains the most basic information that could be asked for

func GetBasicInfo

func GetBasicInfo(img Image) (info BasicInfo)

GetBasicInfo gets the basic information from the meta-information of the image

type Image

type Image struct {
	// contains filtered or unexported fields
}

Image holds both 'Image Data' and 'AP'

func ReadJpeg

func ReadJpeg(fhnd *os.File) (image Image, err error)

ReadJpeg will read all sections from the image data

func (Image) ReadTagValue

func (i Image) ReadTagValue(appname string, tagID uint16) (value interface{}, err error)

type JpegReader

type JpegReader struct {
	// contains filtered or unexported fields
}

func (*JpegReader) Read

func (b *JpegReader) Read(p []byte) (n int, err error)

func (*JpegReader) ReadByte

func (b *JpegReader) ReadByte() byte

Jump to

Keyboard shortcuts

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