mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(preview): Don't log a warning on missing exif orientation metadata
libexif returns 0 for the orientation when orientation metadata isn't present. Treat this the same as 1, i.e. no orientation change.
This commit is contained in:
parent
10d0cae80c
commit
9da1e3bbdf
|
@ -45,6 +45,11 @@ namespace ExifTransform
|
|||
exif_data_free(exifData);
|
||||
|
||||
switch (orientation){
|
||||
case 0:
|
||||
// Exif spec defines 1-8 only, but when the orientation field isn't explcitly defined, we read 0 from
|
||||
// libexif. It seems like exif_data_get_entry should return null in that case rather than saying the entry
|
||||
// is present but with a value of zero.
|
||||
return Orientation::TopLeft;
|
||||
case 1:
|
||||
return Orientation::TopLeft;
|
||||
case 2:
|
||||
|
|
Loading…
Reference in New Issue
Block a user