From: Samuel Hornus <samuel.hornus@inria.fr>
To: O Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] camlimages problems on mac
Date: Wed, 7 Nov 2012 15:04:51 +0100 [thread overview]
Message-ID: <317FD50D-3890-400B-BB10-7B1B5069366E@inria.fr> (raw)
In-Reply-To: <m2390l35y2.fsf@top.irisa.fr>
On Nov7, 2012, at 14:20 , Alan Schmitt wrote:
> Samuel Hornus <samuel.hornus@inria.fr> writes:
>
>> Hello,
>>
>> When installing camlimages 4.0.1 with MacPort (Mac OS X 10.7.5, Latest MacPorts),
>> the resulting camlimages has no support for JPEG, PNG, PPM, XPM, etc…
>> which makes it sort of useless.
> I just tried to configure it using godi, and this is what is supported
> on my system:
>
> External libraries: lablgtk2 bmp ppm png jpeg tiff freetype(2) ps
>
> 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).
>
> To get support for gifs, I installed giflib (still through homebrew).
>
> After doing this, camlimages seems to compile fine.
The compilation goes without a hitch here as well (both using omake or macports), but the support for most of the image file formats are automatically disabled after examining the third-party' header files, so you get an OCaml exception at runtime. There is a piece of code (from camlimages) that dumps what is actually supported (see below). Does your camlimages actually has support for jpeg or png ?
Thank you Alan for your answer,
Sam
let capabilities () = let open Format in
let supported b = 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
next prev parent reply other threads:[~2012-11-07 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 12:52 Samuel Hornus
2012-11-07 13:20 ` Alan Schmitt
2012-11-07 14:04 ` Samuel Hornus [this message]
2012-11-07 14:22 ` AW: " Gerd Stolpmann
2012-11-07 14:30 ` Alan Schmitt
2012-11-07 14:43 ` Pierre-Etienne Meunier
2012-11-13 11:28 ` Samuel Hornus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=317FD50D-3890-400B-BB10-7B1B5069366E@inria.fr \
--to=samuel.hornus@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).