able to decode a gif file and output the representation to file 'output'