- set i_format to pnm when reading pnm files and test for it