Loading of images using HighGUI from OpenCV. More...
Functions | |
bool | LoadFromFile (CByteImage *pImage, const char *pFilePath) |
Loads an image from a file. | |
bool | SaveToFile (const CByteImage *pImage, const char *pFilePath) |
Saves an image to a file. |
Loading of images using HighGUI from OpenCV.
The funtions offered here are useful in case access to JPEG or PNG files is needed. In all other cases (BMP, PPM, PGM), it is recommended to use CByteImage::LoadFromFile(const char *) instead.
bool ImageAccessCV::LoadFromFile | ( | CByteImage * | pImage, |
const char * | pFilePath | ||
) |
Loads an image from a file.
If an image is already loaded, reinitialization is performed automatically.
Use the file endings .JPG, .JPEG, .jpg or .jpeg for JPEG files, .PNG or .png for PNG files, and .TIFF or .tiff for TIFF files.
For BMP, PPM and PGM files, it is recommended to use CByteImage::LoadFromFile(const char *) instead.
[in,out] | pImage | The target instance. pImage must contain an allocated instance of CByteImage, but does not need to contain a valid image. |
[in] | pFilePath | The path to the image file to be loaded. |
Definition at line 51 of file ImageAccessCV.cpp.
bool ImageAccessCV::SaveToFile | ( | const CByteImage * | pImage, |
const char * | pFilePath | ||
) |
Saves an image to a file.
If an image is already loaded, reinitialization is performed automatically.
Use the file endings .JPG, .JPEG, .jpg or .jpeg for JPEG files, .PNG or .png for PNG files, and .TIFF or .tiff for TIFF files.
For BMP, PPM and PGM files, it is recommended to use CByteImage::LoadFromFile(const char *) instead.
[in,out] | pImage | The instance of the image to be saved. |
[in] | pFilePath | The path to the destination file. |
Definition at line 110 of file ImageAccessCV.cpp.