From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../tests/png/apng/resources/README.md | 14 + .../tests/png/apng/resources/generate.pl | 390 ++++++++ .../tests/png/apng/resources/source.html | 1014 ++++++++++++++++++++ 3 files changed, 1418 insertions(+) create mode 100644 testing/web-platform/tests/png/apng/resources/README.md create mode 100644 testing/web-platform/tests/png/apng/resources/generate.pl create mode 100644 testing/web-platform/tests/png/apng/resources/source.html (limited to 'testing/web-platform/tests/png/apng/resources') diff --git a/testing/web-platform/tests/png/apng/resources/README.md b/testing/web-platform/tests/png/apng/resources/README.md new file mode 100644 index 0000000000..ecd61795b1 --- /dev/null +++ b/testing/web-platform/tests/png/apng/resources/README.md @@ -0,0 +1,14 @@ +# Regenerating APNG Test Images + +## Test images + +Most of the APNG tests are a port to WPT of an [earlier testsuite by Philip Taylor](https://philip.html5.org/tests/apng/tests.html). The test images were autogenerated, and this directory contains what is needed to regenerate them: + +- ['source.html'](./source.html) which contains a human-readable description of each test file +- ['generate.pl'](./generate.pl) which uses [Cairo](https://www.cairographics.org/) to create the test images + +If this script is used to create additional images, not part of the original test suite, be aware that the generated files are automatically named as sequentially-numbered `nnn.png` so add any new ones _at the end_ to avoid changing the name of existing files. + +## Reference images + +The reference images were created by decompiling the APNG with [apngasm](https://github.com/apngasm/apngasm) into a series of static PNG representing the displayed state of each frame. The last one therefore represents the end state of the animation. Again this tool produces numbered files like `nn.png` so these were renamed in a more meaningful way (such as `darkblue.png`) to create the reference images. diff --git a/testing/web-platform/tests/png/apng/resources/generate.pl b/testing/web-platform/tests/png/apng/resources/generate.pl new file mode 100644 index 0000000000..631356fb7e --- /dev/null +++ b/testing/web-platform/tests/png/apng/resources/generate.pl @@ -0,0 +1,390 @@ +=pod +Copyright (c) 2007 Philip Taylor + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +=cut + +use strict; +use warnings; + +use Compress::Zlib(); +use Cairo; +use PDL qw(float byte); + +sub chunk { + my ($name, $data) = @_; + (pack 'N', length $data) . $name . $data . (pack 'N', Compress::Zlib::crc32($name . $data)); +} + +sub IHDR { + my ($img) = @_; + return chunk 'IHDR', pack 'NNCCCCC', + $img->{width}, $img->{height}, + $img->{bit_depth}, $img->{color_type}, + $img->{compression_method}, $img->{filter_method}, $img->{interlace_method}; +} + +sub gAMA { + my ($img) = @_; + return chunk 'gAMA', pack 'N', $img->{gamma}; +} + +sub sRGB { + my ($img) = @_; + return chunk 'sRGB', pack 'C', $img->{rendering_intent}; +} + +sub PLTE { + my ($img) = @_; + return chunk 'PLTE', pack 'C*', @{$img->{colours}}; +} + +sub tRNS { + my ($img) = @_; + return chunk 'tRNS', pack 'C*', @{$img->{values}}; +} + +sub IDAT { + my ($img) = @_; + return chunk 'IDAT', xdat_data($img); +} + +sub IDAT_split { + my ($img, $blocksize) = @_; + my $c = xdat_data($img); + my @out; + while (length $c) { + push @out, chunk 'IDAT', substr $c, 0, $blocksize, ''; + } + return @out; +} + +sub IEND { + my ($img) = @_; + return chunk 'IEND', ''; +} + +sub acTL { + my ($img) = @_; + return chunk 'acTL', pack 'NN', $img->{num_frames}, $img->{num_plays}; +} + +sub fcTL { + my ($img) = @_; + return chunk 'fcTL', pack 'NNNNNnnCC', + $img->{sequence_number}, + $img->{width}, $img->{height}, + $img->{x_offset}, $img->{y_offset}, + $img->{delay_num}, $img->{delay_den}, + $img->{dispose_op}, $img->{blend_op}; +} + +sub fdAT { + my ($img) = @_; + return chunk 'fdAT', (pack 'N', $img->{sequence_number}) . xdat_data($img); +} + +sub xdat_data { + my ($img) = @_; + return compress(filter($img->{image_data}, $img->{width}, $img->{height}, $img->{depth})); +} + +use constant DISPOSE_NONE => 0; +use constant DISPOSE_BACKGROUND => 1; +use constant DISPOSE_PREVIOUS => 2; +use constant BLEND_SOURCE => 0; +use constant BLEND_OVER => 1; + +sub filter { + my ($imagedata, $width, $height, $depth) = @_; + my $out = ''; + for my $scanline (0..$height-1) { + $out .= pack 'C', 0; + $out .= substr($imagedata, $scanline*$width*$depth/8, $width*$depth/8); + } + return $out; +} + +sub compress { + my ($filtered) = @_; + return Compress::Zlib::compress($filtered); +} + + +sub fix_bitmap { + my ($d) = @_; + # Flip BGRA->RGBA, and undo premultiplication + + my $pdl = float unpack 'C*', $d; + my $pdl2 = byte $pdl; + my $a = 255 / $pdl->mslice([3, -1, 4]); + $pdl2->mslice([0, -1, 4]) .= $pdl->mslice([2, -1, 4])*$a; + $pdl2->mslice([1, -1, 4]) .= $pdl->mslice([1, -1, 4])*$a; + $pdl2->mslice([2, -1, 4]) .= $pdl->mslice([0, -1, 4])*$a; + return ${(byte $pdl2)->get_dataref}; +=pod + my @d = unpack 'C*', $d; + my $a; + for (map $_*4, 0..$#d/4) { + if ($a = $d[$_+3]) { + $a = 255 / $a; + @d[$_, $_+1, $_+2] = ($d[$_+2]*$a, $d[$_+1]*$a, $d[$_]*$a); + } # else alpha=0 hence r=g=b=0, so nothing to do + } + return pack 'C*', @d; +=cut +} + +sub create_surface { + my ($w, $h, $type, @data) = @_; + my $surface = Cairo::ImageSurface->create('argb32', $w, $h); + my $cr = Cairo::Context->create($surface); + + if ($type eq 'red') { + ($type, @data) = ('solid', 1, 0, 0, 1); + } elsif ($type eq 'green') { + ($type, @data) = ('solid', 0, 1, 0, 1); + } elsif ($type eq 'blue') { + ($type, @data) = ('solid', 0, 0, 1, 1); + } elsif ($type eq 'cyan') { + ($type, @data) = ('solid', 0, 1, 1, 1); + } elsif ($type eq 'magenta') { + ($type, @data) = ('solid', 1, 0, 1, 1); + } elsif ($type eq 'yellow') { + ($type, @data) = ('solid', 1, 1, 0, 1); + } elsif ($type eq 'transparent') { + ($type, @data) = ('solid', 0, 0, 0, 0); + } + + if ($type eq 'solid') { + $cr->rectangle(0, 0, $w, $h); + $cr->set_source_rgba(@data); + $cr->fill; + } elsif ($type eq 'doublerect') { + $cr->rectangle(0, 0, $w, $h); + $cr->set_source_rgba(@data[0..3]); + $cr->fill; + $cr->rectangle(int($w/4), int($h/4), int($w/2), int($h/2)); + $cr->set_source_rgba(@data[4..7]); + $cr->fill; + } else { + die "Invalid create_surface type '$type'"; + } + return { width => $w, height => $h, depth => 32, data => fix_bitmap($surface->get_data) }; +} + +sub create_raw_surface { + my ($w, $h, $d, $data) = @_; + return { width => $w, height => $h, depth => $d, data => $data }; +} + +sub find_errors { + my (@img) = @_; + my @chunks; + { + my @img2 = @img; + push @chunks, [ splice @img2, 0, 2 ] while @img2; + } + + my $chunknames = join '', map "<$_->[0]>", @chunks; + + my @errors; + + my $has_actl = ($chunknames =~ //); + + if ($has_actl) { + # acTL must be before IDAT + if ($chunknames =~ /.*/) { + push @errors, "acTL after IDAT"; + } + + # Must have only one acTL (TODO: in spec?) + if ($chunknames =~ /.*/) { + push @errors, "More than one acTL"; + } + + my $num_frames = {@img}->{acTL}[0]; + + # num_frames > 0 + if ($num_frames <= 0) { + push @errors, "num_frames <= 0"; + } + + # num_frames = count(fcTL) + my $num_fctls = grep $_->[0] eq 'fcTL', @chunks; + if ($num_frames != $num_fctls) { + push @errors, "num_frames ($num_frames) != number of fcTLs ($num_fctls)"; + } + } + + # Check sequence numbers (start from 0, no duplicates or gaps) + my @seqnos; + for (grep { $_->[0] =~ /^(fcTL|fdAT|fdAT_split)$/ } @chunks) { + push @seqnos, $_->[1][0]; + } + if (@seqnos and (join ',', @seqnos) ne (join ',', 0..$#seqnos)) { + push @errors, "Incorrect sequence numbers"; + } + + return @errors; +} + +sub create_image { + my ($filename, @img) = @_; + my @chunks; + while (@img) { + my ($chunk, $data) = splice @img, 0, 2; + if ($chunk eq 'IHDR') { + push @chunks, IHDR { + width => $data->[0], + height => $data->[1], + bit_depth => defined $data->[2] ? $data->[2] : 8, + color_type => defined $data->[3] ? $data->[3] : 6, + compression_method => 0, + filter_method => 0, + interlace_method => 0, + }; + } elsif ($chunk eq 'IEND') { + push @chunks, IEND { } + } elsif ($chunk eq 'gAMA') { + push @chunks, gAMA { + gamma => int(100_000*$data->[0]), + }; + } elsif ($chunk eq 'sRGB') { + push @chunks, sRGB { + rendering_intent => $data->[0], + }; + } elsif ($chunk eq 'PLTE') { + push @chunks, PLTE { + colours => $data, + }; + } elsif ($chunk eq 'tRNS') { + push @chunks, tRNS { + values => $data, + }; + } elsif ($chunk eq 'acTL') { + push @chunks, acTL { + num_frames => $data->[0], + num_plays => $data->[1], + }; + } elsif ($chunk eq 'fcTL') { + push @chunks, fcTL { + sequence_number => $data->[0], + width => $data->[1], + height => $data->[2], + x_offset => $data->[3], + y_offset => $data->[4], + delay_num => $data->[5], + delay_den => $data->[6], + dispose_op => $data->[7], + blend_op => $data->[8], + }; + } elsif ($chunk eq 'IDAT') { + push @chunks, IDAT { + depth => $data->[0]{depth}, + width => $data->[0]{width}, + height => $data->[0]{height}, + image_data => $data->[0]{data}, + } + } elsif ($chunk eq 'IDAT_split') { + my $c = xdat_data { + depth => $data->[2]{depth}, + width => $data->[2]{width}, + height => $data->[2]{height}, + image_data => $data->[2]{data}, + }; + if ($data->[1] == -1) { + $c = substr $c, $data->[0]; + } else { + $c = substr $c, $data->[0], $data->[1] - $data->[0]; + } + push @chunks, chunk 'IDAT', $c; + } elsif ($chunk eq 'fdAT') { + push @chunks, fdAT { + sequence_number => $data->[0], + depth => $data->[1]{depth}, + width => $data->[1]{width}, + height => $data->[1]{height}, + image_data => $data->[1]{data}, + } + } elsif ($chunk eq 'fdAT_split') { + my $c = xdat_data { + depth => $data->[3]{depth}, + width => $data->[3]{width}, + height => $data->[3]{height}, + image_data => $data->[3]{data}, + }; + if ($data->[2] == -1) { + $c = substr $c, $data->[1]; + } else { + $c = substr $c, $data->[1], $data->[2] - $data->[1]; + } + push @chunks, chunk 'fdAT', (pack 'N', $data->[0]) . $c; + } else { + die "Invalid create_image chunk '$chunk'"; + } + } + open my $fh, '>', "images/$filename.png" or die $!; + binmode $fh; + print $fh "\211PNG\r\n\032\n", @chunks; +} + +use constant W => 128; +use constant H => 64; + +sub escape_html { + my ($t) = @_; + $t =~ s/&/&/g; + $t =~ s/} + #. qq{Did not load image.} # IE doesn't like this + . qq{Did not load image\n} + . qq{

