1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
| // Les actions
void Create(long width, long height);
void Create(CBitmapEx& bitmapEx);
void Create(CBitmapEx* pBitmapEx);
void Load(LPTSTR lpszBitmapFile);
void Load(LPBYTE lpBitmapData);
void Load(HBITMAP hBitmap);
void Save(LPTSTR lpszBitmapFile);
void Save(LPBYTE lpBitmapData);
void Save(HBITMAP& hBitmap);
// Les transformations
void Scale(long horizontalPercent=100, long verticalPercent=100);
void Rotate(long degrees=0, _PIXEL bgColor=_RGB(0,0,0));
void Crop(long x, long y, long width, long height);
void FlipHorizontal();
void FlipVertical();
void MirrorLeft();
void MirrorRight();
void MirrorTop();
void MirrorBottom();
// Les filtres
void Clear(_PIXEL clearColor=_RGB(0,0,0));
void Negative();
void Grayscale();
void Sepia(long depth=34);
void Emboss();
void Engrave();
void Pixelize(long size=4);
void Brightness(long brightness=0);
void Contrast(long contrast=0);
void Blur();
void GaussianBlur();
void Sharp();
void Colorize(_PIXEL color);
void Rank(BOOL bMinimum=TRUE);
void Spread(long distanceX=8, long distanceY=8);
void Offset(long offsetX=16, long offsetY=16);
void BlackAndWhite(long offset=128);
void EdgeDetect();
void GlowingEdges(long threshold=2, long scale=5);
void EqualizeHistogram(long levels=255);
void Median();
void Posterize(long levels=4);
void Solarize(long threshold=128);
// Traçer dans le bitmap
void Draw(HDC hDC);
void Draw(HDC hDC, long dstX, long dstY);
void Draw(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY);
void Draw(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY, long alpha);
void Draw(long dstX, long dstY, long dstWidth, long dstHeight,
CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth, long srcHeight);
void Draw(long dstX, long dstY, long dstWidth, long dstHeight,
CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth,
long srcHeight, long alpha);
void Draw(_QUAD dstQuad, CBitmapEx& bitmapEx);
void Draw(_QUAD dstQuad, CBitmapEx& bitmapEx, long alpha);
void Draw(_QUAD dstQuad, CBitmapEx& bitmapEx, long srcX, long srcY,
long srcWidth, long srcHeight);
void Draw(_QUAD dstQuad, CBitmapEx& bitmapEx, long srcX, long srcY,
long srcWidth, long srcHeight, long alpha);
void DrawTransparent(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY, _PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY, long alpha,
_PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(long dstX, long dstY, long dstWidth, long dstHeight,
CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth,
long srcHeight, _PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(long dstX, long dstY, long dstWidth, long dstHeight,
CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth,
long srcHeight, long alpha, _PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(_QUAD dstQuad, CBitmapEx& bitmapEx,
_PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(_QUAD dstQuad, CBitmapEx& bitmapEx, long alpha,
_PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(_QUAD dstQuad, CBitmapEx& bitmapEx, long srcX,
long srcY, long srcWidth, long srcHeight, _PIXEL transparentColor=_RGB(0,0,0));
void DrawTransparent(_QUAD dstQuad, CBitmapEx& bitmapEx, long srcX,
long srcY, long srcWidth, long srcHeight, long alpha,
_PIXEL transparentColor=_RGB(0,0,0));
void DrawBlended(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY, long startAlpha,
long endAlpha, DWORD mode=GM_NONE);
void DrawBlended(long dstX, long dstY, long dstWidth, long dstHeight,
CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth,
long srcHeight, long startAlpha, long endAlpha, DWORD mode=GM_NONE);
void DrawMasked(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY,
_PIXEL transparentColor=_RGB(255,255,255));
void DrawAlpha(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY, long alpha,
_PIXEL alphaColor=_RGB(0,0,0));
void DrawCombined(long dstX, long dstY, long width, long height,
CBitmapEx& bitmapEx, long srcX, long srcY, DWORD mode=CM_SRC_AND_DST);
void DrawCombined(long dstX, long dstY, long dstWidth, long dstHeight,
CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth,
long srcHeight, DWORD mode=CM_SRC_AND_DST);
void DrawTextA(long dstX, long dstY, LPSTR lpszText, _PIXEL textColor,
long textAlpha, LPTSTR lpszFontName, long fontSize,
BOOL bBold=FALSE, BOOL bItalic=FALSE);
void DrawTextW(long dstX, long dstY, LPWSTR lpszText,
_PIXEL textColor, long textAlpha, LPTSTR lpszFontName,
long fontSize, BOOL bBold=FALSE, BOOL bItalic=FALSE);
// Remplacement de couleur
void ReplaceColor(long x, long y, _PIXEL newColor,
long alpha=20, long error=100, BOOL bImage=TRUE);
// Les informations
LPBITMAPFILEHEADER GetFileInfo() {return &m_bfh;}
LPBITMAPINFOHEADER GetInfo() {return &m_bih;}
long GetWidth() {return m_bih.biWidth;}
long GetHeight() {return m_bih.biHeight;}
long GetPitch() {return m_iPitch;}
long GetBpp() {return m_iBpp;}
long GetPaletteEntries() {return m_iPaletteEntries;}
LPRGBQUAD GetPalette() {return m_lpPalette;}
DWORD GetSize() {return m_dwSize;}
LPBYTE GetData() {return m_lpData;}
void SetResampleMode(RESAMPLE_MODE mode=RM_NEARESTNEIGHBOUR)
{m_ResampleMode = mode;}
RESAMPLE_MODE GetResampleMode() {return m_ResampleMode;}
BOOL IsValid() {return (m_lpData != NULL);}
void GetRedChannel(LPBYTE lpBuffer);
void GetGreenChannel(LPBYTE lpBuffer);
void GetBlueChannel(LPBYTE lpBuffer);
void GetRedChannelHistogram(long lpBuffer[256], BOOL bPercent=FALSE);
void GetGreenChannelHistogram(long lpBuffer[256], BOOL bPercent=FALSE);
void GetBlueChannelHistogram(long lpBuffer[256], BOOL bPercent=FALSE);
// Accès par pixel
_PIXEL GetPixel(long x, long y);
void SetPixel(long x, long y, _PIXEL pixel); |
Partager