Go to the first, previous, next, last section, table of contents.


The Ppm module

val load : string -> Image.load_option list -> Image.t;;

Ppm.load filename reads the image contained in the file filename, and returns an image. Assumes that the image is stored in PPM (Portable Pixmap) or PGM (Portable Greymap), or PBM (Portable Bitmap) formats. PPM format is 24 bits per pixel, and both ASCII and raw encoding are suppoorted. PGM format is 8 bits per pixel, and both ASCII and raw encoding are suppoorted. PBM is 1 bit per pixel, and both ASCII and raw encoding are suppoorted.

val save : string -> Image.save_option list -> Image.t -> unit;;

Ppm.save : filename img stores image img, on file filename. The image is saved as a portable pixmap, in raw encoding mode.

val save_bitmap : string -> Index8.t -> unit;;

val load_bitmap : string -> Index8.t;;

Same as above for portable bitmaps.

val load_ppm : string -> Rgb24.t;;

val save_ppm : string -> Rgb24.t -> unit;;

Specialized version for portable bitmaps.


Go to the first, previous, next, last section, table of contents.