.NETGURU
8bit color support
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-drawing' list.


Alice Averbukh
-- Moved from [review-ngdocs] to [ngfx-drawing] by Alex Lowe <Click here to reveal e-mail address> --

Hi,I hope I'm posting to the right group and that someone from the Microsoft personnel can actually help me out.
I can't find anywhere in the documentation what support is offered for 8bit color.
I've created a little app in C# to display 256 shades of gray and although it works fine for 32 and 16 bit color,
when I switch to 8bit - it appears dithered.

I've tried using Color.FromArgb() with and withoug the alfa value -
colors are dithered;
ColorTraslator.FromHtml("hex value") - dithered;
when I use ColorTraslator.FromOle() (0-256) - all colors get mapped to
black.

I wonder if anyone can comment on what may be going on and what is a
possible solution for this. Is this a bug in .Net or is there a way to set up rendering hints or do something else of the sort?
I really need to resolve this quickly.

thanks!
Alice

Reply to this message...
 
    
Chris Garrett
Hi,

Do a search on MSDN - there are a couple of knowledge base articles about
indexed / 8bit colour

Chris

----- Original Message -----
From: "Alice Averbukh" <Click here to reveal e-mail address>
To: "ngfx-drawing" <Click here to reveal e-mail address>
Sent: Friday, August 09, 2002 4:41 PM
Subject: [ngfx-drawing] 8bit color support

> -- Moved from [review-ngdocs] to [ngfx-drawing] by Alex Lowe
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
    
Chris Garrett
This might help
http://support.microsoft.com/default.aspx?scid=kb;en-us;q319061
http://support.microsoft.com/default.aspx?scid=kb;en-us;q319591

--
PROUD TO BE A .NET DEVELOPER? want to reward a .NET developer for their
super-geek status or completing .NET training? Check out the .NET Geek
clothing and gifts at http://www.cafeshops.com/dotNETGeek All sorts of stuff
.. t-shirts, caps, mugs .. :O)

----- Original Message -----
From: "Chris Garrett" <Click here to reveal e-mail address>
To: "ngfx-drawing" <Click here to reveal e-mail address>
Sent: Monday, August 12, 2002 9:49 AM
Subject: [ngfx-drawing] Re: 8bit color support

[Original message clipped]

Reply to this message...
 
    
Pierre Fillion
Simply use this function (Convert to C# if you need)

'Converts an hex value to a .Net color
Public Function HexToColor(ByVal ColorValue As Integer) As Color

Return Color.FromArgb(ColorValue Mod &H100, (ColorValue / &H100) Mod &H100, (ColorValue / (&H100 ^ 2)) Mod &H100)

End Function

--------------------------------
From: Pierre Fillion
Reply to this message...
 
 
System.Drawing.Color




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification