- Main Page
- Modules
- Classes
- Files

# Protected

## Functions
BYTE | CxImage::BlindGetPixelIndex (const long x, const long y)
RGBQUAD | CxImage::BlindGetPixelColor (const long x, const long y, bool bGetAlpha=true)
void * | CxImage::BlindGetPixelPointer (const long x, const long y)
void | CxImage::BlindSetPixelColor (long x, long y, RGBQUAD c, bool bSetAlpha=false)
void | CxImage::BlindSetPixelIndex (long x, long y, BYTE i)
void | CxImage::AddAveragingCont (RGBQUAD const &color, float const surf, float &rr, float &gg, float &bb, float &aa)
bool | CxImage::EncodeSafeCheck (CxFile *hFile)
bool | CxImage::IsPowerof2 (long x)
bool | CxImage::FFT (int dir, int m, double *x, double *y)
bool | CxImage::DFT (int dir, long m, double *x1, double *y1, double *x2, double *y2)
bool | CxImage::RepairChannel (CxImage *ch, float radius)
int | CxImage::gen_convolve_matrix (float radius, float **cmatrix_p)
float * | CxImage::gen_lookup_table (float *cmatrix, int cmatrix_length)
void | CxImage::blur_line (float *ctable, float *cmatrix, int cmatrix_length, BYTE *cur_col, BYTE *dest_col, int y, long bytes)
void | CxImage::blur_text (BYTE threshold, BYTE decay, BYTE max_depth, CxImage *iSrc, CxImage *iDst, BYTE bytes)
bool | CxImage::BlindSelectionIsInside (long x, long y)
BYTE | CxImage::BlindSelectionGet (const long x, const long y)
void | CxImage::SelectionSet (const long x, const long y, const BYTE level)
BYTE | CxImage::BlindAlphaGet (const long x, const long y)
void | CxImage::Startup (DWORD imagetype=0)
void | CxImage::CopyInfo (const CxImage &src)
void | CxImage::Ghost (const CxImage *src)
void | CxImage::RGBtoBGR (BYTE *buffer, int length)
static float | CxImage::HueToRGB (float n1, float n2, float hue)
void | CxImage::Bitfield2RGB (BYTE *src, DWORD redmask, DWORD greenmask, DWORD bluemask, BYTE bpp)
static int | CxImage::CompareColors (const void *elem1, const void *elem2)
short | CxImage::ntohs (const short word)
long | CxImage::ntohl (const long dword)
void | CxImage::bihtoh (BITMAPINFOHEADER *bih)
## Variables
void * | CxImage::pDib
BITMAPINFOHEADER | CxImage::head
CXIMAGEINFO | CxImage::info
BYTE * | CxImage::pSelection
BYTE * | CxImage::pAlpha
CxImage ** | CxImage::ppLayers
CxImage ** | CxImage::ppFrames

## Detailed Description

## Function Documentation

void CxImage::AddAveragingCont | ( | RGBQUAD const & | color,
|  | float const | surf,
|  | float & | rr,
|  | float & | gg,
|  | float & | bb,
|  | float & | aa |
| ) |  |  | `[protected, inherited]`

Helper function for GetAreaColorInterpolated. Adds 'surf' portion of image pixel with color 'color' to (rr,gg,bb,aa).

void CxImage::bihtoh | ( | BITMAPINFOHEADER * | bih | ) | `[protected, inherited]`

void CxImage::Bitfield2RGB | ( | BYTE * | src,
|  | DWORD | redmask,
|  | DWORD | greenmask,
|  | DWORD | bluemask,
|  | BYTE | bpp |
| ) |  |  | `[protected, inherited]`

turns a 16 or 32 bit bitfield image into a RGB image

BYTE CxImage::BlindAlphaGet | ( | const long | x,
|  | const long | y |
| ) |  |  | `[protected, inherited]`

Get alpha value without boundscheck (a bit faster). Pixel must be inside the image.

Author:
  ***bd*** 2.2004

RGBQUAD CxImage::BlindGetPixelColor | ( | const long | x,
|  | const long | y,
|  | bool | bGetAlpha = `true` |
| ) |  |  | `[protected, inherited]`

This is (a bit) faster version of GetPixelColor. It tests bounds only in debug mode (_DEBUG defined).

It is an error to request out-of-borders pixel with this method. In DEBUG mode an exception will be thrown, and data will be violated in non-DEBUG mode.

Author:
  ***bd*** 2.2004

BYTE CxImage::BlindGetPixelIndex | ( | const long | x,
|  | const long | y |
| ) |  |  | `[protected, inherited]`

void * CxImage::BlindGetPixelPointer | ( | const long | x,
|  | const long | y |
| ) |  |  | `[protected, inherited]`

Returns pointer to pixel. Currently implemented only for truecolor images.

Parameters:

  | x,y | - coordinates

Returns:
  pointer to first byte of pixel data

Author:
  ***bd*** 2.2004

BYTE CxImage::BlindSelectionGet | ( | const long | x,
|  | const long | y |
| ) |  |  | `[protected, inherited]`

Gets the Selection level for a single pixel "blind" version assumes that (x,y) is inside to the image.

bool CxImage::BlindSelectionIsInside | ( | long | x,
|  | long | y |
| ) |  |  | `[protected, inherited]`

Checks if the coordinates are inside the selection. "blind" version assumes that (x,y) is inside to the image.

void CxImage::BlindSetPixelColor | ( | long | x,
|  | long | y,
|  | RGBQUAD | c,
|  | bool | bSetAlpha = `false` |
| ) |  |  | `[protected, inherited]`

void CxImage::BlindSetPixelIndex | ( | long | x,
|  | long | y,
|  | BYTE | i |
| ) |  |  | `[protected, inherited]`

void CxImage::blur_line | ( | float * | ctable,
|  | float * | cmatrix,
|  | int | cmatrix_length,
|  | BYTE * | cur_col,
|  | BYTE * | dest_col,
|  | int | y,
|  | long | bytes |
| ) |  |  | `[protected, inherited]`

this function is written as if it is blurring a column at a time, even though it can operate on rows, too. There is no difference in the processing of the lines, at least to the blur_line function.

Author:
  [nipper]

void CxImage::blur_text | ( | BYTE | threshold,
|  | BYTE | decay,
|  | BYTE | max_depth,
|  | CxImage * | iSrc,
|  | CxImage * | iDst,
|  | BYTE | bytes |
| ) |  |  | `[protected, inherited]`

Author:
  [DP]

int CxImage::CompareColors | ( | const void * | elem1,
|  | const void * | elem2 |
| ) |  |  | `[static, protected, inherited]`

Returns:
  lightness difference between elem1 and elem2

void CxImage::CopyInfo | ( | const CxImage & | src | ) | `[protected, inherited]`

Copies the image attributes from an existing image.

- Works only on an empty image, and the image will be still empty.
- Use it before Create()

bool CxImage::DFT | ( | int | dir,
|  | long | m,
|  | double * | x1,
|  | double * | y1,
|  | double * | x2,
|  | double * | y2 |
| ) |  |  | `[protected, inherited]`

Direct fourier transform o(n)=n^2 Written by Paul Bourke, July 1998

bool CxImage::EncodeSafeCheck | ( | CxFile * | hFile | ) | `[protected, inherited]`

bool CxImage::FFT | ( | int | dir,
|  | int | m,
|  | double * | x,
|  | double * | y |
| ) |  |  | `[protected, inherited]`

This computes an in-place complex-to-complex FFT x and y are the real and imaginary arrays of n=2^m points. o(n)=n*log2(n) dir = 1 gives forward transform dir = -1 gives reverse transform Written by Paul Bourke, July 1998 FFT algorithm by Cooley and Tukey, 1965

int CxImage::gen_convolve_matrix | ( | float | radius,
|  | float ** | cmatrix_p |
| ) |  |  | `[protected, inherited]`

generates a 1-D convolution matrix to be used for each pass of a two-pass gaussian blur. Returns the length of the matrix.

Author:
  [nipper]

float * CxImage::gen_lookup_table | ( | float * | cmatrix,
|  | int | cmatrix_length |
| ) |  |  | `[protected, inherited]`

generates a lookup table for every possible product of 0-255 and each value in the convolution matrix. The returned array is indexed first by matrix position, then by input multiplicand (?) value.

Author:
  [nipper]

void CxImage::Ghost | ( | const CxImage * | from | ) | `[protected, inherited]`

(this) points to the same pDib owned by (*from), the image remains in (*from) but (this) has the access to the pixels. Use carefully !!!

float CxImage::HueToRGB | ( | float | n1,
|  | float | n2,
|  | float | hue |
| ) |  |  | `[static, protected, inherited]`

bool CxImage::IsPowerof2 | ( | long | x | ) | `[protected, inherited]`

long CxImage::ntohl | ( | const long | dword | ) | `[protected, inherited]`

short CxImage::ntohs | ( | const short | word | ) | `[protected, inherited]`

bool CxImage::RepairChannel | ( | CxImage * | ch,
|  | float | radius |
| ) |  |  | `[protected, inherited]`

void CxImage::RGBtoBGR | ( | BYTE * | buffer,
|  | int | length |
| ) |  |  | `[protected, inherited]`

swaps the blue and red components (for RGB images)

Parameters:

  | buffer | : pointer to the pixels
  | length | : number of bytes to swap. lenght may not exceed the scan line.

void CxImage::SelectionSet | ( | const long | x,
|  | const long | y,
|  | const BYTE | level |
| ) |  |  | `[protected, inherited]`

Sets the Selection level for a single pixel internal use only: doesn't set SelectionBox. Use SelectionAddPixel

void CxImage::Startup | ( | DWORD | imagetype = `0` | ) | `[protected, inherited]`

Initialize the internal structures

## Variable Documentation

BITMAPINFOHEADER CxImage::head`[protected, inherited]`

CXIMAGEINFO CxImage::info`[protected, inherited]`

BYTE* CxImage::pAlpha`[protected, inherited]`

void* CxImage::pDib`[protected, inherited]`

CxImage** CxImage::ppFrames`[protected, inherited]`

CxImage** CxImage::ppLayers`[protected, inherited]`

BYTE* CxImage::pSelection`[protected, inherited]`