#include "image.h"
Go to the source code of this file.
Functions | |
int | openFile_Read (const char *filename, FILE **inFilePtr, int binary) |
Opens the file for read mode. | |
int | openFile_Write (const char *filename, FILE **inFilePtr, int binary) |
Opens the file for write mode. | |
int | openFile_Append (const char *filename, FILE **inFilePtr, int binary) |
Opens the file for append mode. | |
int | readCSV (nttw_integer **data, const int rows, const int cols, const char *filename) |
Reads a Comma Separated Value (CSV) file. Memory is internally allocated to the correct size. | |
int | readPGMHeader (FILE *inFile, char *type, int *rows, int *cols, int *maxGrey) |
Reads the parameters in the header of a PGM file. | |
int | readPGM (nttw_integer **data, int *rows, int *cols, const char *filename, int binary) |
Reads in an image which has a PGM format of name given. | |
int | readSignedPGM (long **data, int *rows, int *cols, const char *filename, int binary) |
Inputs data as a PGM file with signed values. | |
int | readUCharPGM (unsigned char **data, int *rows, int *cols, const char *filename, int binary) |
Inputs data as a PGM file with signed values. | |
int | writePGM (nttw_integer *data, const int rows, const int cols, const int greyMax, const char *filename, int binary) |
Outputs data as a PGM file. | |
int | writeSignedPGM (long *data, const int rows, const int cols, const int greyMax, const char *filename, int binary) |
Outputs data as a PGM file with signed values. | |
int | writeUCharPGM (unsigned char *data, const int rows, const int cols, const char *filename, int binary) |
Outputs data as a PGM file with unsigned character values. | |
long * | cropImage (long *initImage, const int initRows, const int initCols, const int newRows, const int newCols) |
Crops the image to the size provided from the centre. EXPERIMENTAL. | |
long * | truncateImage (long *initImage, const int initRows, const int initCols, const int newRows, const int newCols) |
Crops the image to the size provided from the top left-hand side. EXPERIMENTAL. | |
long * | embedImage (long *initImage, const int initRows, const int initCols, const int newRows, const int newCols) |
Embeds the image to the size provided from the top left-hand corner. EXPERIMENTAL. | |
long * | diffImage (long *image1, long *image2, const int rows, const int cols) |
Takes the differences of image1 and image2 and returns pointer to result. EXPERIMENTAL. |