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


Load/Save image files and other fancy features

CamlImages supports loading and saving of the following file formats:

  1. Bitmap, windows bitmap format (.bmp).
  2. Gif, graphics interchange format (.gif) (not recommended).
  3. Jpeg, joint photographic experts group (.jpeg or .jpg).
  4. Png, portable network graphics (.png).
  5. Tiff, tagged image file format (.tiff or .tif). (Color only.)
  6. X pixmaps (.xpm). (Loading only.)
  7. Encapsulated Postscript (using ghostscript)
  8. xv thumbnail files (see xvthumb directory).

For each image format, we provide a separate module. For instance, use the Tiff module to load and save images stored in the tiff file format.

If you do not want to specify the file format, you can use Image.load: this function automatically analyses the header of the image file at hand and loads the image into the memory, if the library supports this format.

CamlImages also provides an interface to the internal image format of O'Caml's Graphics library (this way you can draw your image files into the Graphics window).

You can also draw strings on images using the Freetype library, which is an external library to load and render TrueType fonts.


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