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+
Am Sonntag, den 08.06.2008, 10:15 +0200 schrieb Eric Pouech:
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
You probably mean non-black pixels (from DDB), as the XImage we are getting the pixels from is a DDB, not a DIB. My suggestion to the fix is, to attach the right color table to the DDB in the first place. 1-bit monochrome DDBs seem to be black/white in windows. This is what my patch does (attached), I also sent it to you by private mail.
- zero out the end of lines (after last pixel up to next dword aligned bit)
I skipped this part, as you also suggest. There is no test currently that tests for this behaviour, and it is not needed to fix Easy Grade Pro. This should be a seperate patch, 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 ?
See the attachment. That's the message ready to go to wine-patches.
Regards, Michael Karcher