YARP
Yet Another Robot Platform
ImageFile.cpp File Reference
#include <yarp/sig/ImageFile.h>
#include <yarp/os/LogComponent.h>
#include <yarp/os/LogStream.h>
#include <cstdio>
#include <cstring>
#include <cstdlib>
+ Include dependency graph for ImageFile.cpp:

Go to the source code of this file.

Functions

static bool ImageReadRGB_PNG (ImageOf< PixelRgb > &img, const char *filename)
 
static bool ImageReadFloat_PNG (ImageOf< PixelFloat > &dest, const std::string &filename)
 
static bool ImageReadBGR_PNG (ImageOf< PixelBgr > &img, const char *filename)
 
static bool ImageReadMono_PNG (ImageOf< PixelMono > &img, const char *filename)
 
static bool ReadHeader_PxM (FILE *fp, int *height, int *width, int *color)
 
static bool ImageReadRGB_PxM (ImageOf< PixelRgb > &img, const char *filename)
 
static bool ImageReadFloat_PxM (ImageOf< PixelFloat > &dest, const std::string &filename)
 
static bool ImageReadBGR_PxM (ImageOf< PixelBgr > &img, const char *filename)
 
static bool ImageReadMono_PxM (ImageOf< PixelMono > &img, const char *filename)
 
static bool SaveJPG (char *src, const char *filename, int h, int w, int rowSize)
 
static bool SavePGM (char *src, const char *filename, int h, int w, int rowSize)
 
static bool SavePPM (char *src, const char *filename, int h, int w, int rowSize)
 
static bool ImageWriteJPG (ImageOf< PixelRgb > &img, const char *filename)
 
static bool ImageWritePNG (ImageOf< PixelRgb > &img, const char *filename)
 
static bool ImageWritePNG (ImageOf< PixelMono > &img, const char *filename)
 
static bool ImageWriteRGB (ImageOf< PixelRgb > &img, const char *filename)
 
static bool ImageWriteMono (ImageOf< PixelMono > &img, const char *filename)
 
static bool ImageWriteFloat (ImageOf< PixelFloat > &img, const char *filename)
 

Function Documentation

◆ ImageReadBGR_PNG()

static bool ImageReadBGR_PNG ( ImageOf< PixelBgr > &  img,
const char *  filename 
)
static

Definition at line 147 of file ImageFile.cpp.

◆ ImageReadBGR_PxM()

static bool ImageReadBGR_PxM ( ImageOf< PixelBgr > &  img,
const char *  filename 
)
static

Definition at line 301 of file ImageFile.cpp.

◆ ImageReadFloat_PNG()

static bool ImageReadFloat_PNG ( ImageOf< PixelFloat > &  dest,
const std::string &  filename 
)
static

Definition at line 136 of file ImageFile.cpp.

◆ ImageReadFloat_PxM()

static bool ImageReadFloat_PxM ( ImageOf< PixelFloat > &  dest,
const std::string &  filename 
)
static

Definition at line 278 of file ImageFile.cpp.

◆ ImageReadMono_PNG()

static bool ImageReadMono_PNG ( ImageOf< PixelMono > &  img,
const char *  filename 
)
static

Definition at line 158 of file ImageFile.cpp.

◆ ImageReadMono_PxM()

static bool ImageReadMono_PxM ( ImageOf< PixelMono > &  img,
const char *  filename 
)
static

Definition at line 348 of file ImageFile.cpp.

◆ ImageReadRGB_PNG()

static bool ImageReadRGB_PNG ( ImageOf< PixelRgb > &  img,
const char *  filename 
)
static

Definition at line 38 of file ImageFile.cpp.

◆ ImageReadRGB_PxM()

static bool ImageReadRGB_PxM ( ImageOf< PixelRgb > &  img,
const char *  filename 
)
static

Definition at line 219 of file ImageFile.cpp.

◆ ImageWriteFloat()

static bool ImageWriteFloat ( ImageOf< PixelFloat > &  img,
const char *  filename 
)
static

Definition at line 630 of file ImageFile.cpp.

◆ ImageWriteJPG()

static bool ImageWriteJPG ( ImageOf< PixelRgb > &  img,
const char *  filename 
)
static

Definition at line 595 of file ImageFile.cpp.

◆ ImageWriteMono()

static bool ImageWriteMono ( ImageOf< PixelMono > &  img,
const char *  filename 
)
static

Definition at line 625 of file ImageFile.cpp.

◆ ImageWritePNG() [1/2]

static bool ImageWritePNG ( ImageOf< PixelMono > &  img,
const char *  filename 
)
static

Definition at line 610 of file ImageFile.cpp.

◆ ImageWritePNG() [2/2]

static bool ImageWritePNG ( ImageOf< PixelRgb > &  img,
const char *  filename 
)
static

Definition at line 600 of file ImageFile.cpp.

◆ ImageWriteRGB()

static bool ImageWriteRGB ( ImageOf< PixelRgb > &  img,
const char *  filename 
)
static

Definition at line 620 of file ImageFile.cpp.

◆ ReadHeader_PxM()

static bool ReadHeader_PxM ( FILE *  fp,
int *  height,
int *  width,
int *  color 
)
static

LATER: not portable?

Definition at line 173 of file ImageFile.cpp.

◆ SaveJPG()

static bool SaveJPG ( char *  src,
const char *  filename,
int  h,
int  w,
int  rowSize 
)
static

Definition at line 496 of file ImageFile.cpp.

◆ SavePGM()

static bool SavePGM ( char *  src,
const char *  filename,
int  h,
int  w,
int  rowSize 
)
static

Definition at line 543 of file ImageFile.cpp.

◆ SavePPM()

static bool SavePPM ( char *  src,
const char *  filename,
int  h,
int  w,
int  rowSize 
)
static

fwrite((void *) src, 1, (size_t) (h*w*3), fp);

Definition at line 569 of file ImageFile.cpp.