Main Page | Modules | Class List | File List | Class Members | File Members

CxImage Class Reference

#include <ximage.h>

List of all members.

Public Types

typedef CxImage::tagCxTextInfo CXTEXTINFO
enum  ImageOpType {
  OpAdd, OpAnd, OpXor, OpOr,
  OpMask, OpSrcCopy, OpDstCopy, OpSub,
  OpSrcBlend, OpScreen
}
enum  InterpolationMethod {
  IM_NEAREST_NEIGHBOUR = 1, IM_BILINEAR = 2, IM_BSPLINE = 3, IM_BICUBIC = 4,
  IM_BICUBIC2 = 5, IM_LANCZOS = 6, IM_BOX = 7, IM_HERMITE = 8,
  IM_HAMMING = 9, IM_SINC = 10, IM_BLACKMAN = 11, IM_BESSEL = 12,
  IM_GAUSSIAN = 13, IM_QUADRATIC = 14, IM_MITCHELL = 15, IM_CATROM = 16
}
enum  OverflowMethod {
  OM_COLOR = 1, OM_BACKGROUND = 2, OM_TRANSPARENT = 3, OM_WRAP = 4,
  OM_REPEAT = 5, OM_MIRROR = 6
}

Public Member Functions

void AlphaClear ()
bool AlphaCopy (CxImage &from)
void AlphaCreate ()
void AlphaDelete ()
bool AlphaFlip ()
BYTE AlphaGet (const long x, const long y)
BYTE AlphaGetMax () const
BYTE * AlphaGetPointer (const long x=0, const long y=0)
void AlphaInvert ()
bool AlphaIsValid ()
bool AlphaMirror ()
void AlphaPaletteClear ()
void AlphaPaletteEnable (bool enable=true)
bool AlphaPaletteIsEnabled ()
bool AlphaPaletteIsValid ()
bool AlphaPaletteSplit (CxImage *dest)
void AlphaSet (const long x, const long y, const BYTE level)
bool AlphaSet (CxImage &from)
void AlphaSet (BYTE level)
void AlphaSetMax (BYTE nAlphaMax)
bool AlphaSplit (CxImage *dest)
void AlphaStrip ()
void BlendPalette (COLORREF cr, long perc)
void BlendPixelColor (long x, long y, RGBQUAD c, float blend, bool bSetAlpha=false)
bool CircleTransform (int type, long rmax=0, float Koeff=1.0f)
void Clear (BYTE bval=0)
bool Colorize (BYTE hue, BYTE sat, float blend=1.0f)
bool Combine (CxImage *r, CxImage *g, CxImage *b, CxImage *a, long colorspace=0)
bool Contour ()
void Copy (const CxImage &src, bool copypixels=true, bool copyselection=true, bool copyalpha=true)
HANDLE CopyToHandle ()
void * Create (DWORD dwWidth, DWORD dwHeight, DWORD wBpp, DWORD imagetype=0)
bool CreateFromArray (BYTE *pArray, DWORD dwWidth, DWORD dwHeight, DWORD dwBitsperpixel, DWORD dwBytesperline, bool bFlipImage)
bool CreateFromHANDLE (HANDLE hMem)
bool CreateFromHBITMAP (HBITMAP hbmp, HPALETTE hpal=0)
bool CreateFromHICON (HICON hico)
bool CreateFromMatrix (BYTE **ppMatrix, DWORD dwWidth, DWORD dwHeight, DWORD dwBitsperpixel, DWORD dwBytesperline, bool bFlipImage)
bool Crop (const RECT &rect, CxImage *iDst=NULL)
bool Crop (long left, long top, long right, long bottom, CxImage *iDst=NULL)
bool CropRotatedRectangle (long topx, long topy, long width, long height, float angle, CxImage *iDst=NULL)
 CxImage (BYTE *buffer, DWORD size, DWORD imagetype)
 CxImage (CxFile *stream, DWORD imagetype)
 CxImage (FILE *stream, DWORD imagetype)
 CxImage (const TCHAR *filename, DWORD imagetype)
 CxImage (const CxImage &src, bool copypixels=true, bool copyselection=true, bool copyalpha=true)
 CxImage (DWORD dwWidth, DWORD dwHeight, DWORD wBpp, DWORD imagetype=0)
 CxImage (DWORD imagetype=0)
