* image.c: Shrink memory needed for animation cache.
commitbb566ceafe3230d55923cb3043c3b231e4b9c0f9
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2013 20:47:27 +0000 (19 13:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2013 20:47:27 +0000 (19 13:47 -0700)
tree813650378c30dc75d9493acd1909a868512859bc
parent453f40228f8ff3d43665f5bf008b117bf9b9a7dc
* image.c: Shrink memory needed for animation cache.

(SIGNATURE_DIGESTSIZE): New constant.
(struct animation_cache): Make 'signature' a fixed size array of bytes.
(imagemagick_create_cache): Copy the signature.  This saves
several KB of memory that ImageMagick wastes per signature.
Don't bother updating the update_time, as the caller does that now.
(imagemagick_prune_animation_cache): Don't destroy the signature, as
it's a fixed size struct member now.
(imagemagick_get_animation_cache): Always destroy the signature,
as it's now imagemagick_create_cache's responsibility to copy it.
Avoid duplicate calls to strcmp and to imagemagick_create_cache,
and use memcmp rather than strcmp.
eassert that ImageMagick returns a signature of the specified length.
src/ChangeLog
src/image.c