-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support AVIF and HEIC in Imagick driver #759
Conversation
The failing tests do not seem to be related to this pull request. |
So what about this MR? Obviously, the solution is working, the problem is outside of this MR. Can you accept it? Doesn't work with heic without it |
@ausi Do you have a working environment for imagick + HEIC?
|
Using https://github.com/SoftCreatR/imei has worked for me. The complete Dockerfile I used looks like this: FROM php:7.4-cli
RUN apt-get update \
&& apt-get install -y wget libmagickwand-dev --no-install-recommends \
&& curl https://raw.githubusercontent.com/SoftCreatR/imei/main/imei.sh | bash
RUN pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install exif \
&& docker-php-ext-enable exif \
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-enable gd |
Do we need to add the |
Nope: it's detected automatically: see https://github.com/php-imagine/docker-builder/runs/3806674769?check_suite_focus=true#step:11:1144 I'll try to see of installing some additional libraries fixes the issue (the script you linked above is very helpful) |
I understood what's missing: libheif uses libde265 to read heic files, and libx265 to write them: I only installed libde265 |
When will the release be? And thanks for being active |
Once all these issues will be fixed: https://github.com/php-imagine/Imagine/milestone/1 (Help wamted, I ran out of spare time) |
This adds support for AVIF and HEIC in the Imagick driver as suggested in #742 and #755.
This is still a work in progress. Saving files already works fine, but reading images files currently fails because imagemagick (incorrectly?) reportsImagick::COLORSPACE_YCBCR
as the colorspace even though it is RGB. Just ignoring this doesn’t seem to work because the color profile doesn’t get interpreted correctly then (tested with an iPhone HEIC image).