package imagelib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=1cb94ea3731dc994c205940c9434543ce3f2470cdcb2e93a3e02ed793e80d480
sha512=29a8a483baad0aa565f8900871f684bd3a7a4a6c2f93c9a7b07864168d2b1fa4d62f5ec65150cfe1f3fff2de53c62610106ae097ba274929a4f4bf7256176c48
Description
The imagelib library implements image formats such as PNG, BMP, and PPM in OCaml, relying on only one external dependency: 'decompress'.
Unix-dependent functionality such as reading or writing to files in the
filesystem are packaged in the imagelib.unix
findlib module inside this
OPAM package; to use it you need to include imagelib.unix
specifically
in your project's dependencies, for instance (libraries imagelib.unix)
in your Dune file.
Supported image formats:
- PNG (full implementation of RFC 2083),
- PPM, PGM, PBM, ... (fully supported),
- BMP (read-only)
- JPG (only image size natively),
- GIF (only image size natively),
- There is an experimental native implementation available in the pure
ImageLib
module.
- There is an experimental native implementation available in the pure
- XCF (only image size natively),
- Utility functions for handling unimplemented formats are available in
the 'imagelib.unix' findlib package and handle conversion from unsupported
image formats like JPG, GIF, XCF by converting them to PNG using the
convert
commandline utility fromimagemagick
.
As imagelib only requires decompress
, it is suitable (excluding operations
requiring the imagemagick
convert
binary) for compilation to javascript
using js_of_ocaml
, or inclusion in MirageOS unikernels.
app/imagetool.ml
contains an example binary that acts as a command-line interface to many of the functions in the library. It will be installed as imagetool
or imagetool.exe
if you use opam to install the library, and otherwise it will be in _build/default/app/imagetool.exe
Published: 11 May 2021
Dependencies (5)
- stdlib-shims
-
decompress
>= "1.3.0"
-
dune
>= "2.3.0"
- base-unix
-
ocaml
>= "4.07.0" & < "5.0"
Dev Dependencies (1)
-
alcotest
with-test
Used by (2)
Conflicts
None