Generate PNG files with javascript