"apoorv" <araghuvanshi@nospam.quark.com> wrote in message
news:93fd5a20e8b0cc85250b6e2f65258a76@localhost.ta lkaboutprogramming.com...[color=blue]
> I am writing a imaging aplication on VC++.I have to display images and
> apply effects onto it.Images could be of any type like jpg,gif,bmp,psd...M
> uding createDibSection API.it requires BITMAPINFO struc as one of its
> parameters.Its working well(Images are successfully displayed) but my
> problem is that in certain images(of any type)they are skewed and becomes
> B/W(means Data corruption).U can see my code of populating BITMAPINFO and
> CreateDibSection...Can any body help me in solving the annoying probs.[/color]
Most likely this is related to a padding issue: on many systems, the
data for each row of pixels needs to be aligned to an address that
is a multiple of 2 (or 4). If data for a pixel row has an odd size,
padding bytes need to be inserted.
But, ahem, what was your C++ question ?
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form