Re: RGB's..........

new topic     » goto parent     » topic index » view thread      » older message » newer message

Patrick Quist wrote:

>I'm currently using this procedure to display a
>bitmap in a Win32Lib Window (Don't ask why... It's a long story)
>But RGB() does not return the right color.
>I use a normal Bitmap that I read with read_bitmap() from image.e

Just glanging at it, I wonder it the indexing to the palette is correct.
Perhaps the line:

>   tmp2=pal[pixels[i][j]]

should read:

>   tmp2=pal[pixels[i][j]+1]

since the values in pixel are (usually) zero based. It's unlikely that RGB()
isn't working - take a look at the code and you'll see why. But then,
anything's possible - I'm rather iffy about Win32 graphics, especially
working with bitmaps.

Hope this helps.

-- David Cuny

 BTW, thanks for the apology.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu