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

ImageConversions.h File Reference


Detailed Description

The functions here are used to convert image data from one represenation or format to another. If a function has a 'dst' argument, the function will allocate the memory that the converted data will be returned in. If that 'dst' argument comes back as NULL, then the function failed. Otherwise, the function can be assumed to have been completed successfully.

All the helper macros take a width and height as the first two arguments. If the work is done in place, the third argument is the source and dest. If the work isn't done in place, the third and fourth args are src, dst.

Definition in file ImageConversions.h.

#include <phStandard.h>
#include <phStdint.h>

Go to the source code of this file.

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:44:11 2007 for phission by  doxygen 1.4.4