package imagelib

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

Install

Dune Dependency

Authors

Maintainers

Sources

imagelib-20210511.tbz
sha256=1cb94ea3731dc994c205940c9434543ce3f2470cdcb2e93a3e02ed793e80d480
sha512=29a8a483baad0aa565f8900871f684bd3a7a4a6c2f93c9a7b07864168d2b1fa4d62f5ec65150cfe1f3fff2de53c62610106ae097ba274929a4f4bf7256176c48

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.