I have written a monolithic printer driver.
An application is BitBlt-ing a monochrome, 8-bit bitmap.
I know it is monochrome because I asked the application developers.
When I query the XLATEOBJ* in BitBlt, I get 4 colors, 0xFFFFFF, 0xFEFFFF,
0xFAFAFA and 0xFAFAFA (in that order). I am querying it using the member
pulXlate, (the flXlate flag is set to XO_TABLE). I also tried querying it
using XLATEOBJ_cGetPalette with XO_SRCPALETTE. I get the same results.
It seems to me that the palette should consist of just 2 colors (the bitmap
data certainly only contains 2 different values).
So I am outputting the bitmap with an incorrect palette, and the results are
predictably incorrect.
A competitor's printer driver, when printing the same file from the same
application, outputs the same bitmap but with the palette consisting of only
2 colors (RGB(0,0,0) and RGB(255,255,255)).
If I print to file and then edit the output of my driver, and replace the
palette I generate with the one the competitor generates (and leave
everything else the same), the file prints correctly.
So my question is, what could be causing this and where should I look? How
can I find the correct palette information for this bitmap? All the rest of
the time, calling the XLATEOBJ for color information works correctly.
(In EnablePDEV, I set the hpalDefault member of the DEVINFO to the result
from EngCreatePalette(PAL_RGB, 0, 0, 0, 0, 0);)
Thanks in advance,
--
ScottR
Scott Robins