fixed stuff to use imread instead of ppmread