exif: github.com/xiam/exif Index | Files

package exif

import "github.com/xiam/exif"

Package exif provides bindings for libexif.


Package Files

cgo_linux.go exif.go


var (
    ErrNoExifData      = errors.New(`No EXIF data found.`)
    ErrFoundExifInData = errors.New(`Found EXIF header. OK to call Parse.`)

Error messages.

type Data Uses

type Data struct {
    Tags map[string]string
    // contains filtered or unexported fields

Data stores the EXIF tags of a file.

func New Uses

func New() *Data

New creates and returns a new exif.Data object.

func Read Uses

func Read(file string) (*Data, error)

Read attempts to read EXIF data from a file.

func (*Data) Open Uses

func (d *Data) Open(file string) error

Open opens a file path and loads its EXIF data.

func (*Data) Parse Uses

func (d *Data) Parse() error

Parse finalizes the data loader and sets the tags

func (*Data) Write Uses

func (d *Data) Write(p []byte) (n int, err error)

Write writes bytes to the exif loader. Sends ErrFoundExifInData error when enough bytes have been sent.

Package exif imports 6 packages (graph) and is imported by 4 packages. Updated 2016-08-19. Refresh now. Tools for package owners.