import matplotlib.pyplot as plt
I tried to imread a png photo among many other png photos in the same folder. Some photos read with no errors using the
It turns out someone must have manually changed the jpg files into the png extension before I got those files. These files open correctly in the picture viewer from the OS, hence look indistinguishable from the actual png files in the same batch, but they can't be processed by python scripts as png files -- because they are not. They don't have the alpha channel.