GraphicsMagick: HEIF: Retrieve image orientation from EXIF and s...
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.4501.1687125231.9958.graphicsmagick-commit@lists.sourceforge.net> |
changeset 1145694abfc7 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=1145694abfc7 summary: HEIF: Retrieve image orientation from EXIF and store in image diffstat: ChangeLog | 5 +++++ coders/heif.c | 23 +++++++++++++++++++++++ www/Changelog.html | 7 +++++++ 3 files changed, 35 insertions(+), 0 deletions(-) diffs (69 lines): diff -r dd2a83c5d201 -r 1145694abfc7 ChangeLog --- a/ChangeLog Sun Jun 18 16:21:01 2023 -0500 +++ b/ChangeLog Sun Jun 18 16:53:36 2023 -0500 @@ -1,3 +1,8 @@ +2023-06-18 Bob Friesenhahn <[email protected]> + + * coders/heif.c (ReadMetadata): Retrieve image orientation from + EXIF and store in image. + 2023-06-18 Przemysław Sobala <[email protected]> * coders/png.c (ReadOnePNGImage): Retrieve image orientation from diff -r dd2a83c5d201 -r 1145694abfc7 coders/heif.c --- a/coders/heif.c Sun Jun 18 16:21:01 2023 -0500 +++ b/coders/heif.c Sun Jun 18 16:53:36 2023 -0500 @@ -21,6 +21,7 @@ */ #include "magick/studio.h" +#include "magick/attribute.h" #include "magick/blob.h" #include "magick/colormap.h" #include "magick/log.h" @@ -267,6 +268,28 @@ p[5]='\0'; SetImageProfile(image,"EXIF",profile,profile_size+exif_pad+4); + + /* + Retrieve image orientation from EXIF and store in + image. + */ + { + const ImageAttribute + *attribute; + + attribute = GetImageAttribute(image,"EXIF:Orientation"); + if ((attribute != (const ImageAttribute *) NULL) && + (attribute->value != (char *) NULL)) + { + int + orientation; + + orientation=MagickAtoI(attribute->value); + if ((orientation > UndefinedOrientation) && + (orientation <= LeftBottomOrientation)) + image->orientation=(OrientationType) orientation; + } + } } else { diff -r dd2a83c5d201 -r 1145694abfc7 www/Changelog.html --- a/www/Changelog.html Sun Jun 18 16:21:01 2023 -0500 +++ b/www/Changelog.html Sun Jun 18 16:53:36 2023 -0500 @@ -37,6 +37,13 @@ </div> <div class="document"> +<p>2023-06-18 Bob Friesenhahn <<a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p> +<blockquote> +<ul class="simple"> +<li><p>coders/heif.c (ReadMetadata): Retrieve image orientation from +EXIF and store in image.</p></li> +</ul> +</blockquote> <p>2023-06-18 Przemysław Sobala <<a class="reference external" href="mailto:przemyslaw.sobala%40gmail.com">przemyslaw<span>.</span>sobala<span>@</span>gmail<span>.</span>com</a>></p> <blockquote> <ul class="simple"> _______________________________________________ Graphicsmagick-commit mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-commit