Swap endianess of PNM files, fist version