From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 4C31F7F256 for ; Wed, 7 Nov 2012 15:04:52 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.80,730,1344204000"; d="scan'208";a="161688244" Received: from rhodamine.loria.fr ([152.81.2.177]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 07 Nov 2012 15:04:51 +0100 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1283) From: Samuel Hornus In-Reply-To: Date: Wed, 7 Nov 2012 15:04:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <317FD50D-3890-400B-BB10-7B1B5069366E@inria.fr> References: <3A52788A-5B74-490E-9678-5C5C1578C524@inria.fr> To: O Caml X-Mailer: Apple Mail (2.1283) Subject: Re: [Caml-list] camlimages problems on mac On Nov7, 2012, at 14:20 , Alan Schmitt wrote: > Samuel Hornus writes: >=20 >> Hello, >>=20 >> When installing camlimages 4.0.1 with MacPort (Mac OS X 10.7.5, Latest M= acPorts), >> the resulting camlimages has no support for JPEG, PNG, PPM, XPM, etc=85 >> which makes it sort of useless. > I just tried to configure it using godi, and this is what is supported > on my system: >=20 > External libraries: lablgtk2 bmp ppm png jpeg tiff freetype(2) ps >=20 > Most of my image libraries are installed through homebrew (I see for > instance "jpeg" or "libpng", I don't know where the ppm support comes > from). >=20 > To get support for gifs, I installed giflib (still through homebrew). >=20 > After doing this, camlimages seems to compile fine. The compilation goes without a hitch here as well (both using omake or macp= orts), but the support for most of the image file formats are automatically= disabled after examining the third-party' header files, so you get an OCam= l exception at runtime. There is a piece of code (from camlimages) that dum= ps what is actually supported (see below). Does your camlimages actually ha= s support for jpeg or png ? Thank you Alan for your answer, Sam let capabilities () =3D let open Format in let supported b =3D if b then "supported" else "not supported" in printf "*******************************************************@."; printf "Camlimages library capabilities currently available@."; printf "bmp\t: %s@." (supported Camlimages.lib_bmp); printf "ppm\t: %s@." (supported Camlimages.lib_ppm); printf "gif\t: %s@." (supported Camlimages.lib_gif); printf "jpeg\t: %s@." (supported Camlimages.lib_jpeg); printf "tiff\t: %s@." (supported Camlimages.lib_tiff); printf "png\t: %s@." (supported Camlimages.lib_png); printf "xpm\t: %s@." (supported Camlimages.lib_xpm); printf "xv thumbnails\t: %s@." (supported Camlimages.lib_xvthumb); printf "postscript\t: %s@." (supported Camlimages.lib_ps); printf "freetype\t: %s@." (supported Camlimages.lib_freetype); printf "*******************************************************@.";; Mine shows: bmp : supported ppm : supported (* but crashes anyway: Fatal error: exception Images.Wrong_= file_type *) gif : not supported jpeg : not supported tiff : not supported png : not supported xpm : supported (* but crashes anyway: Fatal error: exception Images.Wrong_= file_type *) xv thumbnails : supported postscript : supported freetype : supported