Archive for the ‘VC++’ Category

Interpolation (Resizing) of a Bitmap image

To Change the Sharpness of R, G,B values of a Pixel of the image

To Change the Contrast of R, G, B values of a Pixel of the image

To Change the brightness of a Pixel of the imag

To Change the Gamma of R, G,B values of a Pixel of the image

To Change the Saturation of R, G, B values of a Pixel of the image

#define BCHANNEL 0 #define GCHANNEL 1 #define RCHANNEL 2 unsigned char Clip(int iVal) { return ( iVal > 255 ? 255 : ( iVal < 0 ) ? 0 : iVal) ; } //Pixel Functions int GetValue(int iX, int iY, int iImageWidth, int iImageHeight, int iChannel, int iBPP, BYTE *pbySrc) { Clip(iX); Clip(iY); return pbySrc[iY [...]

To generate Random float/double numbers in a given limit

RGB to YUV Conversion and YUV to RGB Conversion. This is mainly used in the multimedia domain, especially in Image and in Video.

To select a folder use the following code snippet where you want. BROWSEINFO stBrowseInfo; LPITEMIDLIST lpSelectedPid; TCHAR pszSelectedFolder[MAX_PATH]; stBrowseInfo.hwndOwner          = m_hWnd; stBrowseInfo.pidlRoot           = NULL; stBrowseInfo.pszDisplayName     = pszSelectedFolder; stBrowseInfo.lpszTitle          = _T( “Select Your Folder” ); stBrowseInfo.ulFlags            = BIF_RETURNONLYFSDIRS ; stBrowseInfo.lpfn               = NULL; stBrowseInfo.lParam             = 0; lpSelectedPid                   = SHBrowseForFolder( &stBrowseInfo ); SHGetPathFromIDList( lpSelectedPid, pszSelectedFolder ); m_csFolderName                  = [...]