package imagelib

  1. Overview
  2. Docs
Library implementing parsing of image formats such as PNG, BMP, PPM

Install

Dune Dependency

Authors

Maintainers

Sources

imagelib-20221222.tbz
sha256=050d935711a5a5cead7a6b5e2bce13297a71d0cb47652ca42ff4e328df7118fd
sha512=28dae756945adb1c6a348d5c3e61840af7efb8df16c56bdf09ee4c69231774f169384f822359999ab315cc11634392dc4811ba932479aa1fdb78d25100b6733d

doc/imagelib.unix/ImageLib_unix/index.html

Module ImageLib_unixSource

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.

Sourceval writefile : string -> Image.image -> unit

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.

Sourceval size : string -> int * int

size fn reads the image from the file fn. It returns the pixel dimensions of the image as the tuple width, heigth.

Sourceval openfile : string -> Image.image

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.

OCaml

Innovation. Community. Security.