writing file for resizing animated gifs with imagemagick