please how you solve your problem to read .pgm images format I face the same problem. please answer me or send to me a messege on my e-mail seed19772003@gmail.com