(source)\n} + #. qq{

Expected errors: $errors\n} + ; +} +# TODO: regexping HTML is nasty - should use a better input data format instead +sub handle_html_case { + my ($title) = @_; + my $id = lc $title; + $id =~ s/[^a-z0-9]+/-/g; + $id =~ s/^-*(.*?)-*$/$1/g; + return qq{

\n

# $title\n}; +} + +open my $in, 'source.html' or die $!; +my $html = do { local $/; <$in> }; +$html =~ s/(.*?)<\/png>/handle_html_png($1)/seg; +$html =~ s/

\n

(.*?)\n/handle_html_case($1)/eg; +open my $out, '>', 'images/tests.html' or die $!; +print $out $html; \ No newline at end of file diff --git a/testing/web-platform/tests/png/apng/resources/source.html b/testing/web-platform/tests/png/apng/resources/source.html new file mode 100644 index 0000000000..cca7063cff --- /dev/null +++ b/testing/web-platform/tests/png/apng/resources/source.html @@ -0,0 +1,1014 @@ + +APNG tests + + +

This page is somewhat incomplete and quite possibly incorrect – use with caution. + +

APNG tests

+ +

For all these tests, wait at least a second after all the images have downloaded, before checking that the rendered output is correct. + +

Test output conventions: +A solid green 128×64 rectangle means success. +Any red means failure. +Anything else means you need to read the instructions. +"Transparent" is indicated by a light yellow background. + +

