fixing bugs in preview, moved away from gifsicle to imagemagick