3dphotoshoot

view libs/imago/README.rst @ 17:aef7f51f6397

resource loading works
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 10 Jun 2015 06:56:27 +0300
parents
children
line source
1 libimago
2 ========
4 Overview
5 --------
6 Imago is a simple C library for reading and writing images in many different
7 image file formats.
9 Download
10 --------
11 Latest release: http://nuclear.mutantstargoat.com/sw/libimago/files/libimago-2.0.tar.gz
13 Grab the source code from github: https://github.com/jtsiomb/libimago
15 web site: http://nuclear.mutantstargoat.com/sw/libimago
17 License
18 -------
20 Copyright (C) 2011-2015 John Tsiombikas <nuclear@member.fsf.org>
22 You may freely use, modify and/or redistribute libimago, under the terms of the
23 GNU Lesser General Public License (LGPL) version 3 (or at your option, any
24 later version published by the Free Software Foundation). See COPYING_ and
25 COPYING.LESSER_ for details.
27 Usage example
28 -------------
30 heck out the example program under ``test/``, and the *heavily*
31 commented ``imago2.h`` header file, to find out how to use libimago.
33 The simplest way to load image data in RGBA 32bit is:
35 .. code:: c
37 int width, height;
38 unsigned char *pixels = img_load_pixels("foo.png", &width, &height, IMG_FMT_RGBA32);
39 img_free_pixels(pixels);
41 There's also an optional interface for loading an image and creating an OpenGL
42 texture out of it in a single call:
44 .. code:: c
46 unsigned int texture = img_gltexture_load("foo.png");
48 .. _COPYING: http://www.gnu.org/licenses/gpl
49 .. _COPYING.LESSER: http://www.gnu.org/licenses/lgpl