Where is imageio finding 'chelsea.png'

Viewed 68

I'm working with imageio in Python and the sample code shows a variable "im" reading "chelsea.png" but that file doesn't exist on my machine anywhere.

import imageio as iio

im = iio.imread('imageio:chelsea.png')
print(im.shape)

The output is:

(200, 200, 3)

I'm assuming it's a 200x200 image. My questions are why does this code work?

With regard to the output of ImageIO, what does the 3 refer to?

1 Answers
  • Why does it work? Because the imageio: url prefix is magic and refers to a set of automatically downloaded images.

  • What does the 3 mean? The number of colour channels (R, G, and B.)

Related