Documentation ¶
Index ¶
- Constants
- Variables
- func SetLogMsgLevel(level LogMsgLevel)
- type Error
- type ExifData
- type ExifDatum
- type ExifDatumIterator
- type Image
- func (i *Image) ExifStripKey(key string) error
- func (i *Image) GetBytes() []byte
- func (i *Image) GetExifData() *ExifData
- func (i *Image) GetIptcData() *IptcData
- func (i *Image) GetXmpData() *XmpData
- func (i *Image) ICCProfile() []byte
- func (i *Image) IptcStripKey(key string) error
- func (i *Image) PixelHeight() int64
- func (i *Image) PixelWidth() int64
- func (i *Image) ReadMetadata() error
- func (i *Image) SetExifString(key, value string) error
- func (i *Image) SetIptcShort(key, value string) error
- func (i *Image) SetIptcString(key, value string) error
- func (i *Image) SetMetadataShort(format, key, value string) error
- func (i *Image) SetMetadataString(format, key, value string) error
- func (i *Image) StripKey(f MetadataFormat, key string) error
- func (i *Image) XmpStripKey(key string) error
- type IptcData
- type IptcDatum
- type IptcDatumIterator
- type LogMsgLevel
- type MetadataFormat
- type MetadataProvider
- type XmpData
- type XmpDatum
Constants ¶
const ( LogMsgDebug LogMsgLevel = 0 LogMsgInfo = 1 LogMsgWarn = 2 LogMsgError = 3 LogMsgMute = 4 )
Variables ¶
var ErrMetadataKeyNotFound = errors.New("key not found")
Functions ¶
func SetLogMsgLevel ¶ added in v1.1.0
func SetLogMsgLevel(level LogMsgLevel)
SetLogMsgLevel Set the log level (outputs to stderr)
Types ¶
type ExifData ¶
type ExifData struct {
// contains filtered or unexported fields
}
func (*ExifData) Iterator ¶
func (d *ExifData) Iterator() *ExifDatumIterator
Iterator returns a new ExifDatumIterator to iterate over all Exif data.
type ExifDatumIterator ¶
type ExifDatumIterator struct {
// contains filtered or unexported fields
}
ExifDatumIterator wraps the respective C++ structure.
func (*ExifDatumIterator) HasNext ¶
func (i *ExifDatumIterator) HasNext() bool
HasNext returns true as long as the iterator has another datum to deliver.
func (*ExifDatumIterator) Next ¶
func (i *ExifDatumIterator) Next() *ExifDatum
Next returns the next ExifDatum of the iterator or nil if iterator has reached the end.
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func Open ¶
Open opens an image file from the filesystem and returns a pointer to the corresponding Image object, but does not read the Metadata. Start the parsing with a call to ReadMetadata()
func OpenBytes ¶
OpenBytes opens a byte slice with image data and returns a pointer to the corresponding Image object, but does not read the Metadata. Start the parsing with a call to ReadMetadata()
func (*Image) ExifStripKey ¶ added in v1.2.0
func (*Image) GetBytes ¶
Returns an image contents. If its metadata has been changed, the changes are reflected here.
func (*Image) GetExifData ¶
func (*Image) GetIptcData ¶
func (*Image) GetXmpData ¶
GetXmpData returns the XmpData of an Image.
func (*Image) ICCProfile ¶
ICCProfile returns the ICC profile or nil if the image doesn't has one.
func (*Image) IptcStripKey ¶ added in v1.2.0
func (*Image) PixelHeight ¶
PixelHeight returns the height of the image in pixels
func (*Image) PixelWidth ¶
PixelWidth returns the width of the image in pixels
func (*Image) ReadMetadata ¶
ReadMetadata reads the metadata of an Image
func (*Image) SetExifString ¶
func (*Image) SetIptcShort ¶ added in v1.0.1
func (*Image) SetIptcString ¶
func (*Image) SetMetadataShort ¶ added in v1.0.1
Sets an exif or iptc key with a given short value
func (*Image) SetMetadataString ¶
Sets an exif or iptc key with a given string value
func (*Image) StripKey ¶ added in v1.2.0
func (i *Image) StripKey(f MetadataFormat, key string) error
func (*Image) XmpStripKey ¶ added in v1.2.0
type IptcData ¶
type IptcData struct {
// contains filtered or unexported fields
}
func (*IptcData) Iterator ¶
func (d *IptcData) Iterator() *IptcDatumIterator
Iterator returns a new IptcDatumIterator to iterate over all IPTC data.
type IptcDatumIterator ¶
type IptcDatumIterator struct {
// contains filtered or unexported fields
}
IptcDatumIterator wraps the respective C++ structure.
func (*IptcDatumIterator) HasNext ¶
func (i *IptcDatumIterator) HasNext() bool
HasNext returns true as long as the iterator has another datum to deliver.
func (*IptcDatumIterator) Next ¶
func (i *IptcDatumIterator) Next() *IptcDatum
Next returns the next IptcDatum of the iterator or nil if iterator has reached the end.
type LogMsgLevel ¶ added in v1.1.0
type LogMsgLevel int
type MetadataFormat ¶ added in v1.2.0
type MetadataFormat int
const ( EXIF MetadataFormat = iota IPTC XMP )