Classes | Functions
PN::ImageTool Namespace Reference

PN::ImageTool provides many utility methods for image handling. More...

Classes

struct  TGA_HEADER

Functions

unsigned short blendPixel16 (unsigned short nSrc, unsigned short nDst, int nOpacity)
 Blends a single pixel in 16-bits RGB565 format.
void convertPixel16To24 (unsigned short nPixel, unsigned char &nRed, unsigned char &nGreen, unsigned char &nBlue)
 Converts a single pixel from 16-bits (565) RGB to 24-bits RGB.
unsigned short convertPixel24To16 (int nRed, int nGreen, int nBlue)
 Converts a single pixel from 24-bits RGB to 16-bits (565) RGB.
void convertPixelDataFrom16BitRGBTo24BitBGR (unsigned char *nDestData, const unsigned short *nPixelData, unsigned int nWidth, unsigned int nHeight)
void flipImageY (unsigned char *nDstBuffer, unsigned const char *nSrcBuffer, int nWidth, int nHeight, int nPixelSize)
 Flips an image in Y-direction.
bool saveAsTGA (Image *nImage, const char *nFileName)
 Save an Image into a TGA file.

Detailed Description

PN::ImageTool provides many utility methods for image handling.


Function Documentation

unsigned short PN::ImageTool::blendPixel16 ( unsigned short  nSrc,
unsigned short  nDst,
int  nOpacity 
) [inline]

Blends a single pixel in 16-bits RGB565 format.

Definition at line 73 of file ImageTool.h.

void PN::ImageTool::convertPixel16To24 ( unsigned short  nPixel,
unsigned char &  nRed,
unsigned char &  nGreen,
unsigned char &  nBlue 
) [inline]

Converts a single pixel from 16-bits (565) RGB to 24-bits RGB.

Definition at line 64 of file ImageTool.h.

unsigned short PN::ImageTool::convertPixel24To16 ( int  nRed,
int  nGreen,
int  nBlue 
) [inline]

Converts a single pixel from 24-bits RGB to 16-bits (565) RGB.

Definition at line 57 of file ImageTool.h.

void PN::ImageTool::convertPixelDataFrom16BitRGBTo24BitBGR ( unsigned char *  nDestData,
const unsigned short *  nPixelData,
unsigned int  nWidth,
unsigned int  nHeight 
)

Definition at line 49 of file ImageTool.cpp.

void PN::ImageTool::flipImageY ( unsigned char *  nDstBuffer,
unsigned const char *  nSrcBuffer,
int  nWidth,
int  nHeight,
int  nPixelSize 
)

Flips an image in Y-direction.

This method does simple scanline copying and can therefore flip any pixel buffer. nPixelSize is the number of bytes per pixel.

Definition at line 65 of file ImageTool.cpp.

bool PN::ImageTool::saveAsTGA ( Image *  nImage,
const char *  nFileName 
)

Save an Image into a TGA file.

The TGA file is always 24-bits and uncompressed.

Definition at line 96 of file ImageTool.cpp.



v4r_artoolkitplus
Author(s): Markus Bader
autogenerated on Wed Aug 26 2015 16:41:53