Changeset 1980 for www


Ignore:
Timestamp:
Nov 16, 2007, 4:11:15 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added a 4-colour example to the grayscale dithering part.
Location:
www/study
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • www/study/part4.html

    r1976 r1980  
    154154come up with. </p>
    155155
     156<p> Finally, this is gamma-corrected 4-colour dithering: </p>
     157
     158<p style="text-align: center;">
     159  <img src="out4-2-3.png" width="256" height="256"
     160       class="inline" alt="Floyd-Steinberg, 4 colours, gamma-corrected" />
     161  <img src="grad4-2-3.png" width="32" height="256"
     162       class="inline" alt="Floyd-Steinberg, 4 colours, gamma-corrected gradient" />
     163</p>
     164
    156165<div style="float: left;">
    157166   <a href="part3.html">Error diffusion &lt;&lt;&lt;</a>
  • www/study/study.py

    r1979 r1980  
    442442# Output 4.2.1: gamma-corrected 2-colour Floyd-Steinberg
    443443# Output 4.2.2: gamma-corrected 3-colour Floyd-Steinberg
     444# Output 4.2.3: gamma-corrected 4-colour Floyd-Steinberg
    444445def test42x(src, mat, threshold):
    445446    (w, h) = src.size()
     
    495496test42x(lenna256bw, ERROR_FSTEIN, threshold_3).writePng("out4-2-2.png")
    496497test42x(gradient256bw, ERROR_FSTEIN, threshold_3).writePng("grad4-2-2.png")
     498test42x(lenna256bw, ERROR_FSTEIN, threshold_4).writePng("out4-2-3.png")
     499test42x(gradient256bw, ERROR_FSTEIN, threshold_4).writePng("grad4-2-3.png")
    497500
    498501# Pattern 5.0.1: 8-colour palette
Note: See TracChangeset for help on using the changeset viewer.