summaryrefslogtreecommitdiffstats
path: root/image/test/reftest/encoders-lossless
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /image/test/reftest/encoders-lossless
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'image/test/reftest/encoders-lossless')
-rw-r--r--image/test/reftest/encoders-lossless/ImageDocument.css16
-rw-r--r--image/test/reftest/encoders-lossless/encoder.html113
-rw-r--r--image/test/reftest/encoders-lossless/reftest-stylo.list160
-rw-r--r--image/test/reftest/encoders-lossless/reftest.list159
-rw-r--r--image/test/reftest/encoders-lossless/size-15x15.pngbin0 -> 809 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-16x16.pngbin0 -> 879 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-17x17.pngbin0 -> 1000 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-1x1.pngbin0 -> 70 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-256x256.pngbin0 -> 5480 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-2x2.pngbin0 -> 83 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-31x31.pngbin0 -> 2936 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-32x32.pngbin0 -> 3106 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-33x33.pngbin0 -> 3303 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-3x3.pngbin0 -> 107 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-4x4.pngbin0 -> 136 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-5x5.pngbin0 -> 173 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-6x6.pngbin0 -> 218 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-7x7.pngbin0 -> 271 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-8x8.pngbin0 -> 313 bytes
-rw-r--r--image/test/reftest/encoders-lossless/size-9x9.pngbin0 -> 368 bytes
-rw-r--r--image/test/reftest/encoders-lossless/test.pngbin0 -> 3106 bytes
21 files changed, 448 insertions, 0 deletions
diff --git a/image/test/reftest/encoders-lossless/ImageDocument.css b/image/test/reftest/encoders-lossless/ImageDocument.css
new file mode 100644
index 000000000..9a41b4c16
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/ImageDocument.css
@@ -0,0 +1,16 @@
+body {
+ background: #222 url("chrome://global/skin/media/imagedoc-darknoise.png");
+ margin: 0;
+}
+
+img {
+ display: block;
+ position: absolute;
+ margin: auto;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background: hsl(0,0%,90%) url("chrome://global/skin/media/imagedoc-lightnoise.png");
+ color: #222;
+}
diff --git a/image/test/reftest/encoders-lossless/encoder.html b/image/test/reftest/encoders-lossless/encoder.html
new file mode 100644
index 000000000..6e07995ae
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/encoder.html
@@ -0,0 +1,113 @@
+<html class="reftest-wait">
+<head>
+ <title>Image reftest wrapper</title>
+ <link rel="stylesheet" href="ImageDocument.css">
+ <style type="text/css">
+ #image_from_encoder { background-color: rgb(10, 100, 250); }
+ </style>
+
+ <script>
+ // Parse out the URL command line params
+ // Valid options are:
+ // - img=<reference image to use>
+ // - mime=<mime type>
+ // - options=<canvas toDataURL encoder options>
+ // Example:
+ // encoder.html?img=escape(reference_image.png)
+ // &mime=escape(image/ico)
+ // &options=escape(-moz-parse-options:bpp=24;format=png)
+ var getVars = {};
+ function buildValue(sValue)
+ {
+ if (/^\s*$/.test(sValue)) {
+ return null;
+ }
+ if (/^(true|false)$/i.test(sValue)) {
+ return sValue.toLowerCase() === "true";
+ }
+ if (isFinite(sValue)) {
+ return parseFloat(sValue);
+ }
+ if (isFinite(Date.parse(sValue))) {
+ return new Date(sValue);
+ }
+ return sValue;
+ }
+ if (window.location.search.length > 1) {
+ var couple, couples = window.location.search.substr(1).split("&");
+ for (var couplId = 0; couplId < couples.length; couplId++) {
+ couple = couples[couplId].split("=");
+ getVars[unescape(couple[0])] = couple.length > 1 ?
+ buildValue(unescape(couple[1])) : null;
+ }
+ }
+
+ // Create the image that we will load the reference image to
+ var img = new Image();
+
+ // Create the canvas that we will draw the image img onto and
+ // eventually call toDataURL to invoke the encoder on
+ var canvas = document.createElement("canvas");
+
+ // Starts the test by loading the reference image
+ function runTest()
+ {
+ // Load the reference image to start the test
+ img.onload = onReferenceImageLoad;
+ img.onerror = onReferenceImageLoad;
+ img.src = getVars.img;
+ }
+
+ // Once the encoded image from the canvas is loaded we can
+ // let the reftest compare
+ function onEncodedImageLoad()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+
+ // Once the image loads async, we then draw the image onto the canvas,
+ // and call canvas.toDataURL to invoke the encoder, and then set a new
+ // image to the encoded data URL
+ function onReferenceImageLoad()
+ {
+ // mimeType will hold the mime type of which encoder to invoke
+ var mimeType = getVars.mime;
+ // parseOptions will hold the encoder options to use
+ var parseOptions = getVars.options;
+
+ // Obtain the canvas and draw the reference image
+ canvas.width = img.width;
+ canvas.height = img.height;
+ var ctx = canvas.getContext('2d')
+ ctx.drawImage(img, 0, 0);
+
+ // Obtain the data URL with parsing options if specified
+ var dataURL;
+ if (parseOptions)
+ dataURL = canvas.toDataURL(mimeType, parseOptions);
+ else
+ dataURL = canvas.toDataURL(mimeType);
+
+ // Setup async image loaded events
+ var image_from_encoder = document.getElementById('image_from_encoder');
+ image_from_encoder.onload = onEncodedImageLoad;
+ image_from_encoder.onerror = onEncodedImageLoad;
+
+ // Only set the image if we have the correct mime type
+ // because we want to fail the ref test if toDataURL fell
+ // back to image/png
+ if (dataURL.substring(0, mimeType.length+5) == "data:" + mimeType) {
+ // Set the image to the BMP data URL
+ image_from_encoder.src = dataURL;
+ } else {
+ // Blank image so that we won't have to timeout the reftest
+ image_from_encoder.src = "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D";
+ }
+ };
+ </script>
+</head>
+
+<body onload="runTest()">
+<img id="image_from_encoder">
+</body>
+</html>
diff --git a/image/test/reftest/encoders-lossless/reftest-stylo.list b/image/test/reftest/encoders-lossless/reftest-stylo.list
new file mode 100644
index 000000000..a2b36bcc4
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/reftest-stylo.list
@@ -0,0 +1,160 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+# 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=<reference image to use>
+# - mime=<mime type>
+# - options=<canvas toDataURL encoder 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
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+
+# BMP using default parse options
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+
+# BMP using image/bmp mime type and 32bpp parse options
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+
+# BMP using image/bmp mime type and 24bpp parse options
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+
+# ICO using default parse options
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+# skip HTTP == size-256x256.png size-256x256.png
+
+# ICO using image/vnd.microsoft.icon mime type and 32bpp parse options with bmp
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+# skip HTTP == size-256x256.png size-256x256.png
+
+# ICO using image/vnd.microsoft.icon mime type and 24bpp parse options with bmp
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+# skip HTTP == size-256x256.png size-256x256.png
+
+# ICO using image/vnd.microsoft.icon mime type png
+skip HTTP == size-1x1.png size-1x1.png
+HTTP == size-2x2.png size-2x2.png
+skip HTTP == size-3x3.png size-3x3.png
+skip HTTP == size-4x4.png size-4x4.png
+skip HTTP == size-5x5.png size-5x5.png
+skip HTTP == size-6x6.png size-6x6.png
+HTTP == size-7x7.png size-7x7.png
+fails skip HTTP == size-8x8.png size-8x8.png
+skip HTTP == size-9x9.png size-9x9.png
+skip HTTP == size-15x15.png size-15x15.png
+skip HTTP == size-16x16.png size-16x16.png
+skip HTTP == size-17x17.png size-17x17.png
+skip HTTP == size-31x31.png size-31x31.png
+skip HTTP == size-32x32.png size-32x32.png
+skip HTTP == size-33x33.png size-33x33.png
+# skip HTTP == size-256x256.png size-256x256.png
+
diff --git a/image/test/reftest/encoders-lossless/reftest.list b/image/test/reftest/encoders-lossless/reftest.list
new file mode 100644
index 000000000..6cd96d0de
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/reftest.list
@@ -0,0 +1,159 @@
+# 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=<reference image to use>
+# - mime=<mime type>
+# - options=<canvas toDataURL encoder 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
+HTTP == size-256x256.png encoder.html?img=size-256x256.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
+HTTP == size-256x256.png encoder.html?img=size-256x256.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
+HTTP == size-256x256.png encoder.html?img=size-256x256.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
+HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng
+
diff --git a/image/test/reftest/encoders-lossless/size-15x15.png b/image/test/reftest/encoders-lossless/size-15x15.png
new file mode 100644
index 000000000..e1287430d
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-15x15.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-16x16.png b/image/test/reftest/encoders-lossless/size-16x16.png
new file mode 100644
index 000000000..c04869e72
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-16x16.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-17x17.png b/image/test/reftest/encoders-lossless/size-17x17.png
new file mode 100644
index 000000000..00fb8e4f3
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-17x17.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-1x1.png b/image/test/reftest/encoders-lossless/size-1x1.png
new file mode 100644
index 000000000..c05f5fef8
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-1x1.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-256x256.png b/image/test/reftest/encoders-lossless/size-256x256.png
new file mode 100644
index 000000000..84bfada76
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-256x256.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-2x2.png b/image/test/reftest/encoders-lossless/size-2x2.png
new file mode 100644
index 000000000..e512d3f9b
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-2x2.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-31x31.png b/image/test/reftest/encoders-lossless/size-31x31.png
new file mode 100644
index 000000000..e4a864251
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-31x31.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-32x32.png b/image/test/reftest/encoders-lossless/size-32x32.png
new file mode 100644
index 000000000..3a6fbe8ee
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-32x32.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-33x33.png b/image/test/reftest/encoders-lossless/size-33x33.png
new file mode 100644
index 000000000..72ef7eb63
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-33x33.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-3x3.png b/image/test/reftest/encoders-lossless/size-3x3.png
new file mode 100644
index 000000000..cb42ec4f8
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-3x3.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-4x4.png b/image/test/reftest/encoders-lossless/size-4x4.png
new file mode 100644
index 000000000..e6afafd89
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-4x4.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-5x5.png b/image/test/reftest/encoders-lossless/size-5x5.png
new file mode 100644
index 000000000..a844aff76
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-5x5.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-6x6.png b/image/test/reftest/encoders-lossless/size-6x6.png
new file mode 100644
index 000000000..415c2d9c6
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-6x6.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-7x7.png b/image/test/reftest/encoders-lossless/size-7x7.png
new file mode 100644
index 000000000..ab2f89274
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-7x7.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-8x8.png b/image/test/reftest/encoders-lossless/size-8x8.png
new file mode 100644
index 000000000..fe2ff40a1
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-8x8.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/size-9x9.png b/image/test/reftest/encoders-lossless/size-9x9.png
new file mode 100644
index 000000000..18ab4b25d
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/size-9x9.png
Binary files differ
diff --git a/image/test/reftest/encoders-lossless/test.png b/image/test/reftest/encoders-lossless/test.png
new file mode 100644
index 000000000..3a6fbe8ee
--- /dev/null
+++ b/image/test/reftest/encoders-lossless/test.png
Binary files differ