bool Decode (BYTE *buffer, DWORD size, DWORD imagetype)
bool Decode (CxFile *hFile, DWORD imagetype)
bool Decode (FILE *hFile, DWORD imagetype)
bool DecreaseBpp (DWORD nbit, bool errordiffusion, RGBQUAD *ppal=0, DWORD clrimportant=0)
bool Destroy ()
bool Dilate (long Ksize=2)
bool Dither (long method=0)
long Draw (HDC hdc, const RECT &rect, RECT *pClipRect=NULL, bool bSmooth=false)
long Draw (HDC hdc, long x=0, long y=0, long cx=-1, long cy=-1, RECT *pClipRect=0, bool bSmooth=false)
long Draw2 (HDC hdc, const RECT &rect)
long Draw2 (HDC hdc, long x=0, long y=0, long cx=-1, long cy=-1)
void DrawLine (int StartX, int EndX, int StartY, int EndY, COLORREF cr)
void DrawLine (int StartX, int EndX, int StartY, int EndY, RGBQUAD color, bool bSetAlpha=false)
long DrawString (HDC hdc, long x, long y, const TCHAR *text, RGBQUAD color, const TCHAR *font, long lSize=0, long lWeight=400, BYTE bItalic=0, BYTE bUnderline=0, bool bSetAlpha=false)
long DrawStringEx (HDC hdc, long x, long y, CXTEXTINFO *pTextType, bool bSetAlpha=false)
bool Edge (long Ksize=2)
void Enable (bool enable=true)
bool Encode (BYTE *&buffer, long &size, DWORD imagetype)
bool Encode (FILE *hFile, CxImage **pImages, int pagecount, DWORD imagetype)
bool Encode (CxFile *hFile, CxImage **pImages, int pagecount, DWORD imagetype)
bool Encode (CxFile *hFile, DWORD imagetype)
bool Encode (FILE *hFile, DWORD imagetype)
bool Encode2RGBA (BYTE *&buffer, long &size)
bool Encode2RGBA (CxFile *hFile)
bool Erode (long Ksize=2)
bool Expand (long newx, long newy, RGBQUAD canvascolor, CxImage *iDst=0)
bool Expand (long left, long top, long right, long bottom, RGBQUAD canvascolor, CxImage *iDst=0)
bool FFT2 (CxImage *srcReal, CxImage *srcImag, CxImage *dstReal, CxImage *dstImag, long direction=1, bool bForceFFT=true, bool bMagnitude=true)
bool Filter (long *kernel, long Ksize, long Kfactor, long Koffset)
bool Flip ()
void FreeMemory (void *memblock)
bool Gamma (float gamma)
RGBQUAD GetAreaColorInterpolated (float const xc, float const yc, float const w, float const h, InterpolationMethod const inMethod, OverflowMethod const ofMethod=OM_BACKGROUND, RGBQUAD *const rplColor=0)
BYTE * GetBits (DWORD row=0)
WORD GetBpp () const
DWORD GetClrImportant () const
DWORD GetCodecOption (DWORD imagetype=0)
BYTE GetColorType ()
void * GetDIB () const
DWORD GetEffWidth () const
long GetEscape () const
DWORD GetFlags () const
long GetFrame () const
DWORD GetFrameDelay () const
DWORD GetHeight () const
BYTE GetJpegQuality () const
BYTE GetJpegScale () const
const char * GetLastError ()
CxImageGetLayer (long position)
BYTE GetNearestIndex (RGBQUAD c)
DWORD GetNumColors () const
long GetNumFrames () const
long GetNumLayers () const
void GetOffset (long *x, long *y)
RGBQUAD * GetPalette () const
bool GetPaletteColor (BYTE i, BYTE *r, BYTE *g, BYTE *b)
RGBQUAD GetPaletteColor (BYTE idx)
DWORD GetPaletteSize ()
CxImageGetParent () const
RGBQUAD GetPixelColor (long x, long y, bool bGetAlpha=true)
RGBQUAD GetPixelColorInterpolated (float x, float y, InterpolationMethod const inMethod=IM_BILINEAR, OverflowMethod const ofMethod=OM_BACKGROUND, RGBQUAD *const rplColor=0)
RGBQUAD GetPixelColorWithOverflow (long x, long y, OverflowMethod const ofMethod=OM_BACKGROUND, RGBQUAD *const rplColor=0)
BYTE GetPixelGray (long x, long y)
BYTE GetPixelIndex (long x, long y)
long GetProgress () const
long GetSize ()
RGBQUAD GetTransColor ()
long GetTransIndex () const
DWORD GetType () const
const TCHAR * GetVersion ()
const float GetVersionNumber ()
DWORD GetWidth () const
long GetXDPI () const
long GetYDPI () const
bool GrayScale ()
long Histogram (long *red, long *green=0, long *blue=0, long *gray=0, long colorspace=0)
bool HistogramEqualize ()
bool HistogramLog ()
bool HistogramNormalize ()
bool HistogramRoot ()
bool HistogramStretch (long method=0)
void HuePalette (float correction=1)
bool IncreaseBpp (DWORD nbit)
void InitTextInfo (CXTEXTINFO *txt)
bool IsEnabled () const
bool IsGrayScale ()
bool IsIndexed () const
bool IsInside (long x, long y)
bool IsSamePalette (CxImage &img, bool bCheckAlpha=true)
bool IsTransparent (long x, long y)
bool IsTransparent () const
bool IsValid () const
bool Jitter (long radius=2)
bool LayerCreate (long position=-1)
bool LayerDelete (long position=-1)
void LayerDeleteAll ()
bool Light (long brightness, long contrast=0)
bool Load (const TCHAR *filename, DWORD imagetype=0)
bool LoadResource (HRSRC hRes, DWORD imagetype, HMODULE hModule=NULL)
bool Lut (BYTE *pLutR, BYTE *pLutG, BYTE *pLutB, BYTE *pLutA=0)
bool Lut (BYTE *pLut)
HBITMAP MakeBitmap (HDC hdc=NULL)
float Mean ()
bool Median (long Ksize=3)
bool Mirror ()
void Mix (CxImage &imgsrc2, ImageOpType op, long lXOffset=0, long lYOffset=0, bool bMixAlpha=false)
void MixFrom (CxImage &imagesrc2, long lXOffset, long lYOffset)
bool Negative ()
bool Noise (long level)
CxImageoperator= (const CxImage &)
void OverflowCoordinates (long &x, long &y, OverflowMethod const ofMethod)
void OverflowCoordinates (float &x, float &y, OverflowMethod const ofMethod)
bool QIShrink (long newx, long newy, CxImage *const iDst=NULL)
bool RedEyeRemove ()
bool Repair (float radius=0.25f, long niterations=1, long colorspace=0)
bool Resample (long newx, long newy, int mode=1, CxImage *iDst=NULL)
bool Resample2 (long newx, long newy, InterpolationMethod const inMethod=IM_BICUBIC2, OverflowMethod const ofMethod=OM_REPEAT, CxImage *const iDst=NULL, bool const disableAveraging=false)
bool Rotate (float angle, CxImage *iDst=NULL)
bool Rotate180 (CxImage *iDst=NULL)
bool Rotate2 (float angle, CxImage *iDst=NULL, InterpolationMethod inMethod=IM_BILINEAR, OverflowMethod ofMethod=OM_BACKGROUND, RGBQUAD *replColor=0, bool const optimizeRightAngles=true, bool const bKeepOriginalSize=false)
bool RotateLeft (CxImage *iDst=NULL)
bool RotateRight (CxImage *iDst=NULL)
bool Save (const TCHAR *filename, DWORD imagetype)
bool SelectionAddColor (RGBQUAD c)
bool SelectionAddEllipse (RECT r)
bool SelectionAddPixel (int x, int y)
bool SelectionAddPolygon (POINT *points, long npoints)
bool SelectionAddRect (RECT r)
bool SelectionClear ()
bool SelectionCopy (CxImage &from)
bool SelectionCreate ()
bool SelectionDelete ()
void SelectionGetBox (RECT &r)
bool SelectionInvert ()
bool SelectionIsInside (long x, long y)
bool SelectionIsValid ()
bool SelectionSplit (CxImage *dest)
bool SelectionToHRGN (HRGN &region)
void SetClrImportant (DWORD ncolors=0)
bool SetCodecOption (DWORD opt, DWORD imagetype=0)
void SetEscape (long i)
void SetFlags (DWORD flags, bool bLockReservedFlags=true)
void SetFrame (long nFrame)
void SetFrameDelay (DWORD d)
void SetGrayPalette ()
void SetJpegQuality (BYTE q)
void SetJpegScale (BYTE q)
void SetOffset (long x, long y)
void SetPalette (rgb_color *rgb, DWORD nColors=256)
void SetPalette (RGBQUAD *pPal, DWORD nColors=256)
void SetPalette (DWORD n, BYTE *r, BYTE *g, BYTE *b)
void SetPaletteColor (BYTE idx, COLORREF cr)
void SetPaletteColor (BYTE idx, RGBQUAD c)
void SetPaletteColor (BYTE idx, BYTE r, BYTE g, BYTE b, BYTE alpha=0)
void SetPixelColor (long x, long y, COLORREF cr)
void SetPixelColor (long x, long y, RGBQUAD c, bool bSetAlpha=false)
void SetPixelIndex (long x, long y, BYTE i)
void SetProgress (long p)
void SetStdPalette ()
void SetTransColor (RGBQUAD rgb)
void SetTransIndex (long idx)
void SetXDPI (long dpi)
void SetYDPI (long dpi)
bool ShiftRGB (long r, long g, long b)
bool Skew (float xgain, float ygain, long xpivot=0, long ypivot=0, bool bEnableInterpolation=false)
bool SplitCMYK (CxImage *c, CxImage *m, CxImage *y, CxImage *k)
bool SplitHSL (CxImage *h, CxImage *s, CxImage *l)
bool SplitRGB (CxImage *r, CxImage *g, CxImage *b)
bool SplitXYZ (CxImage *x, CxImage *y, CxImage *z)
bool SplitYIQ (CxImage *y, CxImage *i, CxImage *q)
bool SplitYUV (CxImage *y, CxImage *u, CxImage *v)
long Stretch (HDC hdc, const RECT &rect, DWORD dwRop=SRCCOPY)
long Stretch (HDC hdc, long xoffset, long yoffset, long xsize, long ysize, DWORD dwRop=SRCCOPY)
void SwapIndex (BYTE idx1, BYTE idx2)
bool Threshold (BYTE level)
bool Thumbnail (long newx, long newy, RGBQUAD canvascolor, CxImage *iDst=0)
long Tile (HDC hdc, RECT *rc)
bool Transfer (CxImage &from)
bool UnsharpMask (float radius=5.0, float amount=0.5, int threshold=0)
virtual ~CxImage ()

