caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Frédéric Bour" <frederic.bour@lakaban.net>
To: OCaml <caml-list@inria.fr>
Subject: [Caml-list] ANN: Stb_truetype, Stb_image, Stb_image_write 0.1
Date: Tue, 29 Sep 2015 17:10:49 +0200	[thread overview]
Message-ID: <1443539449.10824.0@mail.lakaban.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

I'm happy to announce the release of bindings to three _stb_ libraries 
for OCaml.

Stb libraries are made by Sean Barrett, http://nothings.org/ .
They are small, self-contained and highly portable: no dependencies, 
one C file.
They have a well-defined scope and are released into the public domain.

The OCaml bindings are licensed under CC-0.

Stb_truetype is a truetype (*.ttf) font rasterizer.
Stb_image is a JPEG, HDR, PNG, BMP, TGA, PSD, GIF, PIC, PNM image 
loader.
Stb_image_write is a PNG, BMP, TGA, HDR image writer.

These libraries are originally targeted at game engines.
They offer decent performances while not being optimized to the 
extreme. In practice, I observed loading times slightly slower than 
libjpeg-turbo and faster than libjpeg.
The writer doesn't try to compress optimally: you will be able to 
easily produce image files, but not the smallest possible.

Being self contained, they are easy to deploy and make almost no 
assumptions on the host system (compared to e.g. CamlImages).
I have successfully used them in conjunction with Tgls, 
https://github.com/dbuenzli/tgls , but they can be used in any 
situation where bigarrays and native C code are allowed.

However, be aware that they don't try to be robust against file 
corruption (loading might fail) and attacks / forging (libraries are 
obviously less audited than the common libpng, libjpeg, ...).

They are all available as Opam packages:

    opam install stb_image stb_image_write stb_truetype

Webpages:

    https://github.com/def-lkb/stb_image
    https://github.com/def-lkb/stb_image_write
    https://github.com/def-lkb/stb_truetype

Issues and pull requests welcomed, although this is a hobby project: I 
make no guarantee on my ability to respond.

Fred

[-- Attachment #2: Type: text/html, Size: 2422 bytes --]

                 reply	other threads:[~2015-09-29 15:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1443539449.10824.0@mail.lakaban.net \
    --to=frederic.bour@lakaban.net \
    --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).