Sections of the relevant specifications are sometimes quoted when they clarify the expected behaviour. + +

Please don't link directly to the images in this page, since they may get renamed and will break any such links. + +

You can download the script and the source data for this page. + + +

Valid images

+ + +

Basic cases

+ +
+

Trivial static image. +

This should be solid green. + +IHDR => [W, H], +IDAT => [create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

Trivial animated image - one frame; using default image. +

This should be solid green. + +IHDR => [W, H], +acTL => [1, 0], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

Trivial animated image - one frame; ignoring default image. +

This should be solid green. + +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'green')], +IEND => [], + +

+ + +

IDAT, fdAT splitting

+

There may be multiple IDAT chunks; if so, they shall appear consecutively with no other intervening chunks. The compressed datastream is then the concatenation of the contents of the data fields of all the IDAT chunks.

+

The compressed datastream is then the concatenation of the contents of the data fields of all the `fdAT` chunks within a frame.

+ +
+

Basic split IDAT. +

This should be solid green. + +IHDR => [W, H], +IDAT_split => [0,32, create_surface(W, H, 'green')], +IDAT_split => [32,-1, create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

Split IDAT with zero-length chunk. +

This should be solid green. + +IHDR => [W, H], +IDAT_split => [0,32, create_surface(W, H, 'green')], +IDAT_split => [32,32, create_surface(W, H, 'green')], +IDAT_split => [32,-1, create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

Basic split fdAT. +

This should be solid green. + +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT_split => [1, 0,32, create_surface(W, H, 'green')], +fdAT_split => [2, 32,-1, create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

Split fdAT with zero-length chunk. +

This should be solid green. + + +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT_split => [1, 0,32, create_surface(W, H, 'green')], +fdAT_split => [2, 32,32, create_surface(W, H, 'green')], +fdAT_split => [3, 32,-1, create_surface(W, H, 'green')], +IEND => [], + +

+ + +

Dispose ops

+ +
+

APNG_DISPOSE_OP_NONE - basic. +

This should be solid green. + +IHDR => [W, H], +acTL => [3, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'green')], +fcTL => [3, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [4, create_surface(W, H, 'transparent')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_BACKGROUND - basic. +

This should be transparent. + +IHDR => [W, H], +acTL => [3, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 10, 100, DISPOSE_BACKGROUND, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'red')], +fcTL => [3, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [4, create_surface(W, H, 'transparent')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_BACKGROUND - final frame. +

This should be solid green. + +IHDR => [W, H], +acTL => [2, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 10, 100, DISPOSE_BACKGROUND, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_PREVIOUS - basic. +

This should be solid green. + +IHDR => [W, H], +acTL => [3, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'green')], +fcTL => [2, W, H, 0, 0, 10, 100, DISPOSE_PREVIOUS, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'red')], +fcTL => [4, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [5, create_surface(W, H, 'transparent')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_PREVIOUS - final frame. +

This should be solid green. + +IHDR => [W, H], +acTL => [2, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 10, 100, DISPOSE_PREVIOUS, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_PREVIOUS - first frame. +

This should be transparent. + +IHDR => [W, H], +acTL => [2, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_PREVIOUS, BLEND_OVER], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'transparent')], +IEND => [], + +

+ + +

Dispose ops and regions

+ +
+

APNG_DISPOSE_OP_NONE in region. +

This should be solid green. + +IHDR => [W, H], +acTL => [3, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'doublerect', 0,1,0,1, 1,0,0,1)], +fcTL => [1, W/2, H/2, W/4, H/4, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W/2, H/2, 'green')], +fcTL => [3, 1, 1, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [4, create_surface(1, 1, 'transparent')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_BACKGROUND before region. +

This should be transparent. + +IHDR => [W, H], +acTL => [2, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_BACKGROUND, BLEND_OVER], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, 1, 1, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(1, 1, 'transparent')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_BACKGROUND in region. +

This should be a solid blue rectangle containing a smaller transparent rectangle. + + +IHDR => [W, H], +acTL => [3, 1], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H, 'doublerect', 0,0,1,1, 1,0,0,1)], +fcTL => [1, W/2, H/2, W/4, H/4, 10, 100, DISPOSE_BACKGROUND, BLEND_OVER], +fdAT => [2, create_surface(W/2, H/2, 'red')], +fcTL => [3, 1, 1, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [4, create_surface(1, 1, 'transparent')], +IEND => [], + +

+ +
+

APNG_DISPOSE_OP_PREVIOUS in region. +

This should be solid green. + +IHDR => [W, H], +acTL => [3, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'green')], +fcTL => [2, W/2, H/2, W/4, H/4, 10, 100, DISPOSE_PREVIOUS, BLEND_OVER], +fdAT => [3, create_surface(W/2, H/2, 'red')], +fcTL => [4, 1, 1, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [5, create_surface(1, 1, 'transparent')], +IEND => [], + +

+ + +

Blend ops

+ +
+

APNG_BLEND_OP_SOURCE on solid colour. +

This should be solid green. + +IHDR => [W, H], +acTL => [2, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_SOURCE], +fdAT => [3, create_surface(W, H, 'green')], +IEND => [], + +

+ +
+

APNG_BLEND_OP_SOURCE on transparent colour. +

This should be transparent. + +IHDR => [W, H], +acTL => [2, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_SOURCE], +fdAT => [3, create_surface(W, H, 'transparent')], +IEND => [], + +

+ +
+

APNG_BLEND_OP_SOURCE on nearly-transparent colour. +

This should be very nearly transparent. + +IHDR => [W, H], +acTL => [2, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_SOURCE], +fdAT => [3, create_surface(W, H, 'solid', 0, 1, 0, 0.01)], +IEND => [], + +

+ +
+

APNG_BLEND_OP_OVER on solid and transparent colours. +

This should be solid green. + +IHDR => [W, H], +acTL => [2, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'green')], +fcTL => [2, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'transparent')], +IEND => [], + +

+ +
+

APNG_BLEND_OP_OVER repeatedly with nearly-transparent colours. +

This should be solid green. + +IHDR => [W, H], +acTL => [128, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'solid', 0, 1, 0, 1)], +(map { + (fcTL => [2+$_*2, W/2, H, 0, 0, 1, 100, DISPOSE_NONE, BLEND_OVER], + fdAT => [3+$_*2, create_surface(W/2, H, 'solid', 0, 1, 0, 0.01)]) +} 0..126), +IEND => [], + +

+ + +

Blending and gamma

+ +
+

APNG_BLEND_OP_OVER +

This should be solid slightly-dark green. + +IHDR => [W, H], +gAMA => [1], +acTL => [16, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'solid', 0, 1, 0, 1)], +(map { + (fcTL => [2+$_*2, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], + fdAT => [3+$_*2, create_surface(W, H, 'solid', 0, 0.9, 0, 0.5)]) +} 0..14), +IEND => [], + +

