Hi,
I am building a system to convert many small images into various sizes and formats, however I have being seeing very poor performance when converting a GIF image as opposed to a PNG image while using:
identify -version
Version: ImageMagick 6.6.0-10 2010-04-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:
The Source Image is a small gif:
identify source.gif
source.gif GIF 100x46 100x46+0+0 8-bit PseudoClass 128c 1.94KB 0.000u 0:00.000
However I notice big differences when resizing to gif as opposed to png:
time convert -resize 50x50 source.gif output.gif
real 0m0.478s
user 0m0.266s
sys 0m0.160s
However when converting to png the execution time is much less:
time convert -resize 50x50 source.gif output.png
real 0m0.142s
user 0m0.075s
sys 0m0.050s
In addition to the execution time, the memory usage for gif is around 4x that of png.
I have testing on a separate Solaris10 machine and got identical results. however in a test on a Red Hat Advance v3 using imageMagick ImageMagick 5.5.6 the execution times were <1ms for the same image.
Based on the ImageMagick debugging the execution time appears to be in the following:
]2010-05-21T13:46:29+01:00 0:00.120 0.110u 6.6.0 Policy convert[18124]: policy.c/IsRightsAuthorized/485/Policy Domain: Path; rights=Write; pattern="output.gif" ...
2010-05-21T13:46:30+01:00 0:00.410 0.410u 6.6.0 Resource convert[18124]: resource.c/AcquireMagickResource/262/Resource Area: 11.5KB/11.5KB/8.5899GB
Has anyone seen this behavior on Solaris 10 before? Or on version 6.6?
I'm currently trying to get an older IM installation to work out if whether its related to Solaris or the IM version..
Any suggestions would be appreciated!
Thanks
Fergus
Poor GIF performance on Solaris 10
Re: Poor GIF performance on Solaris 10
Use -sample instead of -resize. The -resize option introduces new colors and ImageMagick must color reduce the image to the GIF requirements of 256 unique colors. Color reduction is expensive in time and memory resources.
Re: Poor GIF performance on Solaris 10
If only all answers were as simple as that 
Thanks a million for the quick response
time convert -sample 50x50 source.gif output.png
real 0m0.133s
user 0m0.067s
sys 0m0.049s

Thanks a million for the quick response
time convert -sample 50x50 source.gif output.png
real 0m0.133s
user 0m0.067s
sys 0m0.049s