Tachyon (current)  Current Main Branch
Macros | Functions
ppm.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tachyon.h"
#include "util.h"
#include "imageio.h"
#include "ppm.h"

Go to the source code of this file.

Macros

#define TACHYON_INTERNAL   1
 

Functions

static int getint (FILE *dfile)
 
int readppm (const char *name, int *xres, int *yres, unsigned char **imgdata)
 
int writeppm (const char *name, int xres, int yres, unsigned char *imgdata)
 
int writeppm48 (const char *name, int xres, int yres, unsigned char *imgdata)
 

Macro Definition Documentation

◆ TACHYON_INTERNAL

#define TACHYON_INTERNAL   1

Definition at line 19 of file ppm.c.

Function Documentation

◆ getint()

static int getint ( FILE *  dfile)
static

Definition at line 25 of file ppm.c.

Referenced by readppm().

◆ readppm()

int readppm ( const char *  name,
int *  xres,
int *  yres,
unsigned char **  imgdata 
)

Definition at line 42 of file ppm.c.

References getint(), IMAGEBADFILE, IMAGENOERR, IMAGEREADERR, and IMAGEUNSUP.

Referenced by readimage().

◆ writeppm()

int writeppm ( const char *  name,
int  xres,
int  yres,
unsigned char *  imgdata 
)

Definition at line 85 of file ppm.c.

References IMAGEBADFILE, IMAGENOERR, and IMAGEWRITEERR.

Referenced by writeimage().

◆ writeppm48()

int writeppm48 ( const char *  name,
int  xres,
int  yres,
unsigned char *  imgdata 
)

Definition at line 111 of file ppm.c.

References IMAGEBADFILE, IMAGENOERR, and IMAGEWRITEERR.

Referenced by writeimage().