(imagemagick_compute_animated_image): Clean up code slightly