PHP magickwand Library generated GIF format Picture save or output is very slow, does anyone know why? How to Handle

Source: Internet
Author: User
PHP magickwand Library generated GIF format Picture save or output is very slow, anyone know why?
Because the GD library does not write the GIF motion diagram function, all uses Magickwand to realize, is really very good, but I use the xdebug discovery to produce the GIF graph (the bigger the more obvious) whether is saves to the file or the direct output is very slow, when I use the jpg/png format to have this question, Here is the code description:

$newMw = Newmagickwand ();
Magicksetformat ($newMw, ' gif ');
Magickreadimage ($newMw, ' old.gif ');
Magickwriteimages ($newMw, ' filename.gif ');
?>
The above code execution takes 700MS!!!


$newMw = Newmagickwand ();
Magicksetformat ($newMw, ' jpg ');
Magickreadimage ($newMw, ' old.gif ');
Magickwriteimages ($newMw, ' filename.gif ');
?>
And the above code as long as 30MS!!!


------Solution--------------------
I don't know, it's your server problem.
------Solution--------------------
Magicksetformat ($newMw, ' gif '); This sentence is best written in Magicksetformat ($newMw, ' GIF ');

I'm here to test all pretty slow jpg 0.3 seconds gif for 0.5 seconds
(PHP4.4.8 ImageMagick 6.3.4)
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.