Skip to content

Commit

Permalink
Fixed exif orientation issue reported in #32.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Dec 26, 2018
1 parent af2373c commit d7dc3ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coders/heic.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ static Image *ReadHEICImage(const ImageInfo *image_info,
heif_image_release(heif_image);
heif_image_handle_release(image_handle);
heif_context_free(heif_context);
/*
There is a discrepancy between EXIF data and the actual orientation of
image pixels. ReadImage processes "exif:Orientation" expecting pixels to be
oriented accordingly. However, in HEIF the pixels are NOT rotated.
*/
SetImageProperty(image, "exif:Orientation", "1", exception);
return(GetFirstImageInList(image));
}
#endif
Expand Down

0 comments on commit d7dc3ea

Please sign in to comment.