Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abrander/apexif
Go package for reading EXIF data from various image formats
https://github.com/abrander/apexif
exif exif-reader go golang
Last synced: about 1 month ago
JSON representation
Go package for reading EXIF data from various image formats
- Host: GitHub
- URL: https://github.com/abrander/apexif
- Owner: abrander
- License: mit
- Created: 2023-05-18T06:26:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-26T12:08:34.000Z (11 months ago)
- Last Synced: 2024-01-26T14:57:23.479Z (11 months ago)
- Topics: exif, exif-reader, go, golang
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# apexif
[![PkgGoDev](https://pkg.go.dev/badge/github.com/abrander/apexif)](https://pkg.go.dev/github.com/abrander/apexif)
This is a simple Go package for reading EXIF data from various file
formats. It's build for speed and simplicity. The package does not
have any dependencies.All data must be loaded in memory (or mmapped) before calling `Identify()`.
### Supported file formats
- [x] CR2
- [x] CRW
- [x] HEIC
- [x] JPEG
- [x] PNG
- [x] TIFF
- [x] WebP#### Supported container types
- [x] ISOBMFF (MPEG-4 Part 12)
- [x] RIFF
- [x] TIFFThese are not file formats and only interesting for developers of
this package.### Usage example
```go
package mainimport (
"fmt"
"os""github.com/abrander/apexif"
)func main() {
data, err := os.ReadFile("example.jpeg")
if err != nil {
panic(err)
}f, err := apexif.Identify(data)
if err != nil {
panic(err)
}fmt.Printf("Yay. We got a %s image.\n", f.Name())
e, err := f.Exif()
if err != nil {
panic(err)
}make, _ := e.Make()
fmt.Printf("The image was captured by a %s camera.\n", make)
}
```### License
This package is licensed under the MIT license. See LICENSE for details.