PNM Image: use palettized images

If you have to do that i recommend using some thing like PIL and just creating your images in that it has a nice API and can do lots of things like working with indexed color images. Graphics cards them selfs cant draw indexed color images so they always will be converted.