Re: wrong color in images

> In-Reply-To: <20011018163027.2B4BFC@maiana.inrialpes.fr> 
> 
> I achieved -some- improvement by changing the encoding, as shown in the attached ZIP file. As before, this expands to a 2.5MB 24-bit Windows .BMP file. The background is now gray scale, but foreground still appears to contain too much red and blue. To get this result, I changed one source line: 
>  
>  bshift = 10; 
>  
> However, I'd guess that these original lines from WIN_MakeImage() already attempt to encode 5:6:5 - 
>  
>  rshift = 0; 
>  gshift = 5; 
>  bshift = 11; 
>  
> I'd be glad to test any specific changes to the code which you can suggest. Or, to develop and test more extensive changes on my own, some detailed documentation on color encoding would be helpful.

If you change the value of bshift, you should change masks values too in the 
following code:
	      if (IS_WIN95)
	      temp = (((r * 255) & 63488) |
		      (((g * 255) >> gshift) & 2016) |
		      (((b * 255) >> bshift) & 31));
	      else
	      temp = (((r << 8) & 63488) |
		      (((g << 8) >> gshift) & 2016) |
		      (((b << 8) >> bshift) & 31));

63488 becomes 31744 (binary value 11111 00000 00000 instead of 11111 000000 
00000)
2016 becomes 992 (binary value 11111 00000 instead of 111111 00000)

>  
> I've used the version of gifhandler.c extracted from amaya-src-5.1.tgz because WinCVS is advertised to require Windows 98. If this source file has been updated, do you know of any way to download the latest CVS under Windows 95?

No problem, you can compile on Windows 95 too.
You can also either download a new CVS version see 
http://www.w3.org/Amaya/User/cvs.html to know how to do that

> The easiest method for me would be if your team could revive the CVS Daily Snapshot.

I'd like to revive the CVS Daily Snapshot but that is not under my control. 
I'll renew the request to
our W3C administration team.


-- 
     Irene.

Received on Tuesday, 23 October 2001 03:51:50 UTC