+ +
+

APNG_BLEND_OP_OVER +

This should be solid nearly-black. + +IHDR => [W, H], +gAMA => [1/2200], +acTL => [16, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +(map { + (fcTL => [2+$_*2, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], + fdAT => [3+$_*2, create_surface(W, H, 'solid', 0.9, 0, 0, 0.5)]) +} 0..14), +IEND => [], + +

+ + +

Chunk ordering

+ +
+

fcTL before acTL. +

This should be solid green. + +IHDR => [W, H], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +acTL => [2, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'green')], +IEND => [], + +

+ + +

Delays

+ +
+

Basic delays. +

This should flash blue for half a second, then yellow for one second, then repeat. + +IHDR => [W, H], +acTL => [4, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 50, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'blue')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'yellow')], +fcTL => [4, W, H, 0, 0, 10000, 20000, DISPOSE_NONE, BLEND_OVER], +fdAT => [5, create_surface(W, H, 'blue')], +fcTL => [6, W, H, 0, 0, 1, 1, DISPOSE_NONE, BLEND_OVER], +fdAT => [7, create_surface(W, H, 'yellow')], +IEND => [], + +

+ +
+

Rounding of division. +

This should flash blue for half a second, then yellow for one second, then repeat. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 1, 2, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'blue')], +fcTL => [2, W, H, 0, 0, 1, 1, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'yellow')], +IEND => [], + +

