initial import
[dosrtxon] / libs / imago / README.rst
1 libimago
2 ========
3
4 Overview
5 --------
6 Imago is a simple C library for reading and writing images in many different
7 image file formats.
8
9 Download
10 --------
11 Latest release: http://nuclear.mutantstargoat.com/sw/libimago/files/libimago-2.0.tar.gz
12
13 Grab the source code from github: https://github.com/jtsiomb/libimago
14
15 web site: http://nuclear.mutantstargoat.com/sw/libimago
16
17 License
18 -------
19
20 Copyright (C) 2011-2015 John Tsiombikas <nuclear@member.fsf.org>
21
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.
26
27 Usage example
28 -------------
29
30 heck out the example program under ``test/``, and the *heavily*
31 commented ``imago2.h`` header file, to find out how to use libimago.
32
33 The simplest way to load image data in RGBA 32bit is:
34
35 .. code:: c
36
37  int width, height;
38  unsigned char *pixels = img_load_pixels("foo.png", &width, &height, IMG_FMT_RGBA32);
39  img_free_pixels(pixels);
40
41 There's also an optional interface for loading an image and creating an OpenGL
42 texture out of it in a single call:
43
44 .. code:: c
45
46  unsigned int texture = img_gltexture_load("foo.png");
47
48 .. _COPYING: http://www.gnu.org/licenses/gpl
49 .. _COPYING.LESSER: http://www.gnu.org/licenses/lgpl