From: Robert H. <ha...@st...> - 2014-10-16 02:43:18
|
http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.8_2014.10.15.zip Definitely better. No more stray lines if the background is transparent, which is what counts. Do give this a try, Rolf. Still might find more ways to tweak the Floyd-Steinberg algorithm. I might take a look at what GIMP does and just copy that, but this was pretty fun to design, I have to say. Brandon, color dithering is when the number of unique colors is reduced to stay within some limit (255 in this case) and adjustments are made that approximate colors you do not have available. Your eye merges the color pixels to form colors that are not actually there. Think Renoir. It is really quite amazing. The red, green, and blue channels are separated, and a clever little algorithm does some "distribution of error" to do the magic. If you compare the two webcam images at http://chemapps.stolaf.edu/jmol/test/dither.htm you will see almost no difference. (Just click the 216 or 16777216 buttons.) I had no idea this was possible. What I figured out there was that rather than using 8 colors, we could use 216 (six for each color channel). The effect is an almost perfect reproduction, visually. Bob On Wed, Oct 15, 2014 at 6:11 PM, Robert Hanson <ha...@st...> wrote: > Well, dithering does produce artifacts. But they aren't visible generally. > If it is mangling the transparent color, though, that's something I need to > consider. That's probably a bug. > > On Wed, Oct 15, 2014 at 6:01 PM, Rolf Huehne <rh...@fl...> > wrote: > >> Am 16.10.14 00:29, schrieb Robert Hanson: >> > I don't know what the pink color is, but I'm guessing that is an >> > artifact of GIMP not transferring color. The dithering just can't do >> > that. Is what you have there, Rolf, a white background that you then >> > filled with color? >> > >> I added the pink color intentially as a second layer to make the dotted >> lines and holes better visible and then combined the two layers before >> saving. >> >> Regards, >> Rolf >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> > > > > -- > Robert M. Hanson > Larson-Anderson Professor of Chemistry > Chair, Department of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Department of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |