Board index » cppbuilder » How to resize GIF Image
kiran
CBuilder Developer |
How to resize GIF Image2007-01-17 08:55:25 PM cppbuilder111 Hi all HOw can we resize GIF Image . I can get the RGB Data of an image . I am using OleLoadPicture, GetDIBits functions to get the data. Plz help me to downsize the image say half the size of original image . code to store RGB data in buffer is as . RGB Data is in newbuf. Any help will be appticiated . Thanks Kiarn chikhale for (int i=0; i<newHeight; ++i) { for (int j=0; j<newWidth; ++j) { long lVal=0; memcpy(&lVal, &buf[nCount], 4); // Get the reverse order int b = GetRValue(lVal); int g = GetGValue(lVal); int r = GetBValue(lVal); lVal = RGB(b, g, r); memcpy(&newbuf[newCount], &lVal, 4); newCount+=4; nCount +=8; } } |