package camlimages

  1. Overview
  2. Docs
Image processing library

Install

Dune Dependency

Authors

Maintainers

Sources

camlimages-5.0.3.tar.bz2
sha256=b8203da78a9733488e40fafccfafb874c9ebafd8a5f1fa1d9a46ae2ac241e97a
md5=7dd5aa1944d01d2e908d4caa1e1bba78

doc/camlimages.core/Ppm/index.html

Module PpmSource

Loading and saving images in portable format: PPM, PGM, and PBM.

PPM: portable pixmap (pixels (picture element) map). This is represented as an RGB24.t image. PGM: portable greymap (grey scale map). This is represented as an Index8.t image. PBM: portable bitmap (binary digit map). This is represented as an Index8.t image.

Sourceval load : string -> Images.load_option list -> Images.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.

Sourceval save : string -> Images.save_option list -> Images.t -> unit

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

Sourceval save_bitmap : string -> Index8.t -> unit
Sourceval load_bitmap : string -> Index8.t

Same as above for portable bitmaps.

Sourceval load_ppm : string -> Rgb24.t
Sourceval save_ppm : string -> Rgb24.t -> unit

Specialized version for portable bitmaps.

OCaml

Innovation. Community. Security.