def save(filename, img): '''Salva un'immagine in formato PNG.''' pyimg = png.from_array(img, 'RGB') pyimg.save(filename)