GNU General Public License v3.0

项目介绍

barasher/go-exiftool 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 GNU General Public License v3.0 许可证,目前获得 299 个 Star、47 次 Fork。

仓库全名
barasher/go-exiftool
开源许可证
GNU General Public License v3.0
Star 数
299
Fork 数
47
未关闭 Issue
6

README 摘要

go-exiftool go-exiftool is a golang library that wraps ExifTool. ExifTool's purpose is to extract and update as much metadata as possible (EXIF, IPTC, XMP, GPS, ...) from a lots of differents file types (Office documents, pictures, movies, PDF, ...). go-exiftool uses ExifTool's stayopen feature to optimize performance. Requirements go-exiftool needs ExifTool to be installed. On Debian : sudo apt-get install exiftool…

完整内容见 GitHub 原始 README 或本页 。

常见问题

go-exiftool 用什么语言开发?

主要使用 Go 编写,采用 GNU General Public License v3.0 许可证,目前有 299 个 Star。

go-exiftool 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 go-exiftool 的源码?

可以直接克隆仓库:git clone https://github.com/barasher/go-exiftool.git,默认分支为 master;安装与运行步骤见仓库 README。

go-exiftool 最近还在维护吗?

仓库最近一次更新为 2025年8月4日,当前有 6 个未关闭 Issue;Star 数为 299,可作为社区活跃度的参考。

关于

Golang wrapper for Exiftool : extract as much metadata as possible (EXIF, ...) from files (pictures, pdf, office documents, ...)

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
399
价值分
193
活跃状态
活跃

语言占比

Go

Release

README

go-exiftool

Mentioned in Awesome Go Build Status go report card GoDoc codecov

go-exiftool is a golang library that wraps ExifTool.

ExifTool’s purpose is to extract and update as much metadata as possible (EXIF, IPTC, XMP, GPS, …) from a lots of differents file types (Office documents, pictures, movies, PDF, …).

go-exiftool uses ExifTool’s stay_open feature to optimize performance.

Requirements

go-exiftool needs ExifTool to be installed.

  • On Debian : sudo apt-get install exiftool

By default, go-exiftool binary will look for exiftool binary in $PATH, but another location can be specified (see SetExiftoolBinaryPath functional option).

Usage

Metadata extraction

et, err := exiftool.NewExiftool()
if err != nil {
    fmt.Printf("Error when intializing: %v\n", err)
    return
}
defer et.Close()

fileInfos := et.ExtractMetadata("testdata/20190404_131804.jpg")

for _, fileInfo := range fileInfos {
    if fileInfo.Err != nil {
        fmt.Printf("Error concerning %v: %v\n", fileInfo.File, fileInfo.Err)
        continue
    }

    for k, v := range fileInfo.Fields {
        fmt.Printf("[%v] %v\n", k, v)
    }
}

Output :

[FOV] 69.4 deg
[Orientation] Rotate 90 CW
[ColorSpace] sRGB
[Compression] JPEG (old-style)
[YCbCrSubSampling] YCbCr4:2:2 (2 1)
[Aperture] 1.7
[ColorComponents] 3
[SubSecCreateDate] 2019:04:04 13:18:03.0937
[FileSize] 26 kB
[FileAccessDate] 2019:05:17 22:44:26+02:00
[DateTimeOriginal] 2019:04:04 13:18:03
[CreateDate] 2019:04:04 13:18:03
(...)

Metadata update

See example function ExampleExiftool_Write in exiftool_sample_test.go

Changelog

评论

暂无评论