To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 13901
13900  |  13902
Subject: 
Re: Old Dithered Colors
Newsgroups: 
lugnet.cad
Date: 
Wed, 12 Jul 2006 19:09:29 GMT
Viewed: 
1205 times
  
In lugnet.cad, Michael Lachmann wrote:
I still believe that a program must not support the dithering as such.

I agree with this, if you mean that the program should calculate the "average"
color of the two dithered components.  (And this is what LDView has done all
along.)

I think a conversion of the RGB color values to CMY, than adding the colors
and
converting the result back to RGB should to the job.

I don't understand why you need to perform any color space conversion.  If you
ignore alpha, I use the following in LDView:

R = (int)((R1 + R2) / 2.0);
G = (int)((G1 + G2) / 2.0);
B = (int)((B1 + B2) / 2.0);

Since LDLite color macros allow for arbitrary alpha, my actual code is more
complicated than that (since all my final color calculation from dithered colors
is in one spot).  However, for the 256-511 color numbers, the above works fine.

If you want to do full support for for LDLite color macros, and calculate a
single RGB based on that, you can take a look at
LDLPalette::getBlendedColorComponent in the LDView source code here:

http://ldview.cvs.sourceforge.net/ldview/LDView/LDLoader/LDLPalette.cpp?revision=1.9&view=markup

--Travis



Message is in Reply To:
  Re: Old Dithered Colors
 
I still believe that a program must not support the dithering as such. In principle we could create a new color by mixing the two colors together. The reason I'm asking is, that without mixing I could make the rendering engine a bit faster, and also (...) (18 years ago, 12-Jul-06, to lugnet.cad)

9 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR