Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Image Conversion Utility Functions
[Image Modules]


Detailed Description

These are all the functions that convert from one specific format to another format or assist in that conversion. The ph_image_convert function uses a static function table in ImageConversions.c to manage image conversions using the Phission image format flags (as defined in ImageDefinitions.h). However, instead of using the ph_image_convert function to convert, these functions can be called explicitly. That will save the time of searching through the static function table.

There are two main types of conversion functions: in-place and copy. These two types of conversion functions have defined function pointer types: ph_inplace_convert_fn and ph_copy_convert_fn

In-place conversion function doesn't allocate more data or copy the converted bytes to a different buffer. Instead they convert the data in-place which results in a faster conversion because the size of the input data is the exact size of the output data.

Copy conversion functions copy the converted data to a new buffer.

The other type of functions are the actual conversion utility functions that perform the conversion. Some of the in-place and copy functions are such functions. However, some in-place and copy conversion functions are simply helper functions that call actual conversion utility functions. An actual conversion function may not have the in-place or convert function parameter interface because it is general purpose for many of the in-place or copy conversion functions that do adhere to the defined function parameter interface.


Defines

#define ph_iNULL   (ph_inplace_convert_fn)NULL
#define ph_cNULL   (ph_copy_convert_fn)NULL
#define phImageCONVERT_INPLACE   1
#define phImageCONVERT_COPY   0
#define phImageCONVERT_FAIL   phFAIL

Typedefs

typedef void(* ph_inplace_convert_fn )(uint32_t w, uint32_t h, uint8_t *data)
typedef void(* ph_copy_convert_fn )(uint32_t w, uint32_t h, uint8_t *data, uint8_t **dst, uint32_t *dst_size)

Functions

int ph_image_convert (uint32_t width, uint32_t height, uint8_t *data, uint8_t **dst, uint32_t *dst_size, uint32_t *dst_format, uint32_t in_format, uint32_t out_format, int32_t *conversion_type)
void phBGR24_x_RGB24 (uint32_t memsize, uint8_t *data)
void phBGR24_to_RGB24 (uint32_t w, uint32_t h, uint8_t *data)
void phRGB24_to_BGR24 (uint32_t w, uint32_t h, uint8_t *data)
void phABGR32_x_RGBA32 (uint32_t memsize, uint8_t *data)
void phBGRA32_x_RGBA32 (uint32_t memsize, uint8_t *data)
void phBGRA32_to_ABGR32 (uint32_t memsize, uint8_t *data)
void phABGR32_to_BGRA32 (uint32_t memsize, uint8_t *data)
void phABGR32_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *data)
void phRGBA32_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *data)
void phBGRA32_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *data)
void phRGBA32_to_BGRA32 (uint32_t w, uint32_t h, uint8_t *data)
void phBGRA32_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *data)
void phABGR32_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *data)
void phBGR24_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_BGRA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGRA32_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGRA32_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGRA32_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGRA32_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phVECTOR_BLOCK_COPY (uint32_t nelems, uint8_t elemsize, uint8_t src_stride, uint8_t dst_stride, uint8_t block_size, uint8_t src_index, uint8_t dst_index, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGR24_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGBA32_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phGREY8_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phGREY8_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phGREY8_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phGREY8_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phYUV9_to_GREY8 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_RGBA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBA32_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phABGR32_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_RGBA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_GREY8_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_YUV9_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phGREY8_to_YUV9 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGBA32_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGR24_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_BGRA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBA32_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_RGBA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBX_XBGR_to_GREY8_AVERAGE (uint32_t nelems, uint8_t d, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBX_XBGR_to_GREY8_LUMINANCE (uint32_t nelems, uint8_t d, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_GREY8 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGBA32_to_GREY8 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGR24_to_GREY8 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_GREY8 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGRA32_to_GREY8 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_GREY8_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBA32_to_GREY8_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_GREY8_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phABGR32_to_GREY8_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGRA32_to_GREY8_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBX_XBGR_to_YUV9 (uint32_t width, uint32_t height, uint8_t d, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_YUV9 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGBA32_to_YUV9 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGR24_to_YUV9 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_YUV9 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGRA32_to_YUV9 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_YUV9_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBA32_to_YUV9_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_YUV9_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phABGR32_to_YUV9_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGRA32_to_YUV9_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_RGBX_XBGR (uint32_t width, uint32_t height, uint8_t d, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phYUV9_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phYUV9_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phYUV9_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phYUV9_to_BGRA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phYUV9_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_RGBA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phYUV9_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBX_XBGR_to_HSVX (uint32_t nelems, uint8_t id, uint8_t od, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_HSV24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGBA32_to_HSV24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGR24_to_HSV24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_HSV24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGRA32_to_HSV24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_HSV24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBA32_to_HSV24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_HSV24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phABGR32_to_HSV24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGRA32_to_HSV24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phHSVX_to_RGBX_XBGR (uint32_t nelems, uint8_t id, uint8_t od, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phHSV24_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phHSV24_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phHSV24_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phHSV24_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phHSV24_to_BGRA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phHSV24_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phHSV24_to_RGBA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phHSV24_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phHSV24_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phHSV24_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBX_XBGR_to_SCTX (uint32_t nelems, uint8_t id, uint8_t od, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGB24_to_SCT24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGBA32_to_SCT24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGR24_to_SCT24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phABGR32_to_SCT24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phBGRA32_to_SCT24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phRGB24_to_SCT24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phRGBA32_to_SCT24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGR24_to_SCT24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phABGR32_to_SCT24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phBGRA32_to_SCT24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phSCTX_to_RGBX_XBGR (uint32_t nelems, uint8_t id, uint8_t od, uint8_t order, uint8_t offset, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phSCT24_to_RGB24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phSCT24_to_RGBA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phSCT24_to_BGR24 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phSCT24_to_ABGR32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phSCT24_to_BGRA32 (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst)
void phSCT24_to_RGB24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phSCT24_to_RGBA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phSCT24_to_BGR24_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phSCT24_to_ABGR32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)
void phSCT24_to_BGRA32_ex (uint32_t w, uint32_t h, uint8_t *src, uint8_t **dst, uint32_t *pdstsize)




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo


Generated on Sat Jun 16 02:45:25 2007 for phission by  doxygen 1.4.4