|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: colors.src,v 2.55 2010-12-16 19:16:40 bbos Exp $ --> |
| 3 | +<!-- $Id: colors.src,v 2.56 2011-03-04 01:20:17 bbos Exp $ --> |
4 | 4 | <head> |
5 | 5 | <title>Colors and backgrounds</title> |
6 | 6 | <meta name="editor" lang="tr" content="Tantek Çelik"> |
@@ -396,57 +396,6 @@ P { background: url("chess.png") gray 50% repeat fixed } |
396 | 396 | </pre> |
397 | 397 | </div> |
398 | 398 |
|
399 | | -<h2><a name="gamma-correction">Gamma correction</a></h2> |
400 | | - |
401 | | -<p><em>For information about gamma issues, please consult the |
402 | | -Gamma Tutorial in the PNG specification ([[PNG]]).</em></p> |
403 | | - |
404 | | - |
405 | | -<div class="note"><p> |
406 | | -<em><strong>Note.</strong> |
407 | | -In the computation of gamma correction, UAs displaying on a CRT |
408 | | -may assume an ideal CRT and ignore any effects on apparent gamma |
409 | | -caused by dithering. That means the minimal handling they need to do |
410 | | -on current platforms is: |
411 | | -</em> |
412 | | -</p> |
413 | | - <dl> |
414 | | - <dt> PC using MS-Windows</dt> |
415 | | - <dd> none</dd> |
416 | | - <dt> Unix using X11</dt> |
417 | | - <dd> none</dd> |
418 | | - <dt> Mac using QuickDraw</dt> |
419 | | - <dd> apply gamma 1.45 [[ICC42]] (ColorSync-savvy applications |
420 | | - may simply pass the sRGB ICC profile to ColorSync |
421 | | - to perform correct color correction)</dd> |
422 | | - <dt> SGI using X</dt> |
423 | | - <dd> apply the gamma value from |
424 | | - <tt>/etc/config/system.glGammaVal</tt> (the default value being |
425 | | - 1.70; applications running on Irix 6.2 or above may simply pass |
426 | | - the sRGB ICC profile to the color management system)</dd> |
427 | | - <dt> NeXT using NeXTStep</dt> |
428 | | - <dd> apply gamma 2.22</dd> |
429 | | - </dl> |
430 | | - |
431 | | -<p>"Applying gamma" means that each of the three R, G and B must be |
432 | | -converted to R'=R<sup>gamma</sup>, G'=G<sup>gamma</sup>, |
433 | | -B'=B<sup>gamma</sup>, before being handed to the OS. |
434 | | -</p> |
435 | | -<p>This may be done rapidly by building a 256-element lookup table |
436 | | -once per browser invocation thus: |
437 | | -</p> |
438 | | -<pre> |
439 | | -for i := 0 to 255 do |
440 | | - raw := i / 255.0; |
441 | | - corr := pow (raw, gamma); |
442 | | - table[i] := trunc (0.5 + corr * 255.0) |
443 | | -end |
444 | | -</pre> |
445 | | - |
446 | | -<p>which then avoids any need to do transcendental math per color |
447 | | -attribute, far less per pixel. |
448 | | -</p> |
449 | | -</div> |
450 | 399 | </body> |
451 | 400 | </html> |
452 | 401 | <!-- Keep this comment at the end of the file |
|
0 commit comments