PHP VPS

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
JMTT
Posts: 1
Joined: 2013-02-20T12:32:00-07:00
Authentication code: 6789

PHP VPS

Post by JMTT »

This question is about optimizing performance when processing animated gifs.

I am using and amazon High-CPU Medium EC2 server instance to process images. It has the following specs:
1.7 GiB of memory
5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each)

The gif I am processing is about 1MB in size.

What I am doing is adding an image to each frame. I am using coalesceImages to access the individual frames.
Throughout the process I create about 4 image objects at various points. This process currently takes up about 50% + of CPU,
and On a lesser machine, it will take 100%. I have tried limiting threads to 1 but it doesn't seem to make much, if any, of a difference.
Are there ImageMagick settings that I can tweak that might speed this up a bit? Or is the amount of CPU being used about right to do this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PHP VPS

Post by fmw42 »

speed can be traded for quality by using -treedepth with -colors when creating/saving gif image

see
http://www.imagemagick.org/script/comma ... php#colors
http://www.imagemagick.org/script/comma ... #treedepth
Post Reply