fixed writePPM clamping issue