Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/png/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  trns-chunk.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/png/trns-chunk.html


<!DOCTYPE html>
<title>PNG test: tRNS chunk</title>
<link rel="help" href="https://w3c.github.io/PNG-spec/#11tRNS">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
<body>

<h1>tRNS chunk handling</h1>
<p class="desc">test ignored high bits on lower bit depth tRNS</p>

<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>

<ul id="d"></ul>
<script>
var t = async_test("test ignored high bits on lower bit depth tRNS");
const img = new Image();
img.onload = () => {
  _addTest(function(canvas, ctx) {
    ctx.drawImage(img, 0, 0);

    var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;

    const pixel_expected = [255, 0, 0, 0];
    const epsilon = 2;

    _assertSame(pixel.length, pixel_expected.length, "pixel.length""pixel_expected.length");
    // Ignore the color channel comparisons.
    // The image itself stores 255 red, 0 green, 0 blue.
    // But there may not be a requirement that this be preserved
    // while decoding or through canvas processing.
    assert_approx_equals(pixel[3], pixel_expected[3], epsilon);
  });
};
img.src = "support/trns-high-bits-set.png";
</script>

Messung V0.5
C=94 H=91 G=92

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.