HEIC / HEIF images support
+
Par Remi le mercredi 22 mai 2019, 09:20 - HowTo - Lien permanent
The HEIF image format (High Efficiency Image File Format) is now widely used, especially since iOS 11, so it make sense to be able to process these images.
1. libheif library
This library is an ISO/IEC 23008-12:2017 HEIF file format decoder and encoder.
Site : https://github.com/strukturag/libheif
It is available in the RPM Fusion repository which provides good quality package, following the same rules than Fedora, for software which are compatib le with official repository but are not distribuable byFedora / Red Hat (patent encumbered or non free algorithm).
2. ImageMagick
Site : https://imagemagick.org/
This tool supports this format, it is available in the optional package ImageMagick7-heic (or ImageMagick6-heic)
Example, using my repository and RPM Fusion :
$ sudo dnf install ImageMagick7 ImageMagick7-heic $ convert Example1.heic Example1.jpg $ eog Example1.jpg
3. libvips
Site : https://libvips.github.io/libvips/
This tools supports this format since version 8.8.0 released yesterday.
The vips-heif package adds this support (extension of vips).
Exemple :
$ sudo dnf install vips-tools vips-heif $ vips pngsave Example2.heic Example2.png
4. PHP with imagick extension
Site : https://pecl.php.net/package/imagick
Using the php-pecl-imagick-im7 and ImageMagick7-heif packages (or php-pecl-imagick-im6 and ImageMagick6-heic)
<?php $imagick = new Imagick(); $imagick->readImage('Example3.heic'); $imagick->writeImage('Example3.jpg');
5. PHP with vips extension
Using the php-pecl-vips and vips-heif packages
<?php $x = vips_image_new_from_file('Example4.heic'); vips_image_write_to_file($x['out'], 'Example4.jpg');
6. Conclusion
This widely used format is now perfectly supported, and easy to install for users of my repository.
Commentaires
libheif is on its way to Fedora ≥ 36 and EPEL 9, so RPM Fusion won't be needed anymore