(***********************************************************************)
(*                                                                     *)
(*                           Objective Caml                            *)
(*                                                                     *)
(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
(*                                                                     *)
(*  Copyright 1999,2000,2001,2002,2001,2002                            *)
(*  Institut National de Recherche en Informatique et en Automatique.  *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)
open OImage

let load name opts =
  OImage.make (Ppm.load name opts)
;;

let save name opts image =
  match image#image_class with
  | ClassRgb24 | ClassIndex8 -> Ppm.save name opts image#image
  | _ -> raise Wrong_image_class
;;
