exiftool

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package exiftool provides a pure Go wrapper around ExifTool via WebAssembly. It uses zeroperl (Perl compiled to WebAssembly) and wazero (pure Go wasm runtime) to provide ExifTool functionality without any external dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExifTool

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

ExifTool represents an ExifTool instance backed by WebAssembly.

func New

func New() (*ExifTool, error)

New creates a new ExifTool instance.

func NewWithContext

func NewWithContext(ctx context.Context) (*ExifTool, error)

NewWithContext creates a new ExifTool instance with the given context.

func (*ExifTool) Close

func (et *ExifTool) Close() error

Close releases all resources.

func (*ExifTool) ReadMetadata

func (et *ExifTool) ReadMetadata(filePath string) (map[string]any, error)

ReadMetadata reads metadata from an image file.

func (*ExifTool) SetTag

func (et *ExifTool) SetTag(srcPath string, dstPath string, tag string, value string) error

SetTag writes a single tag to an image file. If dstPath is empty, the source file is modified in place.

func (*ExifTool) Version

func (et *ExifTool) Version() (string, error)

Version returns the ExifTool version.

func (*ExifTool) WriteMetadata

func (et *ExifTool) WriteMetadata(srcPath string, dstPath string, tags map[string]any) error

WriteMetadata writes multiple tags to an image file. If dstPath is empty, the source file is modified in place.

Jump to

Keyboard shortcuts

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