Skip to content

Commit

Permalink
Remove the EXIF orientation tag when loading
Browse files Browse the repository at this point in the history
The HEIF specification states that the EXIF orientation tag is only
informational and should not be used to rotate the image.

See strukturag/libheif#227 (comment)
  • Loading branch information
0xC0000054 committed Aug 20, 2020
1 parent b50311f commit 46cbcb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/HeicFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ private static void AddMetadataToDocument(Document document, SafeHeifImageHandle
if (metadataEntries != null)
{
metadataEntries.Remove(MetadataKeys.Image.InterColorProfile);
// The HEIF specification states that the EXIF orientation tag is only
// informational and should not be used to rotate the image.
// See https://github.com/strukturag/libheif/issues/227#issuecomment-642165942
metadataEntries.Remove(MetadataKeys.Image.Orientation);

foreach (MetadataEntry item in metadataEntries)
{
Expand Down

0 comments on commit 46cbcb1

Please sign in to comment.