Skip to content
Permalink
Browse files

Fix heic magic bytes

  • Loading branch information
DarthSim committed Feb 27, 2020
1 parent 1d1caeb commit 36ad0d31e26d35caf944b838a182b38702412339
Showing with 10 additions and 2 deletions.
  1. +1 −0 CHANGELOG.md
  2. +9 −2 imagemeta/heic.go
@@ -3,6 +3,7 @@
## [Unreleased]
### Fixed
- Fix loadind BMP stored in ICO.
- Fix ambiguous HEIC magic bytes (MP4 videos has been detected as HEIC).

## [2.10.0] - 2020-02-13
### Added
@@ -140,7 +140,7 @@ func heicReadBoxes(d *heicDimensionsData, r io.Reader) error {
return err
}
if !d.IsFilled() {
return errors.New("Dimensions data wan't found in meta box")
return errors.New("Dimensions data wasn't found in meta box")
}
return nil
case "hdlr":
@@ -184,5 +184,12 @@ func DecodeHeicMeta(r io.Reader) (Meta, error) {
}

func init() {
RegisterFormat("????ftyp", DecodeHeicMeta)
RegisterFormat("????ftypheic", DecodeHeicMeta)
RegisterFormat("????ftypheix", DecodeHeicMeta)
RegisterFormat("????ftyphevc", DecodeHeicMeta)
RegisterFormat("????ftypheim", DecodeHeicMeta)
RegisterFormat("????ftypheis", DecodeHeicMeta)
RegisterFormat("????ftyphevm", DecodeHeicMeta)
RegisterFormat("????ftyphevs", DecodeHeicMeta)
RegisterFormat("????ftypmif1", DecodeHeicMeta)
}

0 comments on commit 36ad0d3

Please sign in to comment.
You can’t perform that action at this time.