#include "tlVision.h"
Go to the source code of this file.
Functions | |
int | tl_write_bmp (tlPixel *src, int width, int height, tl_format format, char *filename) |
int | tl_write_jpg (tlPixel *src, int width, int height, int pixel_width, int quality, char *filename) |
int | tl_write_ppm (tlPixel *src, int width, int height, char *filename) |
int | tl_write_tlb (tlImage *image, char *filename) |
tlPixel * | tl_read_bmp (char *filename, int *width, int *height, tl_format *format) |
tlPixel * | tl_read_jpg (char *filename, int *width, int *height, tl_format *format) |
tlPixel * | tl_read_ppm (char *filename, int *width, int *height, tl_format *format) |
void * | tl_read_tlb (char *filename, int *width, int *height, int *pixel_width, tl_format *format) |
Read an image from a BMP format.
filename | file name | |
width | [out] image width | |
height | [out] image height | |
format | [out] image format |
References RGB, tl_create_array(), TL_ERRNO_MSG, TL_ERROR_ALLOCATION_FAILED, TL_ERROR_FILE_NOT_FOUND_OR_CORRUPT, TL_ERROR_INVALID_FORMAT, TL_ERROR_NULL_POINTER, tl_read_bmp(), and TL_RGB_WIDTH.
Referenced by tlImage::readFromBMP(), and tl_read_bmp().
Read an image from a JPEG format.
filename | file name | |
width | [out] image width | |
height | [out] image height | |
format | [out] image format |
References GRAY, RGB, tl_create_array(), TL_ERRNO_MSG, TL_ERROR_ALLOCATION_FAILED, TL_ERROR_FILE_NOT_FOUND_OR_CORRUPT, TL_ERROR_NULL_POINTER, and tl_read_jpg().
Referenced by tlImage::readFromJPG(), and tl_read_jpg().
Read an image from a Portable Pixmap format (binary format).
filename | file name | |
width | [out] image width | |
height | [out] image height | |
format | [out] image format |
References RGB, TL_ERRNO_MSG, TL_ERROR_ALLOCATION_FAILED, TL_ERROR_FILE_IO, TL_ERROR_FILE_NOT_FOUND_OR_CORRUPT, TL_ERROR_INVALID_FORMAT, tl_read_ppm(), TL_RGB_WIDTH, and tlVerbose.
Referenced by tlImage::readFromPPM(), and tl_read_ppm().
void* tl_read_tlb | ( | char * | filename, | |
int * | width, | |||
int * | height, | |||
int * | pixel_width, | |||
tl_format * | format | |||
) |
Read an image in TLIB format.
filename | file name | |
width | [out] image width | |
height | [out] image height | |
pixel_width | [out] pixel width | |
format | [out] image format |
References BIN, GRAY, HSI, NRG, RGB, STEREO, TL_ERRNO_MSG, TL_ERROR_ALLOCATION_FAILED, TL_ERROR_FILE_IO, TL_ERROR_INVALID_FORMAT, TL_ERROR_NULL_POINTER, tl_read_tlb(), and tlVerbose.
Referenced by tlImage::readFromFile(), and tl_read_tlb().
Write to Bitmap format.
src | RGB pixel array to save | |
width | image width | |
height | image height | |
format | image format | |
filename | the file name. If NULL, write to stdout |
References GRAY, RGB, TL_ERRNO_MSG, TL_ERROR, TL_ERROR_NULL_POINTER, TL_RGB_WIDTH, tl_write_bmp(), and tlVerbose.
Referenced by tl_write_bmp(), and tlImage::writeToBMP().
int tl_write_jpg | ( | tlPixel * | src, | |
int | width, | |||
int | height, | |||
int | pixel_width, | |||
int | quality, | |||
char * | filename | |||
) |
Write to JPEG format.
src | RGB pixel array to save | |
width | image width | |
height | image height | |
filename | the file name; if NULL, write to stdout | |
pixel_width | the number of bytes in each pixel | |
quality | the quality of the output jpg file [%] |
References TL_ERRNO_MSG, TL_ERROR, TL_ERROR_FILE_IO, TL_ERROR_NULL_POINTER, tl_write_jpg(), and tlVerbose.
Referenced by tl_write_jpg(), and tlImage::writeToJPG().
int tl_write_ppm | ( | tlPixel * | src, | |
int | width, | |||
int | height, | |||
char * | filename | |||
) |
Write to Portable Pixmap format (binary format).
src | RGB pixel array to save | |
width | image width | |
height | image height | |
filename | the file name; if NULL, write to stdout |
References TL_ERRNO_MSG, TL_ERROR, TL_ERROR_FILE_IO, TL_ERROR_NULL_POINTER, tl_write_ppm(), and tlVerbose.
Referenced by tl_write_ppm(), and tlImage::writeToPPM().
int tl_write_tlb | ( | tlImage * | image, | |
char * | filename | |||
) |
Write to TLIB image format.
image image to save filename the file name. If NULL, write to stdout.
References BIN, tlPixelArray::format, GRAY, tlSize::height, tlPixelArray::hrpixel, HSI, NRG, tlPixelArray::pixel, tlPixelArray::pixelWidth, RGB, STEREO, TL_ERRNO_MSG, TL_ERROR, TL_ERROR_FILE_IO, TL_ERROR_NULL_POINTER, TL_MAX_PIXEL_VAL, tl_write_tlb(), tlVerbose, and tlSize::width.
Referenced by tl_write_tlb(), and tlImage::writeToFile().