[2/2] gdi32/dib: Fix palette of 1bpp DIB in GetDIBits

Eric Pouech eric.pouech at orange.fr
Sun Jun 8 03:15:46 CDT 2008


Michael Karcher a écrit :
> Windows always generates a black/white palette for 1 bit DIBs
> generated from DDBs. Copying from the current palette only takes
> place for color DDBs (not explicitly mentioned in MSDN), and only
> if depth equal (MSDN states it, explicitly).
> ---
> As mentioned in [1/2], this series is intended to fix #6519, but a
> third patch is needed additionally to these two patches. The patch
> by Eric in the buglog does that job, but I think there is an "more
> obviously correct" solution to it. I let Eric submit a patch if he
> wants, as he tracked down the problem. If he tells me to go on, I
> will submit my version myself instead.
>   
I didn't retest after your two patches, but basically what my patch does is:
- ensure we convert non black pixels (from DIB) into white pixels (in 
monochrome bitmap) in all cases
- zero out the end of lines (after last pixel up to next dword aligned bit)

this bug (and the mentionned 3 patches) are IMO good candidates for 1.0
the last item of this patch is not mandatory here, and can be dropped 
before inclusion to 1.0 (if needed)

regarding this last patch and Michael comment: I'm only concerned with 
having the best fix in wine (who ever wrote it)
so what's your idea about the fix ?
A+

-- 
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)





More information about the wine-devel mailing list