+ +
+

16-bit numerator/denominator. +

This should flash blue for half a second, then yellow for one second, then repeat. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 32767, 65534, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'blue')], +fcTL => [2, W, H, 0, 0, 65535, 65535, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'yellow')], +IEND => [], + +

+ +
+

Zero denominator. +

If the denominator is 0, it is to be treated as if it were 100

+

This should flash blue for half a second, then yellow for one second, then repeat. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 50, 0, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'blue')], +fcTL => [2, W, H, 0, 0, 1000, 1000, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'yellow')], +IEND => [], + +

+ +
+

Zero numerator. +

If the the value of the numerator is 0 the decoder should render the next frame as quickly as possible, though viewers may impose a reasonable lower bound.

+

This should flash cyan for a short period of time (perhaps zero), then magenta for the same short period of time, then blue for half a second, then yellow for one second, then repeat. + +IHDR => [W, H], +acTL => [4, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 0, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'cyan')], +fcTL => [2, W, H, 0, 0, 0, 0, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'magenta')], +fcTL => [4, W, H, 0, 0, 500, 1000, DISPOSE_NONE, BLEND_OVER], +fdAT => [5, create_surface(W, H, 'blue')], +fcTL => [6, W, H, 0, 0, 1000, 1000, DISPOSE_NONE, BLEND_OVER], +fdAT => [7, create_surface(W, H, 'yellow')], +IEND => [], + +