Static Public Member Functions

RGBQUAD HSLtoRGB (RGBQUAD lHSLColor)
RGBQUAD HSLtoRGB (COLORREF cHSLColor)
float KernelBessel (const float x)
float KernelBessel_J1 (const float x)
float KernelBessel_Order1 (float x)
float KernelBessel_P1 (const float x)
float KernelBessel_Q1 (const float x)
float KernelBlackman (const float x)
float KernelBox (const float x)
float KernelBSpline (const float x)
float KernelCatrom (const float x)
float KernelCubic (const float t)
float KernelGaussian (const float x)
float KernelGeneralizedCubic (const float t, const float a=-1)
float KernelHamming (const float x)
float KernelHermite (const float x)
float KernelLanczosSinc (const float t, const float r=3)
float KernelLinear (const float t)
float KernelMitchell (const float x)
float KernelQuadratic (const float x)
float KernelSinc (const float x)
COLORREF RGBQUADtoRGB (RGBQUAD c)
RGBQUAD RGBtoHSL (RGBQUAD lRGBColor)
RGBQUAD RGBtoRGBQUAD (COLORREF cr)
RGBQUAD RGBtoXYZ (RGBQUAD lRGBColor)
RGBQUAD RGBtoYIQ (RGBQUAD lRGBColor)
RGBQUAD RGBtoYUV (RGBQUAD lRGBColor)
RGBQUAD XYZtoRGB (RGBQUAD lXYZColor)
RGBQUAD YIQtoRGB (RGBQUAD lYIQColor)
RGBQUAD YUVtoRGB (RGBQUAD lYUVColor)

