Discussion:
Requirements for WP_Image_Editor?
Luke Bryan
2014-01-04 05:35:19 UTC
Permalink
Greetings all,

I've been having problems with the
WP_Image_Editor<http://codex.wordpress.org/Class_Reference/WP_Image_Editor>recently
- downsizing a gif with semitransparency will turn transparency to
black, and png can do that occasionally as well.

After digging into it I found that the WP_Image_Editor was using GD, not
Imagemagick - although Imagemagick was available, though it didn't seem to
have the PHP module set up, looking in phpinfo()... What are the
recommended ways to check what is keeping it from using Imagemagick?

I would file a bug on this, but am I correct in assuming this is one of the
somewhat well-known bugs in GD, rather than Wordpress' use of it?

Best regards,
Luke
Marko Heijnen
2014-01-04 11:13:40 UTC
Permalink
Hey Luke,

There is a ticket that tries to preserve the transparency for GIF but GD doesn’t work doesn’t work well so things can break. See https://core.trac.wordpress.org/ticket/13461.
My recommendation will always be that you need to use Imagick then. So there is a change that the ticket will be closed as good enough.

For Imagemagick you need the PHP module Imagick installed. If that isn’t installed then it will choose GD.
I guess that will be the case here. Otherwise the software is really outdated en you need to fix that.

Best,
Marko
Post by Luke Bryan
Greetings all,
I've been having problems with the
WP_Image_Editor<http://codex.wordpress.org/Class_Reference/WP_Image_Editor>recently
- downsizing a gif with semitransparency will turn transparency to
black, and png can do that occasionally as well.
After digging into it I found that the WP_Image_Editor was using GD, not
Imagemagick - although Imagemagick was available, though it didn't seem to
have the PHP module set up, looking in phpinfo()... What are the
recommended ways to check what is keeping it from using Imagemagick?
I would file a bug on this, but am I correct in assuming this is one of the
somewhat well-known bugs in GD, rather than Wordpress' use of it?
Best regards,
Luke
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Luke Bryan
2014-01-04 20:01:14 UTC
Permalink
Thanks Marco!

Is there any workaround or plugin to do this if the host doesn't have
Imagemagick PHP plugin, but you can call the Imagemagick executable?

Best regards,
Luke
Marko Heijnen
2014-01-04 20:21:37 UTC
Permalink
Next time do write my name correct ;)

We did had the idea to build an editor that calls Imagemagick directly but we never released an editor for that.
You could build one yourself that calls imagemagick directly with exec() calls. Easiest way is to ask your hosting to install it.

Best,
Marko
Post by Luke Bryan
Thanks Marco!
Is there any workaround or plugin to do this if the host doesn't have
Imagemagick PHP plugin, but you can call the Imagemagick executable?
Best regards,
Luke
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Continue reading on narkive:
Loading...