How to we resize Image
- From: "kiran" <kiran.chikhale@xxxxxxxxx>
- Date: 17 Jan 2007 22:12:13 -0800
Hi all
How can we resize 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 bellow .
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;
}
}
Thanks in advance
Kiran chikhale
.
- Follow-Ups:
- Re: How to we resize Image
- From: Igor Tandetnik
- Re: How to we resize Image
- Prev by Date: Re: Tracing CComBSTR leaks
- Next by Date: Re: All about GIF file
- Previous by thread: .wav file not playing properly
- Next by thread: Re: How to we resize Image
- Index(es):