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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 1D0C07FC53 for ; Tue, 29 Sep 2015 17:12:03 +0200 (CEST) IronPort-PHdr: 9a23:g0WG5xY85BYUpGKlB1EkScD/LSx+4OfEezUN459isYplN5qZpcm7bnLW6fgltlLVR4KTs6sC0LqK9f2/Ejxdqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7z0psKYM1gArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZn9KoMTRLlcRGAtOmUxocnqrgXrTA2V53JaXH9AwTRSBA2Qwgt7UhbrsyCynO1gwmHOM9f7Qb0uWD/k5aB2UjfsgSQOPTc/tmfalpoj3+pgvBu9qkknkMbva4aPOa8mcw== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=frederic.bour@lakaban.net; spf=Pass smtp.mailfrom=frederic.bour@lakaban.net; spf=None smtp.helo=postmaster@mail.lakaban.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of frederic.bour@lakaban.net) identity=pra; client-ip=213.251.185.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="frederic.bour@lakaban.net"; x-sender="frederic.bour@lakaban.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of frederic.bour@lakaban.net designates 213.251.185.180 as permitted sender) identity=mailfrom; client-ip=213.251.185.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="frederic.bour@lakaban.net"; x-sender="frederic.bour@lakaban.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.lakaban.net) identity=helo; client-ip=213.251.185.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="frederic.bour@lakaban.net"; x-sender="postmaster@mail.lakaban.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0C0BQAMqgpW/7S5+9Veg3hpgyq6EYIpAQmFeYILEQEBAQEBAQEBgQmCHYIxHQEBOB4+Al+IRQm2HXGEZQEFj3saBo5eghuCOQwvEoExlXmFFod9ghWGbASFPUSMPhEmLIIEgX9viR8BAQE X-IPAS-Result: A0C0BQAMqgpW/7S5+9Veg3hpgyq6EYIpAQmFeYILEQEBAQEBAQEBgQmCHYIxHQEBOB4+Al+IRQm2HXGEZQEFj3saBo5eghuCOQwvEoExlXmFFod9ghWGbASFPUSMPhEmLIIEgX9viR8BAQE X-IronPort-AV: E=Sophos;i="5.17,608,1437429600"; d="scan'208";a="179997248" Received: from pepper.lakaban.net (HELO mail.lakaban.net) ([213.251.185.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 29 Sep 2015 17:12:02 +0200 Received: from [192.168.2.110] (p54905D3E.dip0.t-ipconnect.de [84.144.93.62]) (Authenticated sender: defre@ygg-drasil.fr) by mail.lakaban.net (Postfix) with ESMTPSA id D99804B60B9 for ; Tue, 29 Sep 2015 15:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lakaban.net; s=default; t=1443539468; bh=7E3Qwhb8Mp+NEvbsrGPwWjug8k7goNUie1zUKMQ/JRY=; h=Date:From:Subject:To:From; b=HygsVUzrxvT+0zQvuWAn2WRH2UWBJhLEmGDTgPqvpmBkAleAprY7eqMDkPXvDGwvD Y6EGEzX/TlpsWJCStbHxfClvyjm8LjjvXABFDKtnPHzYHgn+MzwPsOVNsBNbM49x2P hPW1M3xXQ98aPpmdUwtNI937qxZZKFfa0dl4f0XY= Date: Tue, 29 Sep 2015 17:10:49 +0200 From: =?iso-8859-1?b?RnLpZOlyaWM=?= Bour To: OCaml Message-Id: <1443539449.10824.0@mail.lakaban.net> X-Mailer: geary/0.10.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-jl1DjRPXezbmEZbSJOC/" Subject: [Caml-list] ANN: Stb_truetype, Stb_image, Stb_image_write 0.1 --=-jl1DjRPXezbmEZbSJOC/ Content-Type: text/plain; charset=utf-8; format=flowed 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 --=-jl1DjRPXezbmEZbSJOC/ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
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/ .
The= y are small, self-contained and highly portable: no dependencies, one C fil= e.
They have a well-defined scope and are released into the publi= c domain.

The OCaml bindings are licensed under CC= -0.

Stb_truetype is a truetype (*.ttf) font raster= izer.
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 writ= er.

These libraries are originally targeted at gam= e engines.
They offer decent performances while not being optimiz= ed to the extreme. In practice, I observed loading times slightly slower th= an 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, t= hey are easy to deploy and make almost no assumptions on the host system (c= ompared to e.g. CamlImages).
I have successfully used them in con= junction with Tgls, https://gi= thub.com/dbuenzli/tgls , but they can be used in any situation where bi= garrays and native C code are allowed.

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

They are all ava= ilable as Opam packages:

    opam instal= l stb_image stb_image_write stb_truetype

Webpages:=


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

Fred
= --=-jl1DjRPXezbmEZbSJOC/--