diff --git a/modules/libpr0n/test/reftest/encoders-lossless/encoder.html b/modules/libpr0n/test/reftest/encoders-lossless/encoder.html new file mode 100644 index 00000000000..08b14898777 --- /dev/null +++ b/modules/libpr0n/test/reftest/encoders-lossless/encoder.html @@ -0,0 +1,112 @@ + + +Image reftest wrapper + + + + + + + + + diff --git a/modules/libpr0n/test/reftest/encoders-lossless/reftest.list b/modules/libpr0n/test/reftest/encoders-lossless/reftest.list new file mode 100644 index 00000000000..0ecf89b8fe9 --- /dev/null +++ b/modules/libpr0n/test/reftest/encoders-lossless/reftest.list @@ -0,0 +1,155 @@ +# Encoder ref tests +# These reftests must be run as HTTP because of canvas' origin-clean security +# file:// URLs are always considered from a different origin unless same URL +# +# The test will copy a PNG image to a canvas, then use canvas.toDataUrl to get +# the data, then set the data to a new image hence invoking the appropriate +# encoder. +# +# The tests should only be used with lossless encoders. +# +# Valid arguments for encoder.html in the query string: +# - img= +# - mime= +# - options= +# Example: +# encoder.html?img=escape(reference_image.png) +# &mime=escape(image/vnd.microsoft.icon) +# &options=escape(-moz-parse-options:bpp=24;format=png) + +# PNG +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/png +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/png +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/png +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/png +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/png +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/png +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/png +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/png +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/png +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/png +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/png +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/png +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/png +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/png +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/png + +# BMP using default parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp + +# BMP using image/bmp mime type and 32bpp parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 + +# BMP using image/bmp mime type and 24bpp parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 + +# ICO using default parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon + +# ICO using image/vnd.microsoft.icon mime type and 32bpp parse options with bmp +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp + +# ICO using image/vnd.microsoft.icon mime type and 24bpp parse options with bmp +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp + +# ICO using image/vnd.microsoft.icon mime type png +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng + diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-15x15.png b/modules/libpr0n/test/reftest/encoders-lossless/size-15x15.png new file mode 100644 index 00000000000..e1287430d05 Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-15x15.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-16x16.png b/modules/libpr0n/test/reftest/encoders-lossless/size-16x16.png new file mode 100644 index 00000000000..c04869e728e Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-16x16.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-17x17.png b/modules/libpr0n/test/reftest/encoders-lossless/size-17x17.png new file mode 100644 index 00000000000..00fb8e4f37a Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-17x17.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-1x1.png b/modules/libpr0n/test/reftest/encoders-lossless/size-1x1.png new file mode 100644 index 00000000000..c05f5fef89c Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-1x1.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-2x2.png b/modules/libpr0n/test/reftest/encoders-lossless/size-2x2.png new file mode 100644 index 00000000000..e512d3f9b4f Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-2x2.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-31x31.png b/modules/libpr0n/test/reftest/encoders-lossless/size-31x31.png new file mode 100644 index 00000000000..e4a86425144 Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-31x31.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-32x32.png b/modules/libpr0n/test/reftest/encoders-lossless/size-32x32.png new file mode 100644 index 00000000000..3a6fbe8ee9c Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-32x32.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-33x33.png b/modules/libpr0n/test/reftest/encoders-lossless/size-33x33.png new file mode 100644 index 00000000000..72ef7eb636f Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-33x33.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-3x3.png b/modules/libpr0n/test/reftest/encoders-lossless/size-3x3.png new file mode 100644 index 00000000000..cb42ec4f87c Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-3x3.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-4x4.png b/modules/libpr0n/test/reftest/encoders-lossless/size-4x4.png new file mode 100644 index 00000000000..e6afafd89ac Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-4x4.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-5x5.png b/modules/libpr0n/test/reftest/encoders-lossless/size-5x5.png new file mode 100644 index 00000000000..a844aff76dc Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-5x5.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-6x6.png b/modules/libpr0n/test/reftest/encoders-lossless/size-6x6.png new file mode 100644 index 00000000000..415c2d9c6ac Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-6x6.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-7x7.png b/modules/libpr0n/test/reftest/encoders-lossless/size-7x7.png new file mode 100644 index 00000000000..ab2f8927472 Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-7x7.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-8x8.png b/modules/libpr0n/test/reftest/encoders-lossless/size-8x8.png new file mode 100644 index 00000000000..fe2ff40a1dc Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-8x8.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/size-9x9.png b/modules/libpr0n/test/reftest/encoders-lossless/size-9x9.png new file mode 100644 index 00000000000..18ab4b25de8 Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/size-9x9.png differ diff --git a/modules/libpr0n/test/reftest/encoders-lossless/test.png b/modules/libpr0n/test/reftest/encoders-lossless/test.png new file mode 100644 index 00000000000..3a6fbe8ee9c Binary files /dev/null and b/modules/libpr0n/test/reftest/encoders-lossless/test.png differ diff --git a/modules/libpr0n/test/reftest/reftest.list b/modules/libpr0n/test/reftest/reftest.list index 753bd708fc7..960a44f1d3a 100644 --- a/modules/libpr0n/test/reftest/reftest.list +++ b/modules/libpr0n/test/reftest/reftest.list @@ -42,3 +42,7 @@ include generic/reftest.list # Color management test include color-management/reftest.list + +# Lossless encoders +include encoders-lossless/reftest.list +