package camlimages

  1. Overview
  2. Docs
Image processing library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

camlimages-5.0.5.tar.gz
md5=84929b30257aa8e493dc84303768f400
sha512=b3774d2287e4a97082f0289766f5a79d3e75454a194d2d6400cee9cf926f7676d8eba4cb27221a98314461b7a81b4386b253f1d706a94447423394be89d2ed49

doc/src/camlimages.jpeg/oJpeg.ml.html

Source file oJpeg.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(***********************************************************************)
(*                                                                     *)
(*                           Objective Caml                            *)
(*                                                                     *)
(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
(*                                                                     *)
(*  Copyright 1999-2004,                                               *)
(*  Institut National de Recherche en Informatique et en Automatique.  *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: oJpeg.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *)

let load name opts = OImages.make (Jpeg.load name opts)

let load_thumbnail name opts geom_spec =
  let w, h, img = Jpeg.load_thumbnail name opts geom_spec in
  w, h, OImages.make img

let save name opts image =
  let rgb24 = OImages.rgb24 image in
  Jpeg.save name opts rgb24#image

let save_as_cmyk name opts trans image =
  let rgb24 = OImages.rgb24 image in
  Jpeg.save_as_cmyk name opts trans rgb24#image