Colour problems with latest DIB fix
gerard.patel at nerim.net
Mon Oct 29 17:53:45 CST 2001
At 12:53 PM 29/10/2001 -0800, you wrote:
>> Anyway, the attached patch is displaying the failing picture correctly.
>> What do you think ?
> If I apply your patch, then I see that the red and blue are exchanged
>when I run vnc as:
> vncserver :1 -geometry 800x600 -depth 16 -pixelformat bgr565
Could you explain a bit more what you are doing ? I would like to
try the same but I don't see how to do it.
Also, if you use vnc to test, did you consider the possibility that vnc
could have a bug somewhere ?
> Without the patch everything is fine. I also checked the formula and
>I see nothing wrong with it (as long as you are on a little endian
>computer, but you don't have a big endian x86, do you? ;-).
Never heard that Amd is doing that :-)
> So the question is why doesn't it work on your system. Can you run
>The Sims (I assume it's with that the problem happens) with a +bitmap
>trace? Then look for cases where either the bmp or the dib has
>"depth=24". Then check the masks to see if they make sense. For example,
>do they match what you know of your X server. You may also put a trace
>in Convert_888_to_565_reverse and check that it is invoked at the right
>time. Do they have a bgr888 dib (unsupported in windows AFAIK, but,
>except for 1 or 2 shortcuts, supported in Wine)? Maybe it is the DIB
>masks that are wrong.
That's a bit involved for this evening :-/
> Also it would be great if you could run my test application and check
>whether it displays fine. The line to watch for is the sixth line
>(rgb888 dib to 565 rgb/bgr bmp and back).
I had (of course) a number of problems with your app.
First on my current computer - a Mandrake 8, with Xfree 4,
your procedure ran fine until it tried to link the thing and then it
reported that WinMain was missing. I changed in your code
'main' to 'WinMain' and all was well.
I tried then to do the same on my other computer (Suse 6.1 with
Xfree 3.3 and a hand-compiled glibc 2.1.3). No joy. Configure
always failed with libwine.so failing to find symbols like dlclose
and the like. I did not figure out what is happening, I just
copied the binary from my other box and it worked.
As for the results, what I see is 11 lines of 13 blocks of 4 colors :
black, red, green, blue. I guess that when you speak of red and
blue exchanged, you mean that in one of these blocks the red
and blue lines are exchanged, right ?
What is strange is that on both of my computers the display
of your app is the same with or without my patch. No line
exchanged that I can see.
> As for The Sims, if you can also check the -debugmsg +bitmap output
>and make sure it's coherent.
I don't have The Sims... I use a little freeware app that is not available
from the internet anymore, unfortunately :-/.
And again, that's a bit complex for today. I'll try later.
More information about the wine-devel