File: readpng.h

package info (click to toggle)
gtkatlantic 0.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,144 kB
  • ctags: 863
  • sloc: sh: 10,807; ansic: 7,915; xml: 188; makefile: 94
file content (43 lines) | stat: -rw-r--r-- 1,416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 *     gtkatlantic - the gtk+ monopd client, enjoy network monopoly games
 *
 *
 *  Copyright © 2002-2015 Sylvain Rochet
 *
 *  gtkatlantic is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; see the file COPYING. If not, see
 *  <http://www.gnu.org/licenses/>.
 */

#ifndef READPNG_H
#define READPNG_H

#include <glib.h>
#include <png.h>

typedef struct {
	gint32 width;
	gint32 height;
	guint8 *rgba;
	gboolean rgba_needed;
} _png_imagedata;


gint8 readpng_read(gchar *path, _png_imagedata *png_imagedata);
gint32 readpng_get_width(_png_imagedata *png_imagedata);
gint32 readpng_get_height(_png_imagedata *png_imagedata);
guint8 *readpng_get_rgba(_png_imagedata *png_imagedata);
guint8 *readpng_get_rgba_crop(_png_imagedata *png_imagedata, gint32 x, gint32 y, gint32 width, gint32 height);
void readpng_cleanup(_png_imagedata *png_imagedata);

#endif /* READPNG_H */