X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=eradicate;a=blobdiff_plain;f=libs%2Fimago%2FREADME.rst;fp=libs%2Fimago%2FREADME.rst;h=dea7932cf315ca0f877b71bceba8d500a71dc914;hp=0000000000000000000000000000000000000000;hb=1ee7845621c04020321fa8dfb6dcbf3d8c6c9b51;hpb=02e7611eefd46380cbce65ace9da8399c27e78e8 diff --git a/libs/imago/README.rst b/libs/imago/README.rst new file mode 100644 index 0000000..dea7932 --- /dev/null +++ b/libs/imago/README.rst @@ -0,0 +1,49 @@ +libimago +======== + +Overview +-------- +Imago is a simple C library for reading and writing images in many different +image file formats. + +Download +-------- +Latest release: http://nuclear.mutantstargoat.com/sw/libimago/files/libimago-2.0.tar.gz + +Grab the source code from github: https://github.com/jtsiomb/libimago + +web site: http://nuclear.mutantstargoat.com/sw/libimago + +License +------- + +Copyright (C) 2011-2015 John Tsiombikas + +You may freely use, modify and/or redistribute libimago, under the terms of the +GNU Lesser General Public License (LGPL) version 3 (or at your option, any +later version published by the Free Software Foundation). See COPYING_ and +COPYING.LESSER_ for details. + +Usage example +------------- + +heck out the example program under ``test/``, and the *heavily* +commented ``imago2.h`` header file, to find out how to use libimago. + +The simplest way to load image data in RGBA 32bit is: + +.. code:: c + + int width, height; + unsigned char *pixels = img_load_pixels("foo.png", &width, &height, IMG_FMT_RGBA32); + img_free_pixels(pixels); + +There's also an optional interface for loading an image and creating an OpenGL +texture out of it in a single call: + +.. code:: c + + unsigned int texture = img_gltexture_load("foo.png"); + +.. _COPYING: http://www.gnu.org/licenses/gpl +.. _COPYING.LESSER: http://www.gnu.org/licenses/lgpl