GraphicsMagick: ReadHEIFImage(): Back-ports and compilation fixes.
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.11604.1682895457.1602.graphicsmagick-commit@lists.sourceforge.net> |
changeset 3179db7ab1fb in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=3179db7ab1fb summary: ReadHEIFImage(): Back-ports and compilation fixes. diffstat: ChangeLog | 16 ++++++++++++++++ coders/heif.c | 10 ++++++++-- doc/options.imdoc | 5 +++++ www/Changelog.html | 19 +++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diffs (101 lines): diff -r 3316416208d1 -r 3179db7ab1fb ChangeLog --- a/ChangeLog Sun Apr 30 17:18:35 2023 -0500 +++ b/ChangeLog Sun Apr 30 17:57:12 2023 -0500 @@ -1,3 +1,19 @@ +2023-04-30 Bob Friesenhahn <[email protected]> + + * coders/heif.c (ReadHEIFImage): Change comments to C99 + syntax. Try to fix compilation with version of libheif prior to + version 1.9. Change to use -define heif:ignore-transformations to + use same naming strategy as the other existing defines. + +2023-04-30 Tobias Mark <[email protected]> + + * coders/heif.c (ReadHEIFImage): HEIF: Fix reading images with + rotation/transformation; added option to ignore them. SourceForge + patch #70 "Fix Heif image with transformations". + + * doc/options.imdoc: Add documentation for -define + heic:ignore-transformations. + 2023-04-30 Fojtik Jaroslav <[email protected]> * coders/topol.c: Deallocate 'pixels' correctly, fix MEZ reindexing. diff -r 3316416208d1 -r 3179db7ab1fb coders/heif.c --- a/coders/heif.c Sun Apr 30 17:18:35 2023 -0500 +++ b/coders/heif.c Sun Apr 30 17:57:12 2023 -0500 @@ -491,7 +491,7 @@ ThrowHEIFReaderException(CorruptImageError, UnexpectedEndOfFile, image); ignore_transformations = MagickFalse; - if ((value=AccessDefinition(image_info,"heic","ignore_transformations"))) + if ((value=AccessDefinition(image_info,"heif","ignore-transformations"))) if (LocaleCompare(value,"TRUE") == 0) ignore_transformations = MagickTrue; @@ -619,7 +619,12 @@ ThrowHEIFReaderException(CorruptImageError, AnErrorHasOccurredReadingFromFile, image); } - /* Update with final values, see preliminary note above */ + /* + Update with final values, see preliminary note above + + These functions are apparently added in libheif 1.9 + */ +#if LIBHEIF_NUMERIC_VERSION >= 0x01090000 image->columns=heif_image_get_primary_width(heif_image); image->rows=heif_image_get_primary_height(heif_image); @@ -630,6 +635,7 @@ CloseBlob(image); return image; } +#endif image->depth=heif_image_get_bits_per_pixel(heif_image, heif_channel_interleaved); /* The requested channel is interleaved there depth is a sum of all channels diff -r 3316416208d1 -r 3179db7ab1fb doc/options.imdoc --- a/doc/options.imdoc Sun Apr 30 17:18:35 2023 -0500 +++ b/doc/options.imdoc Sun Apr 30 17:57:12 2023 -0500 @@ -1176,6 +1176,11 @@ in the writer. </dd> +<dt>heif:ignore-transformations={true|false}</dt> +<dd> +Return HEIF (e.g. HEIC/AVIF) image without any transformations (e.g. rotation) applied. +</dd> + <dt>gradient:direction={South|North|West|East|NorthWest|NorthEast|SouthWest|SouthEast}</dt> <dd>By default, the gradient coder produces a gradient from top to bottom ("South"). Since GraphicsMagick 1.3.35, the gradient direction diff -r 3316416208d1 -r 3179db7ab1fb www/Changelog.html --- a/www/Changelog.html Sun Apr 30 17:18:35 2023 -0500 +++ b/www/Changelog.html Sun Apr 30 17:57:12 2023 -0500 @@ -37,6 +37,25 @@ </div> <div class="document"> +<p>2023-04-30 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 (ReadHEIFImage): Change comments to C99 +syntax. Try to fix compilation with version of libheif prior to +version 1.9. Change to use -define heif:ignore-transformations to +use same naming strategy as the other existing defines.</p></li> +</ul> +</blockquote> +<p>2023-04-30 Tobias Mark <<a class="reference external" href="mailto:tbsmark86%40gmail.com">tbsmark86<span>@</span>gmail<span>.</span>com</a>></p> +<blockquote> +<ul class="simple"> +<li><p>coders/heif.c (ReadHEIFImage): HEIF: Fix reading images with +rotation/transformation; added option to ignore them. SourceForge +patch #70 "Fix Heif image with transformations".</p></li> +<li><p>doc/options.imdoc: Add documentation for -define +heic:ignore-transformations.</p></li> +</ul> +</blockquote> <p>2023-04-30 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40yandex.com">JaFojtik<span>@</span>yandex<span>.</span>com</a>></p> <blockquote> <ul class="simple">