+ + +

num_plays

+ +
+

num_plays = 0 +

This should flash yellow for one second, then blue for one second, then repeat forever. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'yellow')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'blue')], +IEND => [], + +

+ +
+

num_plays = 1 +

When first loaded, this should flash yellow for one second, then stay blue forever. + +IHDR => [W, H], +acTL => [2, 1], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'yellow')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'blue')], +IEND => [], + +

+ +
+

num_plays = 2 +

When first loaded, this should flash yellow for one second, then blue for one second, then yellow for one second, then blue forever. + +IHDR => [W, H], +acTL => [2, 2], +IDAT => [create_surface(W, H, 'red')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'yellow')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'blue')], +IEND => [], + +

+ + +

Other depths and colour types

+ +
+

16-bit colour. +

This should be dark blue. + +IHDR => [W, H, 16, 6], +acTL => [2, 1], +IDAT => [create_raw_surface(W, H, 64, "\xFF\x00\x00\x00\x00\x00\xFF\xFF" x (W*H))], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_raw_surface(W, H, 64, "\x00\x00\x00\x00\x00\x00\xFF\xFF" x (W*H))], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_raw_surface(W, H, 64, "\x00\x00\x00\x00\xFF\xFF\x80\x00" x (W*H))], +IEND => [], + +

+ +
+

8-bit greyscale. +

This should be a solid grey rectangle containing a solid white rectangle. + +IHDR => [W, H, 8, 0], +acTL => [2, 1], +IDAT => [create_raw_surface(W, H, 8, "\x00\xFF" x (W*H/2))], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_raw_surface(W, H, 8, "\x80" x (W*H))], +fcTL => [2, W/2, H/2, W/4, H/4, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_raw_surface(W/2, H/2, 8, "\xFF" x (W*H/4))], +IEND => [], + +

+ +
+

8-bit greyscale and alpha, with blending. +

This should be solid grey. + +IHDR => [W, H, 8, 4], +acTL => [2, 1], +IDAT => [create_raw_surface(W, H, 16, "\x00\xFF\xFF\xFF" x (W*H/2))], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_raw_surface(W, H, 16, "\x00\xFF" x (W*H))], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_raw_surface(W, H, 16, "\xFF\x80" x (W*H))], +IEND => [], + +

+ +
+

2-color palette. +

This should be solid green. + +IHDR => [W, H, 1, 3], +PLTE => [255,0,0, 0,255,0], +acTL => [2, 1], +IDAT => [create_raw_surface(W, H, 1, "\x00" x (W*H/8))], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_raw_surface(W, H, 1, "\x00" x (W*H/8))], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_raw_surface(W, H, 1, "\xFF" x (W*H/8))], +IEND => [], + +

+ +
+

2-bit palette and alpha. +

This should be solid green. + +IHDR => [W, H, 2, 3], +PLTE => [255,0,0, 255,0,0, 0,255,0], +tRNS => [255, 0, 255], +acTL => [2, 1], +IDAT => [create_raw_surface(W, H, 2, "\x00" x (W*H/4))], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_raw_surface(W, H, 2, "\xAA" x (W*H/4))], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_raw_surface(W, H, 2, "\x55" x (W*H/4))], +IEND => [], + +

+ +
+

1-bit palette and alpha, with blending. +

This should be solid dark blue. + +IHDR => [W, H, 1, 3], +PLTE => [0,0,0, 0,0,255], +tRNS => [255, 128], +acTL => [2, 1], +IDAT => [create_raw_surface(W, H, 1, "\x00" x (W*H/8))], +fcTL => [0, W, H, 0, 0, 10, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_raw_surface(W, H, 1, "\x00" x (W*H/8))], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_raw_surface(W, H, 1, "\xFF" x (W*H/8))], +IEND => [], + +

+ + +

Invalid images

+ +
+

It is strongly recommended that when any error is encountered decoders should discard all subsequent frames, stop the animation, and revert to displaying the default image. A decoder which detects an error before the animation has started should display the default image. An error message may be displayed to the user if appropriate. +

+

(If some decoders accept broken images, it seems quite possible that people will create and distribute broken images, and then the error-handling would have to be reverse-engineered by other implementations; hence all these tests to ensure errors get detected properly.) +

For the following images, the default image (solid green) or an error should be displayed. + + +

Incorrect chunks

+ +
+

Missing acTL. + +IHDR => [W, H], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Repeated acTL. + +IHDR => [W, H], +acTL => [1, 0], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

acTL after IDAT. + +IHDR => [W, H], +IDAT => [create_surface(W, H, 'green')], +acTL => [1, 0], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Missing fcTL. +

Disabled for now, since it crashes Opera 9.5 alpha 1589 (bug 287173). + +

+ +
+

Repeated fcTL. + +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Missing fdAT. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fcTL => [1, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'red')], +IEND => [], + +

+ + +

num_frames

+ +
+

num_frames = 0; no default image. +

0 is not a valid value.

+ +IHDR => [W, H], +acTL => [0, 0], +IEND => [], + +
+ +
+

num_frames = 0; ignoring default image. +

0 is not a valid value.

+ +IHDR => [W, H], +acTL => [0, 0], +IDAT => [create_surface(W, H, 'green')], +IEND => [], + +
+ +
+

num_frames too low. +

This must equal the number of `fcTL` chunks. ... If this value does not equal the actual number of frames it should be treated as an error.

+ +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'red')], +IEND => [], + +
+ +
+

num_frames too high by 1. +

This must equal the number of `fcTL` chunks. ... If this value does not equal the actual number of frames it should be treated as an error.

+ +IHDR => [W, H], +acTL => [3, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'red')], +IEND => [], + +
+ +
+

num_frames too high by 2. +

This must equal the number of `fcTL` chunks. ... If this value does not equal the actual number of frames it should be treated as an error.

+ +IHDR => [W, H], +acTL => [4, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'red')], +IEND => [], + +
+ +
+

num_frames outside valid range. +

an "unsigned int" shall be a 32-bit unsigned integer in network byte order limited to the range 0 to (2^31)-1

+ +IHDR => [W, H], +acTL => [0x80000001, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +IEND => [], + +
+ + +

Sequence numbers

+ +
+

Not starting from 0. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [1, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'red')], +fcTL => [3, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [4, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Gap in sequence. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [4, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Duplicated sequence number. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Duplicated chunk. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [3, create_surface(W, H, 'red')], +fdAT => [3, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Reordered fdAT chunks. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT_split => [4, 32,-1, create_surface(W, H, 'red')], +fdAT_split => [3, 0,32, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Reordered sequence numbers. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +fcTL => [2, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT_split => [4, 0,32, create_surface(W, H, 'red')], +fdAT_split => [3, 32,-1, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

Separated fdAT and fcTL sequences. + +IHDR => [W, H], +acTL => [2, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [0, create_surface(W, H, 'red')], +fcTL => [1, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H, 'red')], +IEND => [], + +

+ + +

Invalid image-data sizes

+ +
+

Default image's fcTL size not matching IHDR. + +IHDR => [W, H], +acTL => [2, 0], +fcTL => [0, W, H/2, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +IDAT => [create_surface(W, H/2, 'red')], +fcTL => [1, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [2, create_surface(W, H, 'red')], +IEND => [], + +

+ +
+

fdAT too small. + +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H/2, 'red')], +IEND => [], + +

+ +
+

fdAT too large. + +IHDR => [W, H], +acTL => [1, 0], +IDAT => [create_surface(W, H, 'green')], +fcTL => [0, W, H, 0, 0, 100, 100, DISPOSE_NONE, BLEND_OVER], +fdAT => [1, create_surface(W, H*2, 'red')], +IEND => [], + +

+ + + +

References

+ \ No newline at end of file -- cgit v1.2.3