package imagelib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=050d935711a5a5cead7a6b5e2bce13297a71d0cb47652ca42ff4e328df7118fd
sha512=28dae756945adb1c6a348d5c3e61840af7efb8df16c56bdf09ee4c69231774f169384f822359999ab315cc11634392dc4811ba932479aa1fdb78d25100b6733d
doc/imagelib.unix/ImageLib_unix/index.html
Module ImageLib_unix
Source
This module provides an easy-to-use interface for imagelib. In most cases, you'd want to use these functions rather than those in imagelib.
writefile fn img
writes the image img
to the file fn
. This function guesses the desired format using the extension. Raises Corrupted_image
if it encounters a problem. If the file extension is unknown to imagelib, this will first write out a png and then convert that to the desired format using the "convert" command from imagemagick.
size fn
reads the image from the file fn
. It returns the pixel dimensions of the image as the tuple width, heigth
.
openfile fn
reads the image from the file fn
. This function guesses the file format using the extension. Raises Corrupted_image
if it encounters a problem. If the file extension is unknown to imagelib, this will attempt to convert to png using imagemagick and then read in the png file.