Adonthell  0.4
pnm Class Reference

Allow reading and writing PNM files. More...

#include <pnm.h>

Static Public Member Functions

static void * get (SDL_RWops *file, u_int16 *length, u_int16 *height)
 Reads a PNM image from an opened file. More...
 
static void put (SDL_RWops *file, void *image, u_int16 length, u_int16 height)
 Saves a PNM image into an opened file. More...
 

Detailed Description

Allow reading and writing PNM files.

Definition at line 35 of file pnm.h.

Member Function Documentation

◆ get()

void * pnm::get ( SDL_RWops *  file,
u_int16 length,
u_int16 height 
)
static

Reads a PNM image from an opened file.

Warning
The returned pointer is allocated by this function with calloc (). Don't forget to free () it when you don't need it anymore!
Parameters
fileopened file from which to read.
lengthpointer to the integer which will contain the image's length.
heightpointer to the integer which will contain the image's height.
Returns
allocated pointer containing the PNM image.

Definition at line 35 of file pnm.cc.

◆ put()

void pnm::put ( SDL_RWops *  file,
void *  image,
u_int16  length,
u_int16  height 
)
static

Saves a PNM image into an opened file.

Parameters
filethe opened file to write the PNM image to.
imagethe PNM image data.
lengththe length of the image to write.
heightthe height of the image to write.

Definition at line 80 of file pnm.cc.


The documentation for this class was generated from the following files: