fixed loop in Image::toPPM