package imagelib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=1cb94ea3731dc994c205940c9434543ce3f2470cdcb2e93a3e02ed793e80d480
sha512=29a8a483baad0aa565f8900871f684bd3a7a4a6c2f93c9a7b07864168d2b1fa4d62f5ec65150cfe1f3fff2de53c62610106ae097ba274929a4f4bf7256176c48
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.