Error when loading a PPM image with extra bytes at the end
When loading a PPM image that (for unknown reason) has extra bytes after the pixels data, the following error occurs:
C++ exception caught: 'Something went wrong when reading the image file.'
Since some tools are able to correctly open that kind of files (ie. Preview on macOS), it might be good to replicate that behavior.
I guess the same thing occurs with a PGM image.