> I find that both vil and vil1 can load a "ppm" file safely, but when
> I try to save a disk file image as "PPM","TGA","PMF", there occurs
It should be straightforward to save vil images as PPM.
Have a look at core/vil/examples/file_example3.cxx for a typical usage
of the vil_save() function.
Also, core/vil/examples/vil_image_copy.cxx effectively implements an
image file format converter: it reads in the image file given as its
first argument, and writes it out to the file name given in the second
By specifying the extension .ppm, the file format will be PPM.
If this still does not solve your problem, please show us your source
code fragment and possibly also an image file which causes the