if there is code to do it in petzold then just "learn" from it and rewrite it
yourself. if every windows program that was written from knowledge gleaned from
perzold had to follow that license (just read it) they would all have to give
credit to petzold! seriously... just look at it to learn the APIs. then write it
yourself, you should be in the clear! i won't tell <grin>

elrod

Mayhem & Chaos Coordinator wrote:

> It's official -- I'm stuck in the 7th plane of windoze hell. :-( Please
> help.
>
> I've got the task of getting the Theme ui supported under 256 color mode in
> windows. Shouldn't be a big deal, right? Wrong.
>
> The Theme ui may get bitmaps from several files and then blit then into an
> internal bitmap that eventually gets blitted onto a window. I would like to
> have theme designers be able to use 8,16, and 24 bit bitmaps in their
> themes. The theme ui should make sure everything looks good when it gets
> displayed.
>
> In 16 and 24 bit color modes this is not an issue. The problem arises when
> the theme ui tries to take several 16 or 25 bit color bitmaps and display
> them on an 8 bit display. I am currently using LoadImage to load the
> bitmap -- this converts the bitmap to a DDB which I use from there on out.
> However, when windows loads a 16 bit image and converts it to the DDB the
> image consequently looks horrible. I even get the palette from the DDB and
> realize the palette, but that does not seem to make any differnce.
>
> As I understand it, if I want to get an accurate logical palette for a 16/24
> bit bitmap that I load into memory, I need to quantize it down to a 8 bit
> image myself. Letting windows do it renders the color table useless.
>
> Do I really need to quantize the image myself? Or do I not quite understand
> the Win32 API properly? In either case, does anyone know of any GPL
> compatible code that would make my life easier? The petzold book has code to
> do all this shit, but the source license is not compatible with the GPL.
>
> Any help would be greatly appreciated.
>
> --ruaok         Freezerburn! All else is only icing. -- Soul Coughing
>
> Robert Kaye -- [EMAIL PROTECTED]  http://moon.eorbit.net/~robert

Reply via email to