Skip to content

Commit

Permalink
docs(README): add what is done
Browse files Browse the repository at this point in the history
* add what is done
  • Loading branch information
madeinfree committed Oct 29, 2021
1 parent 3d75a2d commit a20fde1
Showing 1 changed file with 14 additions and 38 deletions.
52 changes: 14 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,33 @@
# GoHeif - A go gettable decoder/converter for HEIC based on libde265

## Install
- `heic2jpg` to convert HEIC files to JPG preserving exif

``` go get github.com/jdeng/goheif/...```
- `heic2jpg` to convert HEIC files to JPG preserving exif

```bash
go get https://github.com/yosgo-opensource/goheif
```

- Tested
- Mac OS X (High Sierra)

- Mac OS X (High Sierra)
- Linux (Ubuntu 16.04 / GCC 5.4)
- Windows 7 64bit with TDM-GCC 32 (GCC 5.1) and golang 1.12 windows/386

- Code Sample

```
func main() {
flag.Parse()
...
fin, fout := flag.Arg(0), flag.Arg(1)
fi, err := os.Open(fin)
if err != nil {
log.Fatal(err)
}
defer fi.Close()
exif, err := goheif.ExtractExif(fi)
if err != nil {
log.Printf("Warning: no EXIF from %s: %v\n", fin, err)
}
img, err := goheif.DecodeImage(fi)
if err != nil {
log.Fatalf("Failed to parse %s: %v\n", fin, err)
}
fo, err := os.OpenFile(fout, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
log.Fatalf("Failed to create output file %s: %v\n", fout, err)
}
defer fo.Close()
w, _ := newWriterExif(fo, exif)
err = jpeg.Encode(w, img, nil)
if err != nil {
log.Fatalf("Failed to encode %s: %v\n", fout, err)
}
log.Printf("Convert %s to %s successfully\n", fin, fout)
goheif.Decode(file)
}
```

## What is done

- Fixed MAX_PREFIX warning

- Changes make to @bradfitz's (https://github.com/bradfitz) golang heif parser

- Some minor bugfixes
- A few new box parsers, noteably 'iref' and 'hvcC'

Expand All @@ -66,11 +42,11 @@ func main() {
- goheif.go, libde265 golang binding and the `heic2jpg` utility are in MIT license

## Credits

- heif parser by @bradfitz (https://github.com/go4org/go4/tree/master/media/heif)
- libde265 (https://github.com/strukturag/libde265)
- implementation learnt from libheif (https://github.com/strukturag/libheif)

## TODO
- Upstream the changes to heif?


- Upstream the changes to heif?

0 comments on commit a20fde1

Please sign in to comment.