Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Graphics frustration
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matt Gushee <mgushee@h...>
Subject: [Caml-list] Graphics frustration
Hello, all--

I have been working on an application which will generate on-the-fly
graphics for the Web, but I have become very frustrated by the
limitations of the available graphics libraries for OCaml. If anyone
reading this thinks there are solutions I have overlooked, I would be
happy to discuss details. Right now, though, my purpose is to find out
whether others share my concerns, and how much interest there is in
developing better graphics libraries.

What I would like to see is a single library with at least the
following capabilities:

  * drawing primitives: line, rectangle, ellipse and/or arc, perhaps
    bezier curves

  * rendering text with arbitrary Type 1 and/or TrueType fonts

  * antialiasing

  * basic image manipulation functions such as transformations,
    contrast adjustment, cropping, etc.

  * saving to common bitmap formats such as JPEG and PNG

  * cross-platform

taking the various graphics packages together, all these capabilities
exist, but as far as I can tell there is no single package that combines
them all. So, in developing my application, I started out with
OCamlPlot, but discovered that it

  - doesn't do antialiasing

  - uses only 2 or 3 built-in fonts for PNG output

  - has a rather rigid and idiosyncratic API

  - doesn't run on Windows

Then I decided to try MLgraph + Camlimages, which is an improvement, but
still falls short: MLgraph is excellent for drawing, but saves only to
PostScript--and I find the final result, converted to PNG with
CamlImages, rather unsatisfactory (the main problem is that antialiasing
doesn't work very well, which may actually be a Ghostscript issue).
Performance with this combination is also markedly poorer than with

Then there's OCamlGD, which seems quite promising. When complete, it
will probably satisfy all my requirements; but there hasn't been a
relesase in quite a while.

So that's a quick summary of my situation. Do others agree with me that
this is a significant problem? Are there any good solutions in the

I am happy, by the way, to put some effort into developing something
better. My contribution would be limited, though (I'm not a C
programmer, for example, so I wouldn't be able to create a wrapper for
an existing C library.).


Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through           its fields;   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                            --Lao Tzu (Peter Merel, trans.)

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: