pythonpython-imageio

How to save photos to disk taken with imageio


This is a simple program that takes a photo from webcam. I want to know how to save the file to disk. Any help would be appreciated.

import imageio as iio
import matplotlib.pyplot as plt

camera = iio.get_reader("<video0>")
screenshot = camera.get_data(0)
camera.close()

plt.imshow(im)

Solution

  • You can use the mimsave function to save images. For example:

    imageio.mimsave(filename, images)