Added option to specify encoded image filename