Documentation
¶
Overview ¶
Package imx provides fast, dependency-free extraction of image metadata.
It supports EXIF, IPTC, XMP, and ICC metadata from JPEG, PNG, GIF, WebP, TIFF-based formats (including CR2/DNG), HEIC, plus ID3/FLAC/MP4 audio/video tags.
Version: 1.0.0
Basic usage:
meta, err := imx.MetadataFromFile("photo.jpg")
if err != nil {
log.Fatal(err)
}
// Access tags by ID
if tag, ok := meta.Tag("EXIF:IFD0:Make"); ok {
fmt.Printf("Camera: %v\n", tag.Value)
}
// Or use type-safe getters
make, err := meta.GetString("EXIF:IFD0:Make")
if err == nil {
fmt.Printf("Camera: %s\n", make)
}
For more control, use the Extractor type:
extractor := imx.New(
imx.WithHTTPTimeout(60 * time.Second), // Set HTTP timeout for URL fetching
)
meta, err := extractor.MetadataFromFile("photo.jpg")
Iterate over tags:
// All tags across all directories
meta.Each(func(dir imx.Directory, tag imx.Tag) bool {
fmt.Printf("[%s] %s = %v\n", dir.Name, tag.Name, tag.Value)
return true // continue
})
// Tags in a specific directory
meta.EachInDirectory("IFD0", func(tag imx.Tag) bool {
fmt.Printf("%s = %v\n", tag.Name, tag.Value)
return true
})
Error handling:
meta, err := imx.MetadataFromFile("photo.jpg")
if err != nil {
if errors.Is(err, imx.ErrUnknownFormat) {
fmt.Println("Unsupported file format")
} else {
log.Fatal(err)
}
}
// Check for parsing errors
if len(meta.Errors()) > 0 {
fmt.Printf("Parsing errors: %v\n", meta.Errors())
// meta still contains successfully parsed data
}
Multiple input sources:
// From file with safety limit
meta, err := imx.MetadataFromFile("photo.jpg", imx.WithMaxBytes(50<<20))
// From byte slice
data, _ := os.ReadFile("photo.jpg")
meta, err = imx.MetadataFromBytes(data)
// From io.Reader (buffered on-demand)
file, _ := os.Open("photo.jpg")
meta, err = imx.MetadataFromReader(file)
// From URL
meta, err = imx.MetadataFromURL("https://example.com/photo.jpg")
Index ¶
- Constants
- Variables
- type Directory
- type Extractor
- func (e *Extractor) MetadataFromBytes(data []byte, opts ...Option) (*Metadata, error)
- func (e *Extractor) MetadataFromFile(path string, opts ...Option) (*Metadata, error)
- func (e *Extractor) MetadataFromReader(r io.Reader, opts ...Option) (*Metadata, error)
- func (e *Extractor) MetadataFromURL(url string, opts ...Option) (*Metadata, error)
- type Metadata
- func (m *Metadata) AllTags() []Tag
- func (m *Metadata) Directories() []Directory
- func (m *Metadata) Directory(name string) (Directory, bool)
- func (m *Metadata) DirectoryNames() []string
- func (m *Metadata) Each(fn func(Directory, Tag) bool)
- func (m *Metadata) EachInDirectory(name string, fn func(Tag) bool)
- func (m *Metadata) EachTag(fn func(Tag) bool)
- func (m *Metadata) Errors() []error
- func (m *Metadata) GetAll(ids ...TagID) map[TagID]any
- func (m *Metadata) GetBytes(id TagID) ([]byte, error)
- func (m *Metadata) GetFloat(id TagID) (float64, error)
- func (m *Metadata) GetInt(id TagID) (int64, error)
- func (m *Metadata) GetString(id TagID) (string, error)
- func (m *Metadata) MarshalJSON() ([]byte, error)
- func (m *Metadata) Tag(id TagID) (Tag, bool)
- func (m *Metadata) TagCount() int
- type Option
- type Tag
- type TagID
Constants ¶
const Version = "1.0.0"
Version is the semantic version of the imx package
Variables ¶
var ErrMaxBytesExceeded = errors.New("imx: max bytes exceeded")
ErrMaxBytesExceeded is returned when reading beyond the configured MaxBytes limit.
var ErrUnknownFormat = errors.New("imx: unknown format")
ErrUnknownFormat is returned when the file format is not recognized
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor is a reusable metadata extractor, safe for concurrent use
func (*Extractor) MetadataFromBytes ¶
MetadataFromBytes extracts metadata from a byte slice
func (*Extractor) MetadataFromFile ¶
MetadataFromFile extracts metadata from a file path
func (*Extractor) MetadataFromReader ¶
MetadataFromReader extracts metadata from an io.Reader using a smart buffering adapter. This adapter implements io.ReaderAt by buffering data as it's read, avoiding the need to load the entire stream into memory upfront.
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata is the top-level container for all parsed metadata. Fields are unexported to prevent external mutation; use accessor methods instead.
func MetadataFromBytes ¶
MetadataFromBytes extracts metadata from a byte slice using the default extractor.
The opts parameter accepts functional options to customize extraction behavior. Currently available options:
- WithHTTPTimeout: Has no effect for byte operations (only applies to MetadataFromURL)
The opts parameter is provided for API consistency and forward compatibility with future configuration options.
func MetadataFromFile ¶
MetadataFromFile extracts metadata from a file path using the default extractor.
The opts parameter accepts functional options to customize extraction behavior. Currently available options:
- WithHTTPTimeout: Has no effect for file operations (only applies to MetadataFromURL)
The opts parameter is provided for API consistency and forward compatibility with future configuration options.
func MetadataFromReader ¶
MetadataFromReader extracts metadata from an io.Reader using the default extractor. This buffers data on-demand using a smart adapter that implements io.ReaderAt.
The opts parameter accepts functional options to customize extraction behavior. Currently available options:
- WithHTTPTimeout: Has no effect for reader operations (only applies to MetadataFromURL)
The opts parameter is provided for API consistency and forward compatibility with future configuration options.
func MetadataFromURL ¶
MetadataFromURL extracts metadata from an HTTP/HTTPS URL using the default extractor.
The opts parameter accepts functional options to customize extraction behavior. Available options:
- WithHTTPTimeout: Sets the HTTP request timeout (default: 30 seconds)
Example:
meta, err := imx.MetadataFromURL("https://example.com/photo.jpg",
imx.WithHTTPTimeout(60 * time.Second))
func (*Metadata) AllTags ¶
AllTags returns a flat slice of all tags across all directories. The order matches the iteration order (directory order, then tag order within each directory).
func (*Metadata) Directories ¶
Directories returns a slice of all parsed metadata directories. The returned slice is a copy to prevent external modification.
func (*Metadata) DirectoryNames ¶
DirectoryNames returns a list of all directory names present in the metadata.
func (*Metadata) Each ¶
Each iterates over all tags, calling fn for each tag. If fn returns false, iteration stops.
func (*Metadata) EachInDirectory ¶
EachInDirectory iterates over tags in the given directory. If fn returns false, iteration stops.
func (*Metadata) EachTag ¶
EachTag iterates over all tags across all directories. If fn returns false, iteration stops.
func (*Metadata) Errors ¶
Errors returns a slice of all errors encountered during parsing. The returned slice is a copy to prevent external modification.
func (*Metadata) GetBytes ¶
GetBytes returns the tag value as a byte slice. Returns an error if the tag doesn't exist or is not a byte slice or string.
func (*Metadata) GetFloat ¶
GetFloat returns the tag value as a float64. Returns an error if the tag doesn't exist or cannot be converted to float64.
func (*Metadata) GetInt ¶
GetInt returns the tag value as an int64. Returns an error if the tag doesn't exist or cannot be converted to int64.
func (*Metadata) GetString ¶
GetString returns the tag value as a string.
Conversion rules:
- string: returned as-is
- []byte: converted to string
- fmt.Stringer: calls String() method
- all other types: converted using fmt.Sprintf("%v", value)
The fallback conversion allows numeric types (int, float, etc.) commonly found in metadata to be displayed as strings. For type-safe numeric conversions, use GetInt or GetFloat instead.
Returns an error only if the tag doesn't exist.
func (*Metadata) MarshalJSON ¶
MarshalJSON implements json.Marshaler for Metadata. The JSON structure is:
{
"directories": [...],
"errors": [...]
}
type Option ¶
type Option func(*config)
Option is a functional option for configuring an Extractor
func WithBufferSize ¶
WithBufferSize sets the streaming read buffer size used for reader/URL inputs. A value of 0 falls back to the default buffer size.
func WithHTTPTimeout ¶
WithHTTPTimeout sets the HTTP request timeout for URL fetching. The timeout applies only to MetadataFromURL operations.
Panics if d is negative. A timeout of 0 means no timeout (unlimited).
func WithMaxBytes ¶
WithMaxBytes sets an upper bound on the total bytes that can be read from any source (file, reader, or URL). A value of 0 means no limit.
type TagID ¶
Re-export parser types as the public API types
const ( TagMake TagID = "EXIF:Make" TagModel TagID = "EXIF:Model" TagSoftware TagID = "EXIF:Software" TagOrientation TagID = "EXIF:Orientation" TagSerialNumber TagID = "EXIF:SerialNumber" TagOwnerName TagID = "EXIF:OwnerName" )
Camera and Device Tags
const ( TagLensMake TagID = "EXIF:LensMake" TagLensModel TagID = "EXIF:LensModel" TagLensSerialNumber TagID = "EXIF:LensSerialNumber" TagLensInfo TagID = "EXIF:LensInfo" )
Lens Tags
const ( TagImageDescription TagID = "EXIF:ImageDescription" TagImageTitle TagID = "EXIF:ImageTitle" TagArtist TagID = "EXIF:Artist" TagPhotographer TagID = "EXIF:Photographer" TagCopyright TagID = "EXIF:Copyright" TagUserComment TagID = "EXIF:UserComment" )
Image Description Tags
const ( TagDateTimeOriginal TagID = "EXIF:DateTimeOriginal" TagCreateDate TagID = "EXIF:CreateDate" TagModifyDate TagID = "EXIF:ModifyDate" TagOffsetTime TagID = "EXIF:OffsetTime" TagOffsetTimeOriginal TagID = "EXIF:OffsetTimeOriginal" TagSubSecTime TagID = "EXIF:SubSecTime" TagSubSecTimeOriginal TagID = "EXIF:SubSecTimeOriginal" TagSubSecTimeDigitized TagID = "EXIF:SubSecTimeDigitized" )
Date and Time Tags
const ( TagImageWidth TagID = "EXIF:ImageWidth" TagImageHeight TagID = "EXIF:ImageHeight" TagExifImageWidth TagID = "EXIF:ExifImageWidth" TagExifImageHeight TagID = "EXIF:ExifImageHeight" )
Image Dimensions Tags
const ( TagExposureTime TagID = "EXIF:ExposureTime" TagShutterSpeedValue TagID = "EXIF:ShutterSpeedValue" TagFNumber TagID = "EXIF:FNumber" TagApertureValue TagID = "EXIF:ApertureValue" TagExposureProgram TagID = "EXIF:ExposureProgram" TagExposureMode TagID = "EXIF:ExposureMode" TagExposureCompensation TagID = "EXIF:ExposureCompensation" TagBrightnessValue TagID = "EXIF:BrightnessValue" )
Exposure Tags
const ( TagISO TagID = "EXIF:ISO" TagISOSpeed TagID = "EXIF:ISOSpeed" TagSensitivityType TagID = "EXIF:SensitivityType" TagStandardOutputSensitivity TagID = "EXIF:StandardOutputSensitivity" TagRecommendedExposureIndex TagID = "EXIF:RecommendedExposureIndex" )
ISO Tags
const ( TagFocalLength TagID = "EXIF:FocalLength" TagFocalLengthIn35mmFormat TagID = "EXIF:FocalLengthIn35mmFormat" TagMaxApertureValue TagID = "EXIF:MaxApertureValue" TagSubjectDistance TagID = "EXIF:SubjectDistance" TagSubjectDistanceRange TagID = "EXIF:SubjectDistanceRange" )
Focus and Lens Settings Tags
const ( TagMeteringMode TagID = "EXIF:MeteringMode" TagLightSource TagID = "EXIF:LightSource" TagWhiteBalance TagID = "EXIF:WhiteBalance" )
Metering and Lighting Tags
const ( TagColorSpace TagID = "EXIF:ColorSpace" TagContrast TagID = "EXIF:Contrast" TagSaturation TagID = "EXIF:Saturation" TagSharpness TagID = "EXIF:Sharpness" TagDigitalZoomRatio TagID = "EXIF:DigitalZoomRatio" )
Image Quality Tags
Scene Tags
const ( TagGPSVersionID TagID = "EXIF:GPSVersionID" TagGPSLatitudeRef TagID = "EXIF:GPSLatitudeRef" TagGPSLatitude TagID = "EXIF:GPSLatitude" TagGPSLongitudeRef TagID = "EXIF:GPSLongitudeRef" TagGPSLongitude TagID = "EXIF:GPSLongitude" TagGPSAltitudeRef TagID = "EXIF:GPSAltitudeRef" TagGPSAltitude TagID = "EXIF:GPSAltitude" TagGPSTimeStamp TagID = "EXIF:GPSTimeStamp" TagGPSDateStamp TagID = "EXIF:GPSDateStamp" TagGPSSatellites TagID = "EXIF:GPSSatellites" TagGPSStatus TagID = "EXIF:GPSStatus" TagGPSMeasureMode TagID = "EXIF:GPSMeasureMode" TagGPSDOP TagID = "EXIF:GPSDOP" TagGPSSpeed TagID = "EXIF:GPSSpeed" TagGPSSpeedRef TagID = "EXIF:GPSSpeedRef" TagGPSTrack TagID = "EXIF:GPSTrack" TagGPSTrackRef TagID = "EXIF:GPSTrackRef" TagGPSImgDirection TagID = "EXIF:GPSImgDirection" TagGPSImgDirectionRef TagID = "EXIF:GPSImgDirectionRef" TagGPSMapDatum TagID = "EXIF:GPSMapDatum" TagGPSDestLatitude TagID = "EXIF:GPSDestLatitude" TagGPSDestLatitudeRef TagID = "EXIF:GPSDestLatitudeRef" TagGPSDestLongitude TagID = "EXIF:GPSDestLongitude" TagGPSDestLongitudeRef TagID = "EXIF:GPSDestLongitudeRef" TagGPSDestBearing TagID = "EXIF:GPSDestBearing" TagGPSDestBearingRef TagID = "EXIF:GPSDestBearingRef" TagGPSDestDistance TagID = "EXIF:GPSDestDistance" TagGPSDestDistanceRef TagID = "EXIF:GPSDestDistanceRef" TagGPSProcessingMethod TagID = "EXIF:GPSProcessingMethod" TagGPSAreaInformation TagID = "EXIF:GPSAreaInformation" TagGPSDifferential TagID = "EXIF:GPSDifferential" TagGPSHPositioningError TagID = "EXIF:GPSHPositioningError" )
GPS Tags
const ( TagExifVersion TagID = "EXIF:ExifVersion" TagFlashpixVersion TagID = "EXIF:FlashpixVersion" )
Version Tags
const ( TagCompression TagID = "EXIF:Compression" TagPhotometricInterpretation TagID = "EXIF:PhotometricInterpretation" TagXResolution TagID = "EXIF:XResolution" TagYResolution TagID = "EXIF:YResolution" TagResolutionUnit TagID = "EXIF:ResolutionUnit" TagYCbCrPositioning TagID = "EXIF:YCbCrPositioning" TagRating TagID = "EXIF:Rating" TagRatingPercent TagID = "EXIF:RatingPercent" )
Other Common Tags
const ( TagIPTCObjectName TagID = "IPTC:ObjectName" // Title/shorthand reference TagIPTCUrgency TagID = "IPTC:Urgency" // 1=most urgent, 8=least TagIPTCCategory TagID = "IPTC:Category" // Subject category code TagIPTCSupplementalCategories TagID = "IPTC:SupplementalCategories" // Additional categories TagIPTCKeywords TagID = "IPTC:Keywords" // Keywords for indexing TagIPTCFixtureIdentifier TagID = "IPTC:FixtureIdentifier" // Identifies recurring events TagIPTCEditStatus TagID = "IPTC:EditStatus" // Status of object TagIPTCSpecialInstructions TagID = "IPTC:SpecialInstructions" // Special instructions TagIPTCSubjectReference TagID = "IPTC:SubjectReference" // Structured subject reference )
IPTC Core Identification Tags
const ( TagIPTCDateCreated TagID = "IPTC:DateCreated" // Intellectual content created TagIPTCTimeCreated TagID = "IPTC:TimeCreated" // Time content created TagIPTCDigitalCreationDate TagID = "IPTC:DigitalCreationDate" // Digital file created TagIPTCDigitalCreationTime TagID = "IPTC:DigitalCreationTime" // Digital file time TagIPTCReleaseDate TagID = "IPTC:ReleaseDate" // Earliest release date TagIPTCReleaseTime TagID = "IPTC:ReleaseTime" // Earliest release time TagIPTCExpirationDate TagID = "IPTC:ExpirationDate" // Latest use date TagIPTCExpirationTime TagID = "IPTC:ExpirationTime" // Latest use time )
IPTC Date/Time Tags
const ( TagIPTCByline TagID = "IPTC:Byline" // Creator/author name TagIPTCBylineTitle TagID = "IPTC:BylineTitle" // Creator's title/position TagIPTCCredit TagID = "IPTC:Credit" // Provider credit line TagIPTCSource TagID = "IPTC:Source" // Original owner/creator TagIPTCCopyrightNotice TagID = "IPTC:CopyrightNotice" // Copyright notice TagIPTCContact TagID = "IPTC:Contact" // Contact information TagIPTCWriterEditor TagID = "IPTC:Writer-Editor" // Caption writer name )
IPTC Creator/Author Tags
const ( TagIPTCCity TagID = "IPTC:City" // City of origin TagIPTCSublocation TagID = "IPTC:Sublocation" // Location within city TagIPTCProvinceState TagID = "IPTC:Province-State" // Province/State of origin TagIPTCCountryCode TagID = "IPTC:Country-PrimaryLocationCode" // ISO 3166 country code TagIPTCCountryName TagID = "IPTC:Country-PrimaryLocationName" // Full country name TagIPTCContentLocationCode TagID = "IPTC:ContentLocationCode" // Content location code TagIPTCContentLocationName TagID = "IPTC:ContentLocationName" // Content location name )
IPTC Location Tags
const ( TagIPTCHeadline TagID = "IPTC:Headline" // Publishable headline TagIPTCCaptionAbstract TagID = "IPTC:Caption-Abstract" // Description/caption TagIPTCOriginatingProgram TagID = "IPTC:OriginatingProgram" // Program that created file TagIPTCProgramVersion TagID = "IPTC:ProgramVersion" // Version of program TagIPTCOriginalTransmissionReference TagID = "IPTC:OriginalTransmissionReference" // Original reference/job ID )
IPTC Description Tags
const ( TagXMPTitle TagID = "XMP-dc:title" // Title of the work TagXMPCreator TagID = "XMP-dc:creator" // Creator/author TagXMPDescription TagID = "XMP-dc:description" // Description/caption TagXMPSubject TagID = "XMP-dc:subject" // Keywords/subjects TagXMPRights TagID = "XMP-dc:rights" // Copyright/rights info TagXMPDate TagID = "XMP-dc:date" // Date TagXMPFormat TagID = "XMP-dc:format" // MIME type TagXMPIdentifier TagID = "XMP-dc:identifier" // Unique identifier TagXMPLanguage TagID = "XMP-dc:language" // Language TagXMPPublisher TagID = "XMP-dc:publisher" // Publisher TagXMPRelation TagID = "XMP-dc:relation" // Related resources TagXMPSource TagID = "XMP-dc:source" // Source TagXMPType TagID = "XMP-dc:type" // Type/genre )
XMP Dublin Core (dc) Tags
const ( TagXMPCreateDate TagID = "XMP-xmp:CreateDate" // Date created TagXMPModifyDate TagID = "XMP-xmp:ModifyDate" // Date modified TagXMPMetadataDate TagID = "XMP-xmp:MetadataDate" // Metadata last modified TagXMPCreatorTool TagID = "XMP-xmp:CreatorTool" // Application that created file TagXMPRating TagID = "XMP-xmp:Rating" // User rating (0-5) TagXMPLabel TagID = "XMP-xmp:Label" // Color label TagXMPBaseURL TagID = "XMP-xmp:BaseURL" // Base URL for relative URLs )
XMP Basic (xmp) Tags
const ( TagXMPCertificate TagID = "XMP-xmpRights:Certificate" // Rights certificate TagXMPMarked TagID = "XMP-xmpRights:Marked" // Copyright marked TagXMPOwner TagID = "XMP-xmpRights:Owner" // Rights owner TagXMPUsageTerms TagID = "XMP-xmpRights:UsageTerms" // Usage terms TagXMPWebStatement TagID = "XMP-xmpRights:WebStatement" // Web rights statement )
XMP Rights (xmpRights) Tags
const ( TagXMPPhotoshopCity TagID = "XMP-photoshop:City" // City TagXMPPhotoshopState TagID = "XMP-photoshop:State" // State/Province TagXMPPhotoshopCountry TagID = "XMP-photoshop:Country" // Country TagXMPPhotoshopCredit TagID = "XMP-photoshop:Credit" // Credit line TagXMPPhotoshopSource TagID = "XMP-photoshop:Source" // Source TagXMPPhotoshopHeadline TagID = "XMP-photoshop:Headline" // Headline TagXMPPhotoshopInstructions TagID = "XMP-photoshop:Instructions" // Instructions TagXMPPhotoshopDateCreated TagID = "XMP-photoshop:DateCreated" // Date created TagXMPPhotoshopAuthorsPos TagID = "XMP-photoshop:AuthorsPosition" // Author's position TagXMPPhotoshopCaptionWriter TagID = "XMP-photoshop:CaptionWriter" // Caption writer TagXMPPhotoshopCategory TagID = "XMP-photoshop:Category" // Category TagXMPPhotoshopColorMode TagID = "XMP-photoshop:ColorMode" // Color mode TagXMPPhotoshopICCProfile TagID = "XMP-photoshop:ICCProfile" // ICC profile name )
XMP Photoshop Tags
const ( TagXMPTIFFMake TagID = "XMP-tiff:Make" // Camera make TagXMPTIFFModel TagID = "XMP-tiff:Model" // Camera model TagXMPTIFFOrientation TagID = "XMP-tiff:Orientation" // Image orientation TagXMPTIFFXResolution TagID = "XMP-tiff:XResolution" // X resolution TagXMPTIFFYResolution TagID = "XMP-tiff:YResolution" // Y resolution TagXMPTIFFImageWidth TagID = "XMP-tiff:ImageWidth" // Image width TagXMPTIFFImageLength TagID = "XMP-tiff:ImageLength" // Image height )
XMP TIFF Tags (via XMP)
const ( TagXMPExifDateTimeOriginal TagID = "XMP-exif:DateTimeOriginal" // Date/time taken TagXMPExifExposureTime TagID = "XMP-exif:ExposureTime" // Exposure time TagXMPExifFNumber TagID = "XMP-exif:FNumber" // Aperture TagXMPExifISOSpeedRatings TagID = "XMP-exif:ISOSpeedRatings" // ISO TagXMPExifFocalLength TagID = "XMP-exif:FocalLength" // Focal length TagXMPExifFlash TagID = "XMP-exif:Flash" // Flash info TagXMPExifGPSLatitude TagID = "XMP-exif:GPSLatitude" // GPS latitude TagXMPExifGPSLongitude TagID = "XMP-exif:GPSLongitude" // GPS longitude TagXMPExifGPSAltitude TagID = "XMP-exif:GPSAltitude" // GPS altitude )
XMP EXIF Tags (via XMP)
const ( TagICCProfileSize TagID = "ICC:ProfileSize" // Profile size in bytes TagICCPreferredCMM TagID = "ICC:PreferredCMM" // Preferred CMM TagICCVersion TagID = "ICC:Version" // Profile version TagICCProfileClass TagID = "ICC:ProfileClass" // Profile class TagICCColorSpace TagID = "ICC:ColorSpace" // Color space TagICCPCS TagID = "ICC:PCS" // Profile connection space TagICCCreateDate TagID = "ICC:CreateDate" // Profile creation date TagICCPlatform TagID = "ICC:Platform" // Primary platform TagICCRenderingIntent TagID = "ICC:RenderingIntent" // Rendering intent TagICCDeviceManufacturer TagID = "ICC:DeviceManufacturer" // Device manufacturer TagICCDeviceModel TagID = "ICC:DeviceModel" // Device model TagICCCreator TagID = "ICC:Creator" // Profile creator TagICCPCSIlluminant TagID = "ICC:PCSIlluminant" // PCS illuminant TagICCProfileFlags TagID = "ICC:ProfileFlags" // Profile flags TagICCDeviceAttributes TagID = "ICC:DeviceAttributes" // Device attributes TagICCProfileID TagID = "ICC:ProfileID" // Profile ID (MD5 hash) )
ICC Profile Header Tags (from icc.go addTag calls)
const ( TagICCProfileDescription TagID = "ICC:ProfileDescription" // Profile description TagICCProfileCopyright TagID = "ICC:ProfileCopyright" // Copyright notice TagICCMediaWhitePoint TagID = "ICC:MediaWhitePoint" // Media white point XYZ TagICCMediaBlackPoint TagID = "ICC:MediaBlackPoint" // Media black point XYZ TagICCChromaticAdaptation TagID = "ICC:ChromaticAdaptation" // Chromatic adaptation matrix )
ICC Parsed Tag Values (human-readable names from knownTags)
const ( TagICCRedMatrixColumn TagID = "ICC:RedMatrixColumn" // Red matrix column XYZ TagICCGreenMatrixColumn TagID = "ICC:GreenMatrixColumn" // Green matrix column XYZ TagICCBlueMatrixColumn TagID = "ICC:BlueMatrixColumn" // Blue matrix column XYZ )
ICC Color Matrix Tags
const ( TagICCRedTRC TagID = "ICC:RedToneReproductionCurve" // Red TRC TagICCGreenTRC TagID = "ICC:GreenToneReproductionCurve" // Green TRC TagICCBlueTRC TagID = "ICC:BlueToneReproductionCurve" // Blue TRC TagICCGrayTRC TagID = "ICC:GrayToneReproductionCurve" // Gray TRC )
ICC Tone Reproduction Curve Tags
const ( TagICCDeviceMfgDesc TagID = "ICC:DeviceManufacturerDescription" // Device mfg description TagICCDeviceModelDesc TagID = "ICC:DeviceModelDescription" // Device model description TagICCTechnology TagID = "ICC:Technology" // Device technology TagICCViewingConditionsDesc TagID = "ICC:ViewingConditionsDescription" // Viewing conditions TagICCLuminance TagID = "ICC:Luminance" // Luminance value TagICCMeasurement TagID = "ICC:Measurement" // Measurement info )
ICC Device Description Tags
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
imx
module
|
|
|
examples
|
|
|
basic
command
|
|
|
internal
|
|
|
bufpool
Package bufpool provides a buffer pool for reducing GC pressure from repeated small buffer allocations.
|
Package bufpool provides a buffer pool for reducing GC pressure from repeated small buffer allocations. |
|
parser/heic
Package heic implements a parser for HEIC/HEIF and AVIF image files.
|
Package heic implements a parser for HEIC/HEIF and AVIF image files. |
|
parser/tiff/makernote
Package makernote provides MakerNote parsing for camera manufacturer-specific metadata.
|
Package makernote provides MakerNote parsing for camera manufacturer-specific metadata. |
|
parser/tiff/makernote/canon
Package canon provides parsing for Canon MakerNote data.
|
Package canon provides parsing for Canon MakerNote data. |
|
parser/tiff/makernote/fujifilm
Package fujifilm implements Fujifilm MakerNote parsing.
|
Package fujifilm implements Fujifilm MakerNote parsing. |
|
parser/tiff/makernote/nikon
Package nikon implements Nikon MakerNote parsing.
|
Package nikon implements Nikon MakerNote parsing. |
|
parser/tiff/makernote/sony
Package sony implements Sony MakerNote parsing.
|
Package sony implements Sony MakerNote parsing. |