Protected Member Functions

void AddAveragingCont (RGBQUAD const &color, float const surf, float &rr, float &gg, float &bb, float &aa)
void Bitfield2RGB (BYTE *src, WORD redmask, WORD greenmask, WORD bluemask, BYTE bpp)
BYTE BlindAlphaGet (const long x, const long y)
RGBQUAD BlindGetPixelColor (const long x, const long y)
BYTE BlindGetPixelIndex (const long x, const long y)
void * BlindGetPixelPointer (const long x, const long y)
void blur_line (float *ctable, float *cmatrix, int cmatrix_length, BYTE *cur_col, BYTE *dest_col, int y, long bytes)
void CopyInfo (const CxImage &src)
bool DFT (int dir, long m, double *x1, double *y1, double *x2, double *y2)
bool EncodeSafeCheck (CxFile *hFile)
bool FFT (int dir, int m, double *x, double *y)
int gen_convolve_matrix (float radius, float **cmatrix_p)
float * gen_lookup_table (float *cmatrix, int cmatrix_length)
void Ghost (CxImage *src)
bool IsPowerof2 (long x)
bool RepairChannel (CxImage *ch, float radius)
void RGBtoBGR (BYTE *buffer, int length)
void Startup (DWORD imagetype=0)

Static Protected Member Functions

int CompareColors (const void *elem1, const void *elem2)
float HueToRGB (float n1, float n2, float hue)

Protected Attributes

BITMAPINFOHEADER head
CXIMAGEINFO info
BYTE * pAlpha
void * pDib
CxImage ** pLayers
BYTE * pSelection

Private Types

typedef CxImage::tagCxImageInfo CXIMAGEINFO


Member Typedef Documentation

typedef struct CxImage::tagCxImageInfo CxImage::CXIMAGEINFO [private]
 

typedef struct CxImage::tagCxTextInfo CxImage::CXTEXTINFO
 


The documentation for this class was generated from the following files:
Generated on Mon Oct 11 22:30:18 2004 for CxImage by doxygen 1.3.8