[Typo3-dev] Tip of the day: Test/use GraphicsMagick
Michael Stucki
michael at typo3.org
Sat Jun 4 18:11:10 CEST 2005
Hi Jochen,
> Just tried out GM on my main site. Everything seems to work, generated
> files are a bit smaller. With the image tests in the install tool I
> compated the speed to the statically linked IM 4.2.9 version. Results:
>
> Test 1: 13% faster
> Test 2: 32% slower
> Test 3: 16% slower
> Test 4: 25% slower
That's interesting. I made some other tests on the command-line and seem to
get slightly different results.:
Each file is converted 3 times.
Test products:
1 = gm (dynamically linked, Debian Sarge package)
2 = gm (statically linked)
3 = im 4.2.9 (statically linked)
Test 1: gif => png
1: 13ms 17ms 11ms, Filesize 19642
2: 8ms 7ms 7ms, Filesize 19642
3: 13ms 14ms 12ms, Filesize 19928
Test 2: png => png
1: 40ms 45ms 41ms, Filesize 49988
2: 33ms 33ms 35ms, Filesize 49988
3: 17ms 17ms 15ms, Filesize 19928
Test 3: gif => gif
1: 38ms 38ms 37ms, Filesize 21799
2: 37ms 39ms 37ms, Filesize 21799
3: 48ms 44ms 46ms, Filesize 21799
Test 4: jpg => gif
1: 99ms 102ms 100ms, Filesize 22032
2: 97ms 99ms 95ms, Filesize 22032
3: 109ms 111ms 113ms, Filesize 49988
Test 5: png => jpg
1: 13ms 14ms 15ms, Filesize 6832
2: 12ms 08ms 11ms, Filesize 6832
3: 12ms 14ms 10ms, Filesize 6848
Test 6: gif => jpg
1: 14ms 13ms 13ms, Filesize 6832
2: 08ms 09ms 08ms, Filesize 6832
3: 13ms 12ms 13ms, Filesize 6848
Test 7: pdf => gif
1: 515ms 513ms 514ms
2: 593ms 587ms 590ms
3: no success (Ghostscript incompatibility?)
Possible reason for the large GM files in Test 2:
"gm identify" tells me that GM stores the PNGs as "DirectClass" and IM uses
"PseudoClass". I have no idea what this means but it seems to be the reason
why the files are much smaller if created with IM.
After all I think that a dynamically linked binary should be preferred over
a statically linked one, however it's still clear that GM seems to be
faster than IM in all cases.
To be honest - the difference is so minimal that you'd need 100 pictures on
one page for recognizing any difference!
> So, the speed may not necessarily be the reason to change, maybe a more
> stable API?
Speed is definitely not a problem as long as your website doesn't cover
thousands of images. But as you see above, I'd still use GraphicsMagick
then ;-)
The main reason for NOT using ImageMagick 4.2.9 is that the product is more
than 3 years old and contains a lot of security holes and incompatibility
problems (see PDF testcase above).
The main reason for switching to GraphicsMagick is that IM 4.2.9 was the
only IM version that can compete with GM results...
The stable API is just the bonus then...
Regards, michael
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-dev
mailing list