Its really a useful stuff.
>In this i want to include provision for TIFF,WMF formats.
How to include provision for that.
>I want to compare two images bit by bit,how to code for that.
> if the bit value differs,i have to mark the different bit as another color,and draw in a different file and display the resultant image.
Plase help me.
I'll be thank full if u reply for this.
I was very glad to find this DIB class. It saved me no end of grief writing my own. *However*, it does not serialize a DIB embedded in another file properly.
The first problem is that the CDib::Serialize function must call ar.Flush () before calling ar.GetFile (). This makes sure that the archive has written its buffer to the CFile.
The second problem is that CDib::Read ( CFile &file ) uses the file size from CFile::GetLength () instead of reading the bitmap file size from the BITMAPFILEHEADER.bfSize field. This means that an embedded BMP expects to read more data than there is in the bitmap. CDib::Read exits with an error.
I am using rich edit control in my application and facing problem in getting the Caret position in my rich edit cntrol. Actually I insert an HTML tag like <B> by clicking a button and want to save the caret position so that after inserting </B> tag i again go to the position in mid of <B> and </B> i.e. <B>|</B>.
Please some one help me in solving this problem.
Jamil Anwar from QAU.
I was wondering why you added the 256 * sizeof(RGBQUAD). I know that this is the size of the RGBQUAD portion of the BITMAPINFO structure, but it seems like that is already taken care of. From what I understand, bfOffBits is the number of bytes between the start of the bitmap file to the actual image. Therefore, if you take bfOffBits, subtract the size of the BITMAPFILEHEADER, AND add the size of the RGBQUAD section, you end up with the size of the BITMAPINFOHEADER plus twice the size of the RGBQUAD section.
Why did you do this?