Read common image formats from file or other input channels. More...
#include <ImageReader.h>
Static Public Member Functions | |
static bool | loadJPEGImage (ColorImageRGB8 &img, byte *ptr, size_t numBytes) |
static bool | readImage (GrayLevelImage8 &img, std::string filename) |
default destructor | |
static bool | readImage (GrayLevelImage16 &img, std::string filename) |
static bool | readImage (ColorImageRGB8 &img, std::string filename) |
static bool | readImage (ColorImageRGBa8 &img, std::string filename) |
Private Member Functions | |
ImageReader () | |
~ImageReader () | |
default constructor |
Read common image formats from file or other input channels.
Definition at line 28 of file ImageReader.h.
puma2::ImageReader::ImageReader | ( | ) | [inline, private] |
Definition at line 30 of file ImageReader.h.
puma2::ImageReader::~ImageReader | ( | ) | [inline, private] |
default constructor
Definition at line 31 of file ImageReader.h.
bool ImageReader::loadJPEGImage | ( | ColorImageRGB8 & | img, |
byte * | ptr, | ||
size_t | numBytes | ||
) | [static] |
Load a JPEG image from some memory area and decompress into the given instance of an Image. The image data will be converted to a 3 times 8-bit RGB image.
[in,out] | img | the ColorImageRGB8 object where the image data should go |
[in] | ptr | location in mamory where the data starts |
[in] | numBytes | size of the memory area pointed to by ptr. |
Definition at line 234 of file ImageReader.cpp.
static bool puma2::ImageReader::readImage | ( | GrayLevelImage8 & | img, |
std::string | filename | ||
) | [static] |
default destructor
Read an image from file filename into the given instance of an Image. The image data will be auto-converted to an 8-bit gray level image if it isn't such a thing already.
[in,out] | img | the GrayLevelImage8 object where the image data should go |
[in] | filename | the filename of the image |
static bool puma2::ImageReader::readImage | ( | GrayLevelImage16 & | img, |
std::string | filename | ||
) | [static] |
static bool puma2::ImageReader::readImage | ( | ColorImageRGB8 & | img, |
std::string | filename | ||
) | [static] |
Read an image from file filename into the given instance of an Image. The image data will be auto-converted to a 3 times 8-bit RGB image if it isn't such a thing already.
[in,out] | img | the ColorImageRGB8 object where the image data should go |
[in] | filename | the filename of the image |
static bool puma2::ImageReader::readImage | ( | ColorImageRGBa8 & | img, |
std::string | filename | ||
) | [static] |
Read an image from file filename into the given instance of an Image. The image data will be auto-converted to a 4 times 8-bit RGBA image if it isn't such a thing already. If no alpha information is present in the file, it will be set to valueRangeMaximum, denoting 'opaque' pixels.
inout] | img the ColorImageRGBa8 object where the image data should go | |
[in] | filename | the filename of the image |