Functions
ImageReader.cpp File Reference
#include "puma2config.h"
#include "ImageReader.h"
#include "PumaException.h"
#include "PumaMessages.h"
#include <cstdio>
#include <cerrno>
#include <string>
#include <png.h>
#include <jpeglib.h>
Include dependency graph for ImageReader.cpp:

Go to the source code of this file.

Functions

static int getPNMinteger (FILE *fp)
void jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *ptr, size_t numBytes)
static bool readImageColorBuiltinPNM (ColorImageRGB8 &img, FILE *fp)
static bool readImageColorJPEG_generic (ColorImageRGB8 &img, struct jpeg_decompress_struct &cinfo)
static bool readImageColorJPEGFromFile (ColorImageRGB8 &img, FILE *fp)
static bool readImageColorJPEGFromMemory (ColorImageRGB8 &img, JOCTET *ptr, size_t numBytes)
static bool readImageColorPNG (ColorImageRGB8 &img, FILE *fp)
static bool readImageGrayBuiltinPNM (GrayLevelImage8 &img, FILE *fp)
static bool readImageGrayJPEG (GrayLevelImage8 &img, FILE *fp)
static bool readImageGrayPNG (GrayLevelImage8 &img, FILE *fp)
static bool readPNMheader (FILE *filePointer, int &pCode, int &pWid, int &pHig, int &pDep)
static void skipPNMcomment (FILE *fp)

Function Documentation

static int getPNMinteger ( FILE *  fp) [static]

Read an integer value form the header of a PNM (PBM, PGM, PPM) file header (or body for P1-P3). Skips any white space and comments, then reads a sequence of digits.

Parameters:
[in]fpFile pointer to read from
Returns:
returns the integer value of the number read.
Precondition:
fp points somwhere were the next integer is expected
Postcondition:
character right behind the last digit was consumed by getc(), or end-of-file was reached.

Definition at line 355 of file ImageReader.cpp.

void jpeg_memory_src ( j_decompress_ptr  cinfo,
JOCTET *  ptr,
size_t  numBytes 
)

Definition at line 101 of file jmemsrc.c.

static bool readImageColorBuiltinPNM ( ColorImageRGB8 img,
FILE *  fp 
) [static]

Definition at line 520 of file ImageReader.cpp.

static bool readImageColorJPEG_generic ( ColorImageRGB8 img,
struct jpeg_decompress_struct &  cinfo 
) [static]

Definition at line 717 of file ImageReader.cpp.

static bool readImageColorJPEGFromFile ( ColorImageRGB8 img,
FILE *  fp 
) [static]

Definition at line 692 of file ImageReader.cpp.

static bool readImageColorJPEGFromMemory ( ColorImageRGB8 img,
JOCTET *  ptr,
size_t  numBytes 
) [static]

Definition at line 705 of file ImageReader.cpp.

static bool readImageColorPNG ( ColorImageRGB8 img,
FILE *  fp 
) [static]

Definition at line 863 of file ImageReader.cpp.

static bool readImageGrayBuiltinPNM ( GrayLevelImage8 img,
FILE *  fp 
) [static]

Definition at line 420 of file ImageReader.cpp.

static bool readImageGrayJPEG ( GrayLevelImage8 img,
FILE *  fp 
) [static]

Definition at line 635 of file ImageReader.cpp.

static bool readImageGrayPNG ( GrayLevelImage8 img,
FILE *  fp 
) [static]

Definition at line 773 of file ImageReader.cpp.

static bool readPNMheader ( FILE *  filePointer,
int &  pCode,
int &  pWid,
int &  pHig,
int &  pDep 
) [static]

Definition at line 381 of file ImageReader.cpp.

static void skipPNMcomment ( FILE *  fp) [static]

Skip comments in a PNM (PBM, PGM, PPM) file header (or body for P1-P3). Reads and discards characters from a file pointer until end-of-line or and-of-file is reached.

Parameters:
[in]fpFile pointer to read from
Precondition:
comment char '#' was just read before with getc(fp)
Postcondition:
newline char of this comment was read as last character or end-of-file was reached.

Definition at line 336 of file ImageReader.cpp.



obj_rec_gui
Author(s): AGAS/agas@uni-koblenz.de
autogenerated on Mon Oct 6 2014 02:53:43