package imagelib

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

Install

Dune Dependency

Authors

Maintainers

Sources

imagelib-ocaml-imagelib_20200929.tbz
sha256=8af15b79cb0ad8809734531179a85f2f70d434f5f2b4ca9653bc37207b27d8f3
sha512=edce1f21ccc9fafa9242cf602bbd13fafd768fd9d614420cb462df2389a51063df6041bd4d1f84a46a5937a5ecf108c9925794d0ce453f1d5f8482ae6f3bfbb0

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.