package imagelib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b3c8ace02b10b36b6c60b3ce3ae0b9109d4a861916ec320c59cc1194f4cc86e3
sha512=2be7badb07a98565383d2ec6dc00599269e1127ff6467fd5d4730030dc7cff8c06027e6b54643fcd012ec3317d322e80b88456249c883c3e0bebc25b4beb0fca
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.