lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Oct 26, 2010 at 6:26 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>On Tue, Oct 26, 2010 at 6:05 PM, Mike McGonagle <mjmogo@gmail.com> wrote:
>> I am looking for a simple way to generate and write a color image to
>> disk. I know that there is the GD library, the Cairo library, and
>> several other things that require the installation of various C level
>> libraries in order to use them. I don't want to have to install a
>> bunch of libraries that deal with reading and writing images,...
>
> The simplest format is the Netpbm family of formats:
>        http://en.wikipedia.org/wiki/Netpbm_format

FWIW, the start of a pure Lua PNG reader is in [1], if anyone wants to
finish it.  This is not simple like PBM though, and a writer would be
even more work.  The more normal thing to do would be to link to
libpng or os.execute netpbm.

[1] http://lua-users.org/wiki/PortableNetworkGraphicsParser