Grimage is a small library to read and save images in Caml Light.
It handles the following formats:
load_grimage filename
to load a bmp image
save_grimage filename bmp
to save a bmp image
draw_grimage grim x y
to draw a bmp image
loaded as a grimage value.
load_ppm filename
to load a ppm image as a
Caml pixmap (i.e. an array of R, G, B pixels).
save_ppm filename ppm
to save a ppm image (an
array of pixels).
draw_pixmap pixmap x y
to draw a ppm image
loaded as a pixmap value.
For more info about the library, read the interfaces of the modules and have a look to the test directory for working examples.