Normally, pnmtoxwd produces a StaticGray dump file for pbm and pgm files. For ppm, it writes a PseudoColor dump file if there are up to 256 colors in the input, and a DirectColor dump file otherwise. The -directcolor flag can be used to force a DirectColor dump. And the -pseudodepth flag can be used to change the depth of PseudoColor dumps from the default of 8 bits / 256 colors.