get_png_metadata#

class get_png_metadata(filename, output=False)[source]#

Read metadata from a PNG file. For use with images saved with cv.savefig(). Requires pillow, an optional dependency. Metadata retrieval for PDF and SVG is not currently supported.

Parameters:

filename (str) – the name of the file to load the data from

Example:

cv.Sim().run(do_plot=True)
cv.savefig('covasim.png')
cv.get_png_metadata('covasim.png')