Make HEIF files compatible with exif functionality

This commit is contained in:
Theresa Gresch 2019-07-04 18:35:14 +02:00
parent 23e0dde0e3
commit d145e9258a
2 changed files with 2 additions and 6 deletions

View file

@ -67,7 +67,7 @@ func (m *MediaFile) Exif() (result *Exif, err error) {
return m.exifData, nil
}
if !m.IsJpeg() && !m.IsRaw() {
if !m.IsJpeg() && !m.IsRaw() && !m.IsHEIF() {
return nil, errors.New(fmt.Sprintf("media file not compatible with exif: \"%s\"", m.Filename()))
}

View file

@ -59,11 +59,7 @@ func TestMediaFile_Exif_HEIF(t *testing.T) {
assert.IsType(t, &Exif{}, info)
assert.NotNil(t, err)
if err != nil {
assert.Contains(t, err.Error(), "media file not compatible with exif")
}
assert.Nil(t, err)
converter := NewConverter(conf)