caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ANN: Stb_truetype, Stb_image, Stb_image_write 0.1
@ 2015-09-29 15:10 Frédéric Bour
  0 siblings, 0 replies; only message in thread
From: Frédéric Bour @ 2015-09-29 15:10 UTC (permalink / raw)
  To: OCaml

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-29 15:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 15:10 [Caml-list] ANN: Stb_truetype, Stb_image, Stb_image_write 0.1 Frédéric Bour

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).