Crossfire Client, Branches  R11627
png.c File Reference
#include <config.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <png.h>
#include <client-types.h>
#include <client.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
+ Include dependency graph for png.c:

Go to the source code of this file.

Macros

#define BPP   4
 
#define MAX_IMAGE_HEIGHT   1024
 
#define MAX_IMAGE_WIDTH   1024
 
#define PNGX_DATA   3
 
#define PNGX_NOFILE   1
 
#define PNGX_OUTOFMEM   2
 
#define RATIO   100
 

Functions

uint8png_to_data (uint8 *data, int len, uint32 *width, uint32 *height)
 
uint8rescale_rgba_data (uint8 *data, int *width, int *height, int scale)
 
int rgba_to_gdkpixmap (GdkWindow *window, uint8 *data, int width, int height, GdkPixmap **pix, GdkBitmap **mask, GdkColormap *colormap)
 
static void user_read_data (png_structp png_ptr, png_bytep data, png_size_t length)
 

Variables

static uint8data_cp
 
static int data_len
 
static int data_start
 
const char *const rcsid_gtk_png_c
 

Macro Definition Documentation

#define BPP   4

Definition at line 242 of file png.c.

Referenced by rescale_rgba_data().

#define MAX_IMAGE_HEIGHT   1024

Definition at line 241 of file png.c.

Referenced by rescale_rgba_data().

#define MAX_IMAGE_WIDTH   1024

Definition at line 240 of file png.c.

Referenced by rescale_rgba_data().

#define PNGX_DATA   3

Definition at line 53 of file png.c.

#define PNGX_NOFILE   1

Definition at line 51 of file png.c.

#define PNGX_OUTOFMEM   2

Definition at line 52 of file png.c.

#define RATIO   100

Definition at line 238 of file png.c.

Referenced by rescale_rgba_data().

Function Documentation

uint8* png_to_data ( uint8 data,
int  len,
uint32 width,
uint32 height 
)

Definition at line 63 of file png.c.

uint8* rescale_rgba_data ( uint8 data,
int *  width,
int *  height,
int  scale 
)

Definition at line 244 of file png.c.

int rgba_to_gdkpixmap ( GdkWindow *  window,
uint8 data,
int  width,
int  height,
GdkPixmap **  pix,
GdkBitmap **  mask,
GdkColormap *  colormap 
)

Definition at line 407 of file png.c.

static void user_read_data ( png_structp  png_ptr,
png_bytep  data,
png_size_t  length 
)
static

Definition at line 58 of file png.c.

References data_cp, and data_start.

Referenced by png_to_data().

+ Here is the caller graph for this function:

Variable Documentation

uint8* data_cp
static

Definition at line 55 of file png.c.

Referenced by png_to_data(), and user_read_data().

int data_len
static

Definition at line 56 of file png.c.

Referenced by png_to_data(), and script_watch().

int data_start
static

Definition at line 56 of file png.c.

Referenced by png_to_data(), and user_read_data().

const char* const rcsid_gtk_png_c
Initial value:
=
"$Id: png.c 9190 2008-06-01 08:53:05Z anmaster $"

Definition at line 1 of file png.c.