From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- image/test/browser/animated.gif | Bin 0 -> 71479 bytes image/test/browser/animated2.gif | Bin 0 -> 66647 bytes image/test/browser/big.png | Bin 0 -> 129497 bytes image/test/browser/browser.ini | 14 + image/test/browser/browser_bug666317.js | 140 ++ image/test/browser/browser_docshell_type_editor.js | 92 ++ image/test/browser/browser_image.js | 195 +++ image/test/browser/head.js | 26 + image/test/browser/image.html | 24 + image/test/browser/imageX2.html | 15 + image/test/crashtests/1205923-1.html | 36 + image/test/crashtests/1210745-1.gif | Bin 0 -> 23 bytes image/test/crashtests/1212954-1.svg | 16 + image/test/crashtests/1235605.gif | Bin 0 -> 2360 bytes image/test/crashtests/1241728-1.html | 17 + image/test/crashtests/1241729-1.bmp | Bin 0 -> 548 bytes image/test/crashtests/1241729-1.html | 5 + image/test/crashtests/1242093-1.html | 22 + image/test/crashtests/1242778-1.png | Bin 0 -> 15929 bytes image/test/crashtests/1249576-1.png | Bin 0 -> 1169 bytes image/test/crashtests/1251091-1.html | 51 + image/test/crashtests/1251091-1.png | Bin 0 -> 95370 bytes image/test/crashtests/1253362-1.html | 11 + image/test/crashtests/256-height.ico | Bin 0 -> 154 bytes image/test/crashtests/256-width.ico | Bin 0 -> 154 bytes image/test/crashtests/463696.bmp | Bin 0 -> 1272 bytes image/test/crashtests/523528-1.gif | Bin 0 -> 132 bytes image/test/crashtests/523528-2.gif | Bin 0 -> 132 bytes image/test/crashtests/570451.png | Bin 0 -> 114 bytes image/test/crashtests/681190.html | 10 + image/test/crashtests/694165-1.xhtml | 510 ++++++ image/test/crashtests/732319-1.html | 2 + image/test/crashtests/83804-1.gif | Bin 0 -> 37 bytes image/test/crashtests/844403-1.html | 10 + image/test/crashtests/856616.gif | Bin 0 -> 27 bytes image/test/crashtests/89341-1.gif | Bin 0 -> 769 bytes image/test/crashtests/944353.jpg | Bin 0 -> 610965 bytes image/test/crashtests/colormap-range.gif | Bin 0 -> 5657 bytes image/test/crashtests/crashtests.list | 51 + image/test/crashtests/delayedframe.sjs | 44 + image/test/crashtests/delaytest.html | 44 + image/test/crashtests/discardframe.htm | 1 + image/test/crashtests/ie.png | Bin 0 -> 466589 bytes .../test/crashtests/invalid-disposal-method-1.gif | Bin 0 -> 167 bytes .../test/crashtests/invalid-disposal-method-2.gif | Bin 0 -> 167 bytes .../test/crashtests/invalid-disposal-method-3.gif | Bin 0 -> 167 bytes image/test/crashtests/invalid-icc-profile.jpg | Bin 0 -> 2568 bytes .../test/crashtests/invalid-size-second-frame.gif | Bin 0 -> 673 bytes image/test/crashtests/invalid-size.gif | Bin 0 -> 329 bytes image/test/crashtests/invalid_ico_height.ico | Bin 0 -> 894 bytes image/test/crashtests/invalid_ico_width.ico | Bin 0 -> 894 bytes image/test/crashtests/multiple-png-hassize.ico | Bin 0 -> 18096 bytes image/test/crashtests/ownerdiscard.html | 49 + image/test/crashtests/threeframes-end.gif | Bin 0 -> 16 bytes image/test/crashtests/threeframes-start.gif | Bin 0 -> 92 bytes image/test/crashtests/truncated-second-frame.png | Bin 0 -> 72247 bytes image/test/crashtests/unsized-svg.svg | 1 + image/test/gtest/Common.cpp | 673 ++++++++ image/test/gtest/Common.h | 419 +++++ image/test/gtest/TestADAM7InterpolatingFilter.cpp | 671 ++++++++ image/test/gtest/TestCopyOnWrite.cpp | 235 +++ image/test/gtest/TestDecodeToSurface.cpp | 123 ++ image/test/gtest/TestDecoders.cpp | 669 ++++++++ image/test/gtest/TestDeinterlacingFilter.cpp | 672 ++++++++ image/test/gtest/TestDownscalingFilter.cpp | 231 +++ image/test/gtest/TestDownscalingFilterNoSkia.cpp | 57 + image/test/gtest/TestMetadata.cpp | 255 +++ image/test/gtest/TestRemoveFrameRectFilter.cpp | 327 ++++ image/test/gtest/TestSourceBuffer.cpp | 810 ++++++++++ image/test/gtest/TestStreamingLexer.cpp | 973 +++++++++++ image/test/gtest/TestSurfacePipeIntegration.cpp | 508 ++++++ image/test/gtest/TestSurfaceSink.cpp | 1491 +++++++++++++++++ .../gtest/animated-with-extra-image-sub-blocks.gif | Bin 0 -> 434 bytes image/test/gtest/corrupt-with-bad-bmp-height.ico | Bin 0 -> 41663 bytes image/test/gtest/corrupt-with-bad-bmp-width.ico | Bin 0 -> 41663 bytes image/test/gtest/corrupt.jpg | Bin 0 -> 2477 bytes image/test/gtest/downscaled.bmp | Bin 0 -> 30138 bytes image/test/gtest/downscaled.gif | Bin 0 -> 223 bytes image/test/gtest/downscaled.ico | Bin 0 -> 41662 bytes image/test/gtest/downscaled.icon | Bin 0 -> 40003 bytes image/test/gtest/downscaled.jpg | Bin 0 -> 6035 bytes image/test/gtest/downscaled.png | Bin 0 -> 1015 bytes image/test/gtest/first-frame-green.gif | Bin 0 -> 317 bytes image/test/gtest/first-frame-green.png | Bin 0 -> 364 bytes image/test/gtest/first-frame-padding.gif | Bin 0 -> 49 bytes image/test/gtest/green-1x1-truncated.gif | Bin 0 -> 53 bytes image/test/gtest/green.bmp | Bin 0 -> 30138 bytes image/test/gtest/green.gif | Bin 0 -> 156 bytes image/test/gtest/green.ico | Bin 0 -> 41662 bytes image/test/gtest/green.icon | Bin 0 -> 40002 bytes image/test/gtest/green.jpg | Bin 0 -> 361 bytes image/test/gtest/green.png | Bin 0 -> 255 bytes image/test/gtest/invalid-truncated-metadata.bmp | Bin 0 -> 54 bytes image/test/gtest/moz.build | 78 + image/test/gtest/no-frame-delay.gif | Bin 0 -> 317 bytes image/test/gtest/rle4.bmp | Bin 0 -> 3686 bytes image/test/gtest/rle8.bmp | Bin 0 -> 1288 bytes image/test/gtest/transparent-ico-with-and-mask.ico | Bin 0 -> 3262 bytes image/test/gtest/transparent-if-within-ico.bmp | Bin 0 -> 4234 bytes image/test/gtest/transparent.gif | Bin 0 -> 355 bytes image/test/gtest/transparent.png | Bin 0 -> 419 bytes image/test/mochitest/12M-pixels-1.png | Bin 0 -> 22467 bytes image/test/mochitest/12M-pixels-2.png | Bin 0 -> 22467 bytes image/test/mochitest/6M-pixels.png | Bin 0 -> 10147 bytes image/test/mochitest/INT32_MIN.bmp | Bin 0 -> 60 bytes image/test/mochitest/animated-gif-finalframe.gif | Bin 0 -> 72 bytes image/test/mochitest/animated-gif.gif | Bin 0 -> 146 bytes image/test/mochitest/animated-gif2.gif | Bin 0 -> 165 bytes .../mochitest/animated-gif_trailing-garbage.gif | Bin 0 -> 4030 bytes image/test/mochitest/animated1.gif | Bin 0 -> 4558 bytes image/test/mochitest/animated2.gif | Bin 0 -> 4558 bytes image/test/mochitest/animation.svg | 5 + image/test/mochitest/animationPolling.js | 414 +++++ image/test/mochitest/bad.jpg | Bin 0 -> 2477 bytes image/test/mochitest/big.png | Bin 0 -> 129497 bytes image/test/mochitest/blue.gif | Bin 0 -> 45 bytes image/test/mochitest/blue.png | Bin 0 -> 2745 bytes image/test/mochitest/bug1132427.gif | Bin 0 -> 634 bytes image/test/mochitest/bug1132427.html | 6 + image/test/mochitest/bug1180105-waiter.sjs | 24 + image/test/mochitest/bug1180105.sjs | 63 + image/test/mochitest/bug1217571-iframe.html | 17 + image/test/mochitest/bug1319025-ref.png | Bin 0 -> 347 bytes image/test/mochitest/bug1319025.png | Bin 0 -> 422 bytes image/test/mochitest/bug399925.gif | Bin 0 -> 1645 bytes image/test/mochitest/bug415761.ico | Bin 0 -> 766 bytes image/test/mochitest/bug468160.sjs | 6 + image/test/mochitest/bug478398_ONLY.png | Bin 0 -> 14139 bytes image/test/mochitest/bug490949-iframe.html | 7 + image/test/mochitest/bug490949.sjs | 33 + image/test/mochitest/bug496292-1.sjs | 32 + image/test/mochitest/bug496292-2.sjs | 32 + image/test/mochitest/bug496292-iframe-1.html | 7 + image/test/mochitest/bug496292-iframe-2.html | 7 + image/test/mochitest/bug496292-iframe-ref.html | 7 + image/test/mochitest/bug497665-iframe.html | 8 + image/test/mochitest/bug497665.sjs | 34 + image/test/mochitest/bug552605.sjs | 13 + image/test/mochitest/bug657191.sjs | 27 + image/test/mochitest/bug671906-iframe.html | 7 + image/test/mochitest/bug671906.sjs | 36 + image/test/mochitest/bug733553-informant.sjs | 15 + image/test/mochitest/bug733553.sjs | 104 ++ image/test/mochitest/bug767779.sjs | 56 + image/test/mochitest/bug89419-iframe.html | 7 + image/test/mochitest/bug89419.sjs | 13 + image/test/mochitest/bug900200-ref.png | Bin 0 -> 660 bytes image/test/mochitest/bug900200.png | Bin 0 -> 840 bytes image/test/mochitest/chrome.ini | 7 + image/test/mochitest/clear.gif | Bin 0 -> 321 bytes image/test/mochitest/clear.png | Bin 0 -> 622 bytes image/test/mochitest/clear2-results.gif | Bin 0 -> 177 bytes image/test/mochitest/clear2.gif | Bin 0 -> 219 bytes image/test/mochitest/damon.jpg | Bin 0 -> 2679 bytes image/test/mochitest/error-early.png | 1 + image/test/mochitest/filter-final.svg | 9 + image/test/mochitest/filter.svg | 9 + image/test/mochitest/first-frame-padding.gif | Bin 0 -> 49 bytes image/test/mochitest/green-background.html | 28 + image/test/mochitest/green.png | Bin 0 -> 255 bytes image/test/mochitest/grey.png | Bin 0 -> 256 bytes image/test/mochitest/ico-bmp-opaque.ico | Bin 0 -> 1094 bytes image/test/mochitest/ico-bmp-transparent.ico | Bin 0 -> 4286 bytes image/test/mochitest/iframe.html | 5 + image/test/mochitest/imgutils.js | 138 ++ image/test/mochitest/invalid.jpg | 1 + image/test/mochitest/keep.gif | Bin 0 -> 321 bytes image/test/mochitest/keep.png | Bin 0 -> 622 bytes image/test/mochitest/lime-anim-100x100-2.svg | 6 + image/test/mochitest/lime-anim-100x100.svg | 7 + image/test/mochitest/lime-css-anim-100x100.svg | 19 + image/test/mochitest/lime100x100.svg | 4 + image/test/mochitest/mochitest.ini | 158 ++ image/test/mochitest/opaque.bmp | Bin 0 -> 1086 bytes image/test/mochitest/over.png | Bin 0 -> 525 bytes image/test/mochitest/purple.gif | Bin 0 -> 86 bytes image/test/mochitest/red.gif | Bin 0 -> 43 bytes image/test/mochitest/red.png | Bin 0 -> 82 bytes image/test/mochitest/ref-iframe.html | 6 + image/test/mochitest/restore-previous.gif | Bin 0 -> 457 bytes image/test/mochitest/restore-previous.png | Bin 0 -> 622 bytes image/test/mochitest/rillybad.jpg | Bin 0 -> 11142 bytes image/test/mochitest/schrep.png | Bin 0 -> 38767 bytes image/test/mochitest/shaver.png | Bin 0 -> 52045 bytes image/test/mochitest/short_header.gif | Bin 0 -> 1488 bytes image/test/mochitest/source.png | Bin 0 -> 525 bytes image/test/mochitest/test_ImageContentLoaded.html | 28 + image/test/mochitest/test_animSVGImage.html | 122 ++ image/test/mochitest/test_animSVGImage2.html | 124 ++ image/test/mochitest/test_animation.html | 45 + image/test/mochitest/test_animation2.html | 49 + image/test/mochitest/test_animation_operators.html | 159 ++ .../test/mochitest/test_background_image_anim.html | 44 + image/test/mochitest/test_bug1132427.html | 96 ++ image/test/mochitest/test_bug1180105.html | 46 + image/test/mochitest/test_bug1217571.html | 44 + image/test/mochitest/test_bug399925.html | 105 ++ image/test/mochitest/test_bug415761.html | 98 ++ image/test/mochitest/test_bug435296.html | 81 + image/test/mochitest/test_bug466586.html | 58 + image/test/mochitest/test_bug468160.html | 29 + image/test/mochitest/test_bug478398.html | 85 + image/test/mochitest/test_bug490949.html | 112 ++ image/test/mochitest/test_bug496292.html | 130 ++ image/test/mochitest/test_bug497665.html | 92 ++ image/test/mochitest/test_bug552605-1.html | 56 + image/test/mochitest/test_bug552605-2.html | 53 + image/test/mochitest/test_bug553982.html | 39 + image/test/mochitest/test_bug601470.html | 45 + image/test/mochitest/test_bug614392.html | 43 + image/test/mochitest/test_bug657191.html | 34 + image/test/mochitest/test_bug671906.html | 71 + image/test/mochitest/test_bug733553.html | 92 ++ image/test/mochitest/test_bug767779.html | 44 + image/test/mochitest/test_bug865919.html | 53 + image/test/mochitest/test_bug89419-1.html | 68 + image/test/mochitest/test_bug89419-2.html | 68 + image/test/mochitest/test_bullet_animation.html | 56 + image/test/mochitest/test_changeOfSource.html | 62 + image/test/mochitest/test_changeOfSource2.html | 47 + image/test/mochitest/test_drawDiscardedImage.html | 85 + image/test/mochitest/test_error_events.html | 67 + image/test/mochitest/test_has_transparency.html | 168 ++ .../mochitest/test_image_crossorigin_data_url.html | 27 + image/test/mochitest/test_net_failedtoprocess.html | 51 + image/test/mochitest/test_removal_ondecode.html | 128 ++ image/test/mochitest/test_removal_onload.html | 128 ++ image/test/mochitest/test_short_gif_header.html | 35 + image/test/mochitest/test_staticClone.html | 41 + image/test/mochitest/test_svg_animatedGIF.html | 53 + .../test/mochitest/test_svg_filter_animation.html | 42 + .../mochitest/test_synchronized_animation.html | 128 ++ image/test/mochitest/test_undisplayed_iframe.html | 47 + image/test/mochitest/test_webcam.html | 68 + image/test/mochitest/test_xultree_animation.xhtml | 67 + image/test/mochitest/transparent.gif | Bin 0 -> 355 bytes image/test/mochitest/transparent.png | Bin 0 -> 419 bytes image/test/mochitest/webcam-simulacrum.sjs | 51 + image/test/reftest/ImageDocument.css | 16 + image/test/reftest/apng/bug411852-1-ref.png | Bin 0 -> 164 bytes image/test/reftest/apng/bug411852-1.png | Bin 0 -> 606 bytes image/test/reftest/apng/bug546272-ref.png | Bin 0 -> 712 bytes image/test/reftest/apng/bug546272.png | Bin 0 -> 1391 bytes image/test/reftest/apng/delaytest.html | 41 + image/test/reftest/apng/reftest-stylo.list | 7 + image/test/reftest/apng/reftest.list | 6 + .../blob/blob-uri-with-ref-param-notref.html | 41 + .../test/reftest/blob/blob-uri-with-ref-param.html | 40 + image/test/reftest/blob/image.png | Bin 0 -> 840 bytes image/test/reftest/blob/reftest-stylo.list | 8 + image/test/reftest/blob/reftest.list | 7 + image/test/reftest/bmp/1240629-1.bmp | Bin 0 -> 68 bytes image/test/reftest/bmp/1240629-2.bmp | Bin 0 -> 68 bytes .../reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp | Bin 0 -> 130 bytes .../reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png | Bin 0 -> 147 bytes .../reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp | Bin 0 -> 122 bytes .../reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png | Bin 0 -> 220 bytes .../reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp | Bin 0 -> 126 bytes .../reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png | Bin 0 -> 242 bytes .../reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp | Bin 0 -> 130 bytes .../reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png | Bin 0 -> 247 bytes .../reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp | Bin 0 -> 66 bytes .../reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico | Bin 0 -> 78 bytes .../reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png | Bin 0 -> 120 bytes .../reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp | Bin 0 -> 70 bytes .../reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png | Bin 0 -> 126 bytes .../reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp | Bin 0 -> 186 bytes .../reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png | Bin 0 -> 447 bytes .../reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp | Bin 0 -> 190 bytes .../reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png | Bin 0 -> 455 bytes .../reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp | Bin 0 -> 326 bytes .../reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png | Bin 0 -> 489 bytes .../reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp | Bin 0 -> 74 bytes .../reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png | Bin 0 -> 132 bytes .../reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp | Bin 0 -> 78 bytes .../reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png | Bin 0 -> 135 bytes .../reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp | Bin 0 -> 82 bytes .../reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png | Bin 0 -> 146 bytes .../reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp | Bin 0 -> 86 bytes .../reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png | Bin 0 -> 149 bytes .../reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp | Bin 0 -> 90 bytes .../reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png | Bin 0 -> 156 bytes .../reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp | Bin 0 -> 94 bytes .../reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png | Bin 0 -> 161 bytes .../reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp | Bin 0 -> 98 bytes .../reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png | Bin 0 -> 171 bytes .../bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp | Bin 0 -> 160 bytes image/test/reftest/bmp/bmp-1bpp/reftest-stylo.list | 22 + image/test/reftest/bmp/bmp-1bpp/reftest.list | 21 + .../bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp | Bin 0 -> 126 bytes .../reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp | Bin 0 -> 802 bytes .../reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png | Bin 0 -> 490 bytes .../reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp | Bin 0 -> 774 bytes .../reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png | Bin 0 -> 809 bytes .../reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp | Bin 0 -> 822 bytes .../reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png | Bin 0 -> 879 bytes .../reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp | Bin 0 -> 938 bytes .../reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png | Bin 0 -> 1000 bytes .../reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp | Bin 0 -> 58 bytes .../reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png | Bin 0 -> 70 bytes .../reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp | Bin 0 -> 70 bytes .../reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png | Bin 0 -> 83 bytes .../reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp | Bin 0 -> 3030 bytes .../reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png | Bin 0 -> 2936 bytes .../reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp | Bin 0 -> 3126 bytes .../reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png | Bin 0 -> 3106 bytes .../reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp | Bin 0 -> 3354 bytes .../reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png | Bin 0 -> 3303 bytes .../reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp | Bin 0 -> 90 bytes .../reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png | Bin 0 -> 107 bytes .../reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp | Bin 0 -> 102 bytes .../reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png | Bin 0 -> 136 bytes .../reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp | Bin 0 -> 134 bytes .../reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png | Bin 0 -> 173 bytes .../reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp | Bin 0 -> 174 bytes .../reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png | Bin 0 -> 218 bytes .../reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp | Bin 0 -> 222 bytes .../reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png | Bin 0 -> 271 bytes .../reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp | Bin 0 -> 246 bytes .../reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png | Bin 0 -> 313 bytes .../reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp | Bin 0 -> 306 bytes .../reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png | Bin 0 -> 368 bytes .../bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp | Bin 0 -> 3098 bytes .../test/reftest/bmp/bmp-24bpp/reftest-stylo.list | 22 + image/test/reftest/bmp/bmp-24bpp/reftest.list | 21 + .../bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp | Bin 0 -> 822 bytes .../reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp | Bin 0 -> 254 bytes .../reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png | Bin 0 -> 229 bytes .../reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp | Bin 0 -> 238 bytes .../reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png | Bin 0 -> 304 bytes .../reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp | Bin 0 -> 246 bytes .../reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png | Bin 0 -> 323 bytes .../reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp | Bin 0 -> 322 bytes .../reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png | Bin 0 -> 337 bytes .../reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp | Bin 0 -> 122 bytes .../reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png | Bin 0 -> 120 bytes .../reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp | Bin 0 -> 126 bytes .../reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png | Bin 0 -> 128 bytes .../reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp | Bin 0 -> 614 bytes .../reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png | Bin 0 -> 700 bytes .../reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp | Bin 0 -> 630 bytes .../reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png | Bin 0 -> 763 bytes .../reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp | Bin 0 -> 778 bytes .../reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png | Bin 0 -> 778 bytes .../reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp | Bin 0 -> 130 bytes .../reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png | Bin 0 -> 139 bytes .../reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp | Bin 0 -> 134 bytes .../reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png | Bin 0 -> 147 bytes .../reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp | Bin 0 -> 138 bytes .../reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png | Bin 0 -> 156 bytes .../reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp | Bin 0 -> 142 bytes .../reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png | Bin 0 -> 163 bytes .../reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp | Bin 0 -> 146 bytes .../reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png | Bin 0 -> 172 bytes .../reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp | Bin 0 -> 150 bytes .../reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png | Bin 0 -> 188 bytes .../reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp | Bin 0 -> 190 bytes .../reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png | Bin 0 -> 198 bytes .../bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp | Bin 0 -> 586 bytes image/test/reftest/bmp/bmp-4bpp/reftest-stylo.list | 25 + image/test/reftest/bmp/bmp-4bpp/reftest.list | 24 + .../reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp | Bin 0 -> 3686 bytes .../reftest/bmp/bmp-4bpp/rle4-delta-320x240.png | Bin 0 -> 886 bytes .../bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp | Bin 0 -> 246 bytes .../reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp | Bin 0 -> 1350 bytes .../reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png | Bin 0 -> 324 bytes .../reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp | Bin 0 -> 1318 bytes .../reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png | Bin 0 -> 325 bytes .../reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp | Bin 0 -> 1334 bytes .../reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png | Bin 0 -> 338 bytes .../reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp | Bin 0 -> 1418 bytes .../reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png | Bin 0 -> 372 bytes .../reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp | Bin 0 -> 1082 bytes .../reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png | Bin 0 -> 120 bytes .../reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp | Bin 0 -> 1086 bytes .../reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png | Bin 0 -> 131 bytes .../reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp | Bin 0 -> 2102 bytes .../reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png | Bin 0 -> 772 bytes .../reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp | Bin 0 -> 2102 bytes .../reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png | Bin 0 -> 754 bytes .../reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp | Bin 0 -> 2266 bytes .../reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png | Bin 0 -> 833 bytes .../reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp | Bin 0 -> 1090 bytes .../reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png | Bin 0 -> 150 bytes .../reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp | Bin 0 -> 1094 bytes .../reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png | Bin 0 -> 165 bytes .../reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp | Bin 0 -> 1118 bytes .../reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png | Bin 0 -> 169 bytes .../reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp | Bin 0 -> 1126 bytes .../reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png | Bin 0 -> 180 bytes .../reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp | Bin 0 -> 1134 bytes .../reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png | Bin 0 -> 194 bytes .../reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp | Bin 0 -> 1142 bytes .../reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png | Bin 0 -> 217 bytes .../reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp | Bin 0 -> 1186 bytes .../reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png | Bin 0 -> 229 bytes .../bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp | Bin 0 -> 1818 bytes image/test/reftest/bmp/bmp-8bpp/reftest-stylo.list | 25 + image/test/reftest/bmp/bmp-8bpp/reftest.list | 24 + .../bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp | Bin 0 -> 1384 bytes .../bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp | Bin 0 -> 1288 bytes .../bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp | Bin 0 -> 1334 bytes .../top-to-bottom-rle-bmp-size-32x32-8bpp.bmp | Bin 0 -> 1284 bytes .../test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp | Bin 0 -> 58 bytes .../invalid-compression-BITFIELDS.bmp | Bin 0 -> 78 bytes .../bmp/bmp-corrupted/invalid-compression-RLE4.bmp | Bin 0 -> 246 bytes .../bmp/bmp-corrupted/invalid-compression-RLE8.bmp | Bin 0 -> 246 bytes .../bmp/bmp-corrupted/invalid-compression.bmp | Bin 0 -> 822 bytes .../bmp/bmp-corrupted/invalid-signature.bmp | Bin 0 -> 58 bytes .../bmp-corrupted/invalid-truncated-metadata.bmp | Bin 0 -> 54 bytes .../reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp | Bin 0 -> 30 bytes .../reftest/bmp/bmp-corrupted/reftest-stylo.list | 19 + image/test/reftest/bmp/bmp-corrupted/reftest.list | 18 + image/test/reftest/bmp/bmp-corrupted/wrapper.html | 28 + image/test/reftest/bmp/bmpsuite/COPYING.txt | 675 ++++++++ image/test/reftest/bmp/bmpsuite/README.mozilla | 39 + image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/baddens1.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/baddens2.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp | Bin 0 -> 1086 bytes .../test/reftest/bmp/bmpsuite/b/badheadersize.bmp | Bin 0 -> 1112 bytes .../test/reftest/bmp/bmpsuite/b/badpalettesize.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/b/badplanes.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/badrle.bmp | Bin 0 -> 9212 bytes image/test/reftest/bmp/bmpsuite/b/badrle.png | Bin 0 -> 438 bytes image/test/reftest/bmp/bmpsuite/b/badwidth.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/pal1.png | Bin 0 -> 586 bytes image/test/reftest/bmp/bmpsuite/b/pal8.png | Bin 0 -> 3772 bytes image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp | Bin 0 -> 8650 bytes image/test/reftest/bmp/bmpsuite/b/pal8badindex.png | Bin 0 -> 1819 bytes image/test/reftest/bmp/bmpsuite/b/reallybig.bmp | Bin 0 -> 24630 bytes .../test/reftest/bmp/bmpsuite/b/reftest-stylo.list | 85 + image/test/reftest/bmp/bmpsuite/b/reftest.list | 84 + image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp | Bin 0 -> 8788 bytes image/test/reftest/bmp/bmpsuite/b/shortfile.bmp | Bin 0 -> 273 bytes image/test/reftest/bmp/bmpsuite/b/shortfile.png | Bin 0 -> 399 bytes image/test/reftest/bmp/bmpsuite/b/wrapper.html | 28 + image/test/reftest/bmp/bmpsuite/g/pal1.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/g/pal1.png | Bin 0 -> 586 bytes image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/g/pal1bg.png | Bin 0 -> 604 bytes image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/g/pal4.bmp | Bin 0 -> 4198 bytes image/test/reftest/bmp/bmpsuite/g/pal4.png | Bin 0 -> 1428 bytes image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp | Bin 0 -> 3836 bytes image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp | Bin 0 -> 9270 bytes image/test/reftest/bmp/bmpsuite/g/pal8.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/g/pal8.png | Bin 0 -> 3772 bytes .../reftest/bmp/bmpsuite/g/pal8nonsquare-e.png | Bin 0 -> 2513 bytes .../test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp | Bin 0 -> 5158 bytes .../test/reftest/bmp/bmpsuite/g/pal8nonsquare.png | Bin 0 -> 2714 bytes image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp | Bin 0 -> 8986 bytes image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp | Bin 0 -> 8788 bytes image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp | Bin 0 -> 9322 bytes image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp | Bin 0 -> 9338 bytes image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp | Bin 0 -> 8626 bytes image/test/reftest/bmp/bmpsuite/g/pal8w124.png | Bin 0 -> 3585 bytes image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp | Bin 0 -> 8998 bytes image/test/reftest/bmp/bmpsuite/g/pal8w125.png | Bin 0 -> 3628 bytes image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp | Bin 0 -> 9126 bytes image/test/reftest/bmp/bmpsuite/g/pal8w126.png | Bin 0 -> 3714 bytes .../test/reftest/bmp/bmpsuite/g/reftest-stylo.list | 113 ++ image/test/reftest/bmp/bmpsuite/g/reftest.list | 112 ++ image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/g/rgb16-565.png | Bin 0 -> 1297 bytes image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp | Bin 0 -> 17474 bytes image/test/reftest/bmp/bmpsuite/g/rgb16.bmp | Bin 0 -> 16438 bytes image/test/reftest/bmp/bmpsuite/g/rgb16.png | Bin 0 -> 1177 bytes image/test/reftest/bmp/bmpsuite/g/rgb24.bmp | Bin 0 -> 24630 bytes image/test/reftest/bmp/bmpsuite/g/rgb24.png | Bin 0 -> 1072 bytes image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp | Bin 0 -> 25654 bytes image/test/reftest/bmp/bmpsuite/g/rgb32.bmp | Bin 0 -> 32566 bytes image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp | Bin 0 -> 32578 bytes image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp | Bin 0 -> 1082 bytes image/test/reftest/bmp/bmpsuite/q/pal1p1.png | Bin 0 -> 124 bytes image/test/reftest/bmp/bmpsuite/q/pal2.bmp | Bin 0 -> 2118 bytes image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp | Bin 0 -> 4326 bytes image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png | Bin 0 -> 1465 bytes image/test/reftest/bmp/bmpsuite/q/pal8.png | Bin 0 -> 3772 bytes image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp | Bin 0 -> 9354 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp | Bin 0 -> 8974 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp | Bin 0 -> 9246 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp | Bin 0 -> 9278 bytes .../reftest/bmp/bmpsuite/q/pal8oversizepal.bmp | Bin 0 -> 9446 bytes image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp | Bin 0 -> 9212 bytes image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png | Bin 0 -> 3793 bytes .../test/reftest/bmp/bmpsuite/q/reftest-stylo.list | 131 ++ image/test/reftest/bmp/bmpsuite/q/reftest.list | 130 ++ image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/q/rgb16-231.png | Bin 0 -> 2643 bytes image/test/reftest/bmp/bmpsuite/q/rgb24.png | Bin 0 -> 1072 bytes image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp | Bin 0 -> 2457 bytes .../test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp | Bin 0 -> 25830 bytes image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp | Bin 0 -> 24743 bytes image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp | Bin 0 -> 1210 bytes image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp | Bin 0 -> 27782 bytes image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp | Bin 0 -> 32578 bytes .../test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp | Bin 0 -> 32566 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp | Bin 0 -> 16522 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png | Bin 0 -> 1093 bytes image/test/reftest/bmp/bmpsuite/q/rgba32.bmp | Bin 0 -> 32650 bytes image/test/reftest/bmp/bmpsuite/q/rgba32.png | Bin 0 -> 1229 bytes image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp | Bin 0 -> 32582 bytes image/test/reftest/bmp/bmpsuite/q/wrapper.html | 28 + image/test/reftest/bmp/bmpsuite/reftest-stylo.list | 8 + image/test/reftest/bmp/bmpsuite/reftest.list | 7 + image/test/reftest/bmp/reftest-stylo.list | 17 + image/test/reftest/bmp/reftest.list | 16 + image/test/reftest/color-management/color-curv.png | Bin 0 -> 1753 bytes image/test/reftest/color-management/color-lin.png | Bin 0 -> 1749 bytes .../test/reftest/color-management/color-table.png | Bin 0 -> 1754 bytes .../reftest/color-management/invalid-chrm-ref.png | Bin 0 -> 1460 bytes .../test/reftest/color-management/invalid-chrm.png | Bin 0 -> 1504 bytes .../color-management/invalid-whitepoint.png | Bin 0 -> 1504 bytes .../reftest/color-management/reftest-stylo.list | 8 + image/test/reftest/color-management/reftest.list | 7 + .../reftest/color-management/trc-type-ref.html | 8 + image/test/reftest/color-management/trc-type.html | 53 + image/test/reftest/colordepth.html | 16 + .../reftest/downscaling/black-border-bottom.png | Bin 0 -> 4094 bytes .../test/reftest/downscaling/black-border-left.png | Bin 0 -> 4176 bytes .../test/reftest/downscaling/black-border-rect.svg | 3 + .../reftest/downscaling/black-border-right.png | Bin 0 -> 4097 bytes .../test/reftest/downscaling/black-border-top.png | Bin 0 -> 4144 bytes .../reftest/downscaling/bmp-size-16x16-24bpp.png | Bin 0 -> 879 bytes .../reftest/downscaling/downscale-1-bigimage.png | Bin 0 -> 195 bytes .../test/reftest/downscaling/downscale-1-ref.html | 8 + .../reftest/downscaling/downscale-1-smallimage.png | Bin 0 -> 88 bytes image/test/reftest/downscaling/downscale-1.html | 24 + image/test/reftest/downscaling/downscale-16px.html | 28 + image/test/reftest/downscaling/downscale-2a.html | 31 + image/test/reftest/downscaling/downscale-2b.html | 31 + image/test/reftest/downscaling/downscale-2c.html | 31 + image/test/reftest/downscaling/downscale-2d.html | 31 + image/test/reftest/downscaling/downscale-2e.html | 31 + image/test/reftest/downscaling/downscale-2f.html | 31 + .../reftest/downscaling/downscale-32px-ref.html | 8 + image/test/reftest/downscaling/downscale-32px.html | 31 + image/test/reftest/downscaling/downscale-8px.html | 27 + .../downscaling/downscale-moz-icon-1-ref.html | 37 + .../reftest/downscaling/downscale-moz-icon-1.html | 19 + image/test/reftest/downscaling/downscale-png.html | 31 + .../reftest/downscaling/downscale-svg-1-ref.html | 13 + .../test/reftest/downscaling/downscale-svg-1a.html | 8 + .../test/reftest/downscaling/downscale-svg-1b.html | 8 + .../test/reftest/downscaling/downscale-svg-1c.html | 8 + .../test/reftest/downscaling/downscale-svg-1d.html | 8 + .../test/reftest/downscaling/downscale-svg-1e.html | 8 + .../test/reftest/downscaling/downscale-svg-1f.html | 8 + image/test/reftest/downscaling/ff-0RGB.ico | Bin 0 -> 4286 bytes image/test/reftest/downscaling/ff-0RGB.png | Bin 0 -> 2515 bytes image/test/reftest/downscaling/ff-ARGB.ico | Bin 0 -> 4286 bytes image/test/reftest/downscaling/ff-ARGB.png | Bin 0 -> 115 bytes .../reftest/downscaling/lime-red-256px-bmp-in.ico | Bin 0 -> 74814 bytes .../reftest/downscaling/lime-red-256px-png-in.ico | Bin 0 -> 881 bytes image/test/reftest/downscaling/lime-red-256px.bmp | Bin 0 -> 196730 bytes image/test/reftest/downscaling/lime-red-256px.gif | Bin 0 -> 873 bytes image/test/reftest/downscaling/lime-red-256px.jpg | Bin 0 -> 2865 bytes image/test/reftest/downscaling/lime-red-256px.png | Bin 0 -> 568 bytes image/test/reftest/downscaling/lime-red-256px.svg | 5 + image/test/reftest/downscaling/lime-red-32px.png | Bin 0 -> 103 bytes image/test/reftest/downscaling/png-interlaced.png | Bin 0 -> 806 bytes image/test/reftest/downscaling/png-normal.png | Bin 0 -> 421 bytes image/test/reftest/downscaling/reftest-stylo.list | 195 +++ image/test/reftest/downscaling/reftest.list | 193 +++ .../downscaling/top-to-bottom-16x16-24bpp.bmp | Bin 0 -> 822 bytes .../reftest/encoders-lossless/ImageDocument.css | 16 + image/test/reftest/encoders-lossless/encoder.html | 113 ++ .../reftest/encoders-lossless/reftest-stylo.list | 160 ++ image/test/reftest/encoders-lossless/reftest.list | 159 ++ .../test/reftest/encoders-lossless/size-15x15.png | Bin 0 -> 809 bytes .../test/reftest/encoders-lossless/size-16x16.png | Bin 0 -> 879 bytes .../test/reftest/encoders-lossless/size-17x17.png | Bin 0 -> 1000 bytes image/test/reftest/encoders-lossless/size-1x1.png | Bin 0 -> 70 bytes .../reftest/encoders-lossless/size-256x256.png | Bin 0 -> 5480 bytes image/test/reftest/encoders-lossless/size-2x2.png | Bin 0 -> 83 bytes .../test/reftest/encoders-lossless/size-31x31.png | Bin 0 -> 2936 bytes .../test/reftest/encoders-lossless/size-32x32.png | Bin 0 -> 3106 bytes .../test/reftest/encoders-lossless/size-33x33.png | Bin 0 -> 3303 bytes image/test/reftest/encoders-lossless/size-3x3.png | Bin 0 -> 107 bytes image/test/reftest/encoders-lossless/size-4x4.png | Bin 0 -> 136 bytes image/test/reftest/encoders-lossless/size-5x5.png | Bin 0 -> 173 bytes image/test/reftest/encoders-lossless/size-6x6.png | Bin 0 -> 218 bytes image/test/reftest/encoders-lossless/size-7x7.png | Bin 0 -> 271 bytes image/test/reftest/encoders-lossless/size-8x8.png | Bin 0 -> 313 bytes image/test/reftest/encoders-lossless/size-9x9.png | Bin 0 -> 368 bytes image/test/reftest/encoders-lossless/test.png | Bin 0 -> 3106 bytes .../reftest/generic/accept-image-catchall-ref.html | 12 + .../reftest/generic/accept-image-catchall.html | 13 + image/test/reftest/generic/check-header.sjs | 72 + image/test/reftest/generic/green.png | Bin 0 -> 201 bytes image/test/reftest/generic/reftest-stylo.list | 2 + image/test/reftest/generic/reftest.list | 1 + image/test/reftest/gif/1bit-255-trans.gif | Bin 0 -> 337 bytes image/test/reftest/gif/1bit-255-trans.png | Bin 0 -> 1214 bytes image/test/reftest/gif/ImageDocument.css | 16 + image/test/reftest/gif/animation1a.gif | Bin 0 -> 167 bytes image/test/reftest/gif/animation2a-finalframe.gif | Bin 0 -> 107 bytes image/test/reftest/gif/animation2a.gif | Bin 0 -> 167 bytes image/test/reftest/gif/blue.gif | Bin 0 -> 43 bytes image/test/reftest/gif/comment.gif | Bin 0 -> 68 bytes image/test/reftest/gif/comment.png | Bin 0 -> 167 bytes image/test/reftest/gif/delaytest.html | 41 + image/test/reftest/gif/in-colormap-trans.gif | Bin 0 -> 355 bytes image/test/reftest/gif/in-colormap-trans.png | Bin 0 -> 237 bytes image/test/reftest/gif/one-color-offset-ref.gif | Bin 0 -> 69 bytes image/test/reftest/gif/one-color-offset.gif | Bin 0 -> 49 bytes image/test/reftest/gif/out-of-colormap-trans.gif | Bin 0 -> 355 bytes image/test/reftest/gif/out-of-colormap-trans.png | Bin 0 -> 241 bytes image/test/reftest/gif/red.gif | Bin 0 -> 43 bytes image/test/reftest/gif/reftest-stylo.list | 57 + image/test/reftest/gif/reftest.list | 29 + .../reftest/gif/small-background-size-2-ref.gif | Bin 0 -> 807 bytes image/test/reftest/gif/small-background-size-2.gif | Bin 0 -> 572 bytes .../test/reftest/gif/small-background-size-ref.gif | Bin 0 -> 1076 bytes image/test/reftest/gif/small-background-size.gif | Bin 0 -> 991 bytes image/test/reftest/gif/test_bug641198.html | 53 + image/test/reftest/gif/tile-transform-ref.html | 12 + image/test/reftest/gif/tile-transform.html | 12 + image/test/reftest/gif/tiletest-ref.png | Bin 0 -> 282 bytes image/test/reftest/gif/tiletest.gif | Bin 0 -> 156 bytes .../gif/transparent-animation-finalframe.gif | Bin 0 -> 121 bytes image/test/reftest/gif/transparent-animation.gif | Bin 0 -> 527 bytes .../gif/truncated-framerect-interlaced-ref.gif | Bin 0 -> 927 bytes .../reftest/gif/truncated-framerect-interlaced.gif | Bin 0 -> 927 bytes image/test/reftest/gif/truncated-framerect-ref.gif | Bin 0 -> 929 bytes .../test/reftest/gif/truncated-framerect-ref.html | 33 + image/test/reftest/gif/truncated-framerect.gif | Bin 0 -> 929 bytes image/test/reftest/gif/truncated-framerect.html | 28 + image/test/reftest/ico/cur/pointer.cur | Bin 0 -> 4286 bytes image/test/reftest/ico/cur/pointer.png | Bin 0 -> 453 bytes image/test/reftest/ico/cur/reftest-stylo.list | 5 + image/test/reftest/ico/cur/reftest.list | 4 + image/test/reftest/ico/cur/wrapper.html | 27 + .../ico-not-square-transparent-1bpp.ico | Bin 0 -> 182 bytes .../ico-not-square-transparent-1bpp.png | Bin 0 -> 241 bytes .../ico-bmp-1bpp/ico-partial-transparent-1bpp.ico | Bin 0 -> 326 bytes .../ico-bmp-1bpp/ico-partial-transparent-1bpp.png | Bin 0 -> 410 bytes .../ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico | Bin 0 -> 190 bytes .../ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png | Bin 0 -> 220 bytes .../ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico | Bin 0 -> 198 bytes .../ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png | Bin 0 -> 242 bytes .../ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico | Bin 0 -> 206 bytes .../ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png | Bin 0 -> 247 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico | Bin 0 -> 78 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png | Bin 0 -> 120 bytes .../ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico | Bin 0 -> 16454 bytes .../ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png | Bin 0 -> 7673 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico | Bin 0 -> 86 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png | Bin 0 -> 126 bytes .../ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico | Bin 0 -> 318 bytes .../ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png | Bin 0 -> 447 bytes .../ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico | Bin 0 -> 326 bytes .../ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png | Bin 0 -> 455 bytes .../ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico | Bin 0 -> 598 bytes .../ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png | Bin 0 -> 489 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico | Bin 0 -> 94 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png | Bin 0 -> 132 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico | Bin 0 -> 102 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png | Bin 0 -> 135 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico | Bin 0 -> 110 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png | Bin 0 -> 146 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico | Bin 0 -> 118 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png | Bin 0 -> 149 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico | Bin 0 -> 126 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png | Bin 0 -> 156 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico | Bin 0 -> 134 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png | Bin 0 -> 161 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico | Bin 0 -> 142 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png | Bin 0 -> 171 bytes .../ico/ico-bmp-1bpp/ico-transparent-1bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-1bpp/ico-transparent-1bpp.png | Bin 0 -> 195 bytes .../reftest/ico/ico-bmp-1bpp/reftest-stylo.list | 25 + image/test/reftest/ico/ico-bmp-1bpp/reftest.list | 23 + .../ico-not-square-transparent-24bpp.ico | Bin 0 -> 1126 bytes .../ico-not-square-transparent-24bpp.png | Bin 0 -> 514 bytes .../ico-partial-transparent-24bpp.ico | Bin 0 -> 3262 bytes .../ico-partial-transparent-24bpp.png | Bin 0 -> 1028 bytes .../ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico | Bin 0 -> 842 bytes .../ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png | Bin 0 -> 809 bytes .../ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico | Bin 0 -> 894 bytes .../ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png | Bin 0 -> 879 bytes .../ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico | Bin 0 -> 1014 bytes .../ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png | Bin 0 -> 1000 bytes .../ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico | Bin 0 -> 70 bytes .../ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png | Bin 0 -> 70 bytes .../ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico | Bin 0 -> 204862 bytes .../ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png | Bin 0 -> 5480 bytes .../ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico | Bin 0 -> 86 bytes .../ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png | Bin 0 -> 83 bytes .../ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico | Bin 0 -> 3162 bytes .../ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png | Bin 0 -> 2936 bytes .../ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png | Bin 0 -> 3106 bytes .../ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico | Bin 0 -> 3626 bytes .../ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png | Bin 0 -> 3303 bytes .../ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico | Bin 0 -> 110 bytes .../ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png | Bin 0 -> 107 bytes .../ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico | Bin 0 -> 126 bytes .../ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png | Bin 0 -> 136 bytes .../ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico | Bin 0 -> 162 bytes .../ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png | Bin 0 -> 173 bytes .../ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico | Bin 0 -> 206 bytes .../ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png | Bin 0 -> 218 bytes .../ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico | Bin 0 -> 258 bytes .../ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png | Bin 0 -> 271 bytes .../ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico | Bin 0 -> 286 bytes .../ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png | Bin 0 -> 313 bytes .../ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico | Bin 0 -> 350 bytes .../ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png | Bin 0 -> 368 bytes .../ico/ico-bmp-24bpp/ico-transparent-24bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-24bpp/ico-transparent-24bpp.png | Bin 0 -> 195 bytes .../reftest/ico/ico-bmp-24bpp/reftest-stylo.list | 24 + image/test/reftest/ico/ico-bmp-24bpp/reftest.list | 23 + .../ico-not-square-transparent-32bpp.ico | Bin 0 -> 1462 bytes .../ico-not-square-transparent-32bpp.png | Bin 0 -> 533 bytes .../ico-partial-transparent-32bpp.ico | Bin 0 -> 4286 bytes .../ico-partial-transparent-32bpp.png | Bin 0 -> 1028 bytes .../ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico | Bin 0 -> 1022 bytes .../ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png | Bin 0 -> 809 bytes .../ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico | Bin 0 -> 1150 bytes .../ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png | Bin 0 -> 879 bytes .../ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico | Bin 0 -> 1286 bytes .../ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png | Bin 0 -> 1000 bytes .../ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico | Bin 0 -> 70 bytes .../ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png | Bin 0 -> 70 bytes .../ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico | Bin 0 -> 270398 bytes .../ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png | Bin 0 -> 5480 bytes .../ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico | Bin 0 -> 86 bytes .../ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png | Bin 0 -> 83 bytes .../ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico | Bin 0 -> 4030 bytes .../ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png | Bin 0 -> 2936 bytes .../ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico | Bin 0 -> 4286 bytes .../ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png | Bin 0 -> 3106 bytes .../ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico | Bin 0 -> 4682 bytes .../ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png | Bin 0 -> 3303 bytes .../ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico | Bin 0 -> 110 bytes .../ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png | Bin 0 -> 107 bytes .../ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico | Bin 0 -> 142 bytes .../ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png | Bin 0 -> 136 bytes .../ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico | Bin 0 -> 182 bytes .../ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png | Bin 0 -> 173 bytes .../ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico | Bin 0 -> 230 bytes .../ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png | Bin 0 -> 218 bytes .../ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico | Bin 0 -> 286 bytes .../ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png | Bin 0 -> 271 bytes .../ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico | Bin 0 -> 350 bytes .../ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png | Bin 0 -> 313 bytes .../ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico | Bin 0 -> 422 bytes .../ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png | Bin 0 -> 368 bytes .../ico/ico-bmp-32bpp/ico-transparent-32bpp.ico | Bin 0 -> 4286 bytes .../ico/ico-bmp-32bpp/ico-transparent-32bpp.png | Bin 0 -> 195 bytes .../reftest/ico/ico-bmp-32bpp/reftest-stylo.list | 23 + image/test/reftest/ico/ico-bmp-32bpp/reftest.list | 22 + .../ico-not-square-transparent-4bpp.ico | Bin 0 -> 350 bytes .../ico-not-square-transparent-4bpp.png | Bin 0 -> 315 bytes .../ico-bmp-4bpp/ico-partial-transparent-4bpp.ico | Bin 0 -> 766 bytes .../ico-bmp-4bpp/ico-partial-transparent-4bpp.png | Bin 0 -> 556 bytes .../ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico | Bin 0 -> 306 bytes .../ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png | Bin 0 -> 304 bytes .../ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico | Bin 0 -> 318 bytes .../ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png | Bin 0 -> 323 bytes .../ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico | Bin 0 -> 398 bytes .../ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png | Bin 0 -> 337 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico | Bin 0 -> 134 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png | Bin 0 -> 120 bytes .../ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico | Bin 0 -> 41086 bytes .../ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png | Bin 0 -> 16944 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico | Bin 0 -> 142 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png | Bin 0 -> 128 bytes .../ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico | Bin 0 -> 746 bytes .../ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png | Bin 0 -> 700 bytes .../ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico | Bin 0 -> 766 bytes .../ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png | Bin 0 -> 763 bytes .../ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico | Bin 0 -> 1050 bytes .../ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png | Bin 0 -> 778 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico | Bin 0 -> 150 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png | Bin 0 -> 139 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico | Bin 0 -> 158 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png | Bin 0 -> 147 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico | Bin 0 -> 166 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png | Bin 0 -> 156 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico | Bin 0 -> 174 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png | Bin 0 -> 163 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico | Bin 0 -> 182 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png | Bin 0 -> 172 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico | Bin 0 -> 190 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png | Bin 0 -> 188 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico | Bin 0 -> 234 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png | Bin 0 -> 198 bytes .../ico/ico-bmp-4bpp/ico-transparent-4bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-4bpp/ico-transparent-4bpp.png | Bin 0 -> 195 bytes .../reftest/ico/ico-bmp-4bpp/reftest-stylo.list | 24 + image/test/reftest/ico/ico-bmp-4bpp/reftest.list | 23 + .../ico-not-square-transparent-8bpp.ico | Bin 0 -> 1478 bytes .../ico-not-square-transparent-8bpp.png | Bin 0 -> 514 bytes .../ico-bmp-8bpp/ico-partial-transparent-8bpp.ico | Bin 0 -> 2238 bytes .../ico-bmp-8bpp/ico-partial-transparent-8bpp.png | Bin 0 -> 983 bytes .../ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico | Bin 0 -> 1386 bytes .../ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png | Bin 0 -> 809 bytes .../ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico | Bin 0 -> 1406 bytes .../ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png | Bin 0 -> 903 bytes .../ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico | Bin 0 -> 1494 bytes .../ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png | Bin 0 -> 964 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico | Bin 0 -> 1094 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png | Bin 0 -> 70 bytes .../ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico | Bin 0 -> 74814 bytes .../ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png | Bin 0 -> 22443 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico | Bin 0 -> 1102 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png | Bin 0 -> 83 bytes .../ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico | Bin 0 -> 2238 bytes .../ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png | Bin 0 -> 1546 bytes .../ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico | Bin 0 -> 2238 bytes .../ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png | Bin 0 -> 1530 bytes .../ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico | Bin 0 -> 2538 bytes .../ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png | Bin 0 -> 1632 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico | Bin 0 -> 1110 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png | Bin 0 -> 107 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico | Bin 0 -> 1118 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png | Bin 0 -> 136 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico | Bin 0 -> 1146 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png | Bin 0 -> 173 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico | Bin 0 -> 1158 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png | Bin 0 -> 218 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico | Bin 0 -> 1170 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png | Bin 0 -> 271 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico | Bin 0 -> 286 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png | Bin 0 -> 313 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico | Bin 0 -> 1230 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png | Bin 0 -> 368 bytes .../ico/ico-bmp-8bpp/ico-transparent-8bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-8bpp/ico-transparent-8bpp.png | Bin 0 -> 195 bytes .../reftest/ico/ico-bmp-8bpp/reftest-stylo.list | 25 + image/test/reftest/ico/ico-bmp-8bpp/reftest.list | 23 + image/test/reftest/ico/ico-bmp-corrupted/16x16.png | Bin 0 -> 879 bytes .../reftest/ico/ico-bmp-corrupted/invalid-bpp.ico | Bin 0 -> 86 bytes .../ico-bmp-corrupted/invalid-compression-RLE4.ico | Bin 0 -> 86 bytes .../ico-bmp-corrupted/invalid-compression-RLE8.ico | Bin 0 -> 86 bytes .../ico/ico-bmp-corrupted/invalid-compression.ico | Bin 0 -> 830 bytes .../ico/ico-bmp-corrupted/reftest-stylo.list | 11 + .../reftest/ico/ico-bmp-corrupted/reftest.list | 10 + .../reftest/ico/ico-bmp-corrupted/wrapper.html | 80 + image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico | Bin 0 -> 17542 bytes image/test/reftest/ico/ico-mixed/mixed-bmp-png.png | Bin 0 -> 629 bytes .../test/reftest/ico/ico-mixed/mixed-bmp-png32.png | Bin 0 -> 940 bytes .../test/reftest/ico/ico-mixed/mixed-bmp-png48.png | Bin 0 -> 1332 bytes .../test/reftest/ico/ico-mixed/reftest-stylo.list | 4 + image/test/reftest/ico/ico-mixed/reftest.list | 3 + .../reftest/ico/ico-png/corrupted_x00n0g01.ico | Bin 0 -> 71 bytes .../reftest/ico/ico-png/corrupted_xxcrn0g04.ico | Bin 0 -> 283 bytes .../reftest/ico/ico-png/ico-size-15x15-png.ico | Bin 0 -> 831 bytes .../reftest/ico/ico-png/ico-size-15x15-png.png | Bin 0 -> 809 bytes .../reftest/ico/ico-png/ico-size-16x16-png.ico | Bin 0 -> 901 bytes .../reftest/ico/ico-png/ico-size-16x16-png.png | Bin 0 -> 879 bytes .../reftest/ico/ico-png/ico-size-17x17-png.ico | Bin 0 -> 1022 bytes .../reftest/ico/ico-png/ico-size-17x17-png.png | Bin 0 -> 1000 bytes .../test/reftest/ico/ico-png/ico-size-1x1-png.ico | Bin 0 -> 92 bytes .../test/reftest/ico/ico-png/ico-size-1x1-png.png | Bin 0 -> 70 bytes .../reftest/ico/ico-png/ico-size-256x256-png.ico | Bin 0 -> 5934 bytes .../reftest/ico/ico-png/ico-size-256x256-png.png | Bin 0 -> 5912 bytes .../test/reftest/ico/ico-png/ico-size-2x2-png.ico | Bin 0 -> 105 bytes .../test/reftest/ico/ico-png/ico-size-2x2-png.png | Bin 0 -> 83 bytes .../reftest/ico/ico-png/ico-size-31x31-png.ico | Bin 0 -> 2958 bytes .../reftest/ico/ico-png/ico-size-31x31-png.png | Bin 0 -> 2936 bytes .../reftest/ico/ico-png/ico-size-32x32-png.ico | Bin 0 -> 3128 bytes .../reftest/ico/ico-png/ico-size-32x32-png.png | Bin 0 -> 3106 bytes .../reftest/ico/ico-png/ico-size-33x33-png.ico | Bin 0 -> 3325 bytes .../reftest/ico/ico-png/ico-size-33x33-png.png | Bin 0 -> 3303 bytes .../test/reftest/ico/ico-png/ico-size-3x3-png.ico | Bin 0 -> 129 bytes .../test/reftest/ico/ico-png/ico-size-3x3-png.png | Bin 0 -> 107 bytes .../test/reftest/ico/ico-png/ico-size-4x4-png.ico | Bin 0 -> 158 bytes .../test/reftest/ico/ico-png/ico-size-4x4-png.png | Bin 0 -> 136 bytes .../test/reftest/ico/ico-png/ico-size-5x5-png.ico | Bin 0 -> 195 bytes .../test/reftest/ico/ico-png/ico-size-5x5-png.png | Bin 0 -> 173 bytes .../test/reftest/ico/ico-png/ico-size-6x6-png.ico | Bin 0 -> 240 bytes .../test/reftest/ico/ico-png/ico-size-6x6-png.png | Bin 0 -> 218 bytes .../test/reftest/ico/ico-png/ico-size-7x7-png.ico | Bin 0 -> 293 bytes .../test/reftest/ico/ico-png/ico-size-7x7-png.png | Bin 0 -> 271 bytes .../test/reftest/ico/ico-png/ico-size-8x8-png.ico | Bin 0 -> 335 bytes .../test/reftest/ico/ico-png/ico-size-8x8-png.png | Bin 0 -> 313 bytes .../test/reftest/ico/ico-png/ico-size-9x9-png.ico | Bin 0 -> 390 bytes .../test/reftest/ico/ico-png/ico-size-9x9-png.png | Bin 0 -> 368 bytes image/test/reftest/ico/ico-png/reftest-stylo.list | 30 + image/test/reftest/ico/ico-png/reftest.list | 29 + image/test/reftest/ico/ico-png/tmp.ico | Bin 0 -> 1150 bytes image/test/reftest/ico/ico-png/transparent-png.ico | Bin 0 -> 1150 bytes image/test/reftest/ico/ico-png/transparent-png.png | Bin 0 -> 699 bytes image/test/reftest/ico/ico-png/wrapper.html | 28 + image/test/reftest/ico/ico-png/x00n0g01.png | Bin 0 -> 49 bytes image/test/reftest/ico/ico-png/xcrn0g04.png | Bin 0 -> 261 bytes image/test/reftest/ico/reftest-stylo.list | 13 + image/test/reftest/ico/reftest.list | 11 + image/test/reftest/img2html.html | 122 ++ image/test/reftest/jpeg/blue.jpg | Bin 0 -> 3937 bytes image/test/reftest/jpeg/jpg-cmyk-1.jpg | Bin 0 -> 1498 bytes image/test/reftest/jpeg/jpg-cmyk-1.png | Bin 0 -> 2523 bytes image/test/reftest/jpeg/jpg-cmyk-2.jpg | Bin 0 -> 5174 bytes image/test/reftest/jpeg/jpg-cmyk-2.png | Bin 0 -> 21147 bytes image/test/reftest/jpeg/jpg-gray.jpg | Bin 0 -> 396 bytes image/test/reftest/jpeg/jpg-gray.png | Bin 0 -> 498 bytes image/test/reftest/jpeg/jpg-progressive.jpg | Bin 0 -> 979 bytes image/test/reftest/jpeg/jpg-progressive.png | Bin 0 -> 3106 bytes image/test/reftest/jpeg/jpg-size-15x15.jpg | Bin 0 -> 465 bytes image/test/reftest/jpeg/jpg-size-15x15.png | Bin 0 -> 809 bytes image/test/reftest/jpeg/jpg-size-16x16.jpg | Bin 0 -> 443 bytes image/test/reftest/jpeg/jpg-size-16x16.png | Bin 0 -> 879 bytes image/test/reftest/jpeg/jpg-size-17x17.jpg | Bin 0 -> 582 bytes image/test/reftest/jpeg/jpg-size-17x17.png | Bin 0 -> 1000 bytes image/test/reftest/jpeg/jpg-size-1x1.jpg | Bin 0 -> 288 bytes image/test/reftest/jpeg/jpg-size-1x1.png | Bin 0 -> 70 bytes image/test/reftest/jpeg/jpg-size-2x2.jpg | Bin 0 -> 353 bytes image/test/reftest/jpeg/jpg-size-2x2.png | Bin 0 -> 83 bytes image/test/reftest/jpeg/jpg-size-31x31.jpg | Bin 0 -> 773 bytes image/test/reftest/jpeg/jpg-size-31x31.png | Bin 0 -> 2936 bytes image/test/reftest/jpeg/jpg-size-32x32.jpg | Bin 0 -> 759 bytes image/test/reftest/jpeg/jpg-size-32x32.png | Bin 0 -> 3106 bytes image/test/reftest/jpeg/jpg-size-33x33.jpg | Bin 0 -> 941 bytes image/test/reftest/jpeg/jpg-size-33x33.png | Bin 0 -> 3303 bytes image/test/reftest/jpeg/jpg-size-3x3.jpg | Bin 0 -> 429 bytes image/test/reftest/jpeg/jpg-size-3x3.png | Bin 0 -> 107 bytes image/test/reftest/jpeg/jpg-size-4x4.jpg | Bin 0 -> 427 bytes image/test/reftest/jpeg/jpg-size-4x4.png | Bin 0 -> 136 bytes image/test/reftest/jpeg/jpg-size-5x5.jpg | Bin 0 -> 421 bytes image/test/reftest/jpeg/jpg-size-5x5.png | Bin 0 -> 173 bytes image/test/reftest/jpeg/jpg-size-6x6.jpg | Bin 0 -> 218 bytes image/test/reftest/jpeg/jpg-size-6x6.png | Bin 0 -> 218 bytes image/test/reftest/jpeg/jpg-size-7x7.jpg | Bin 0 -> 420 bytes image/test/reftest/jpeg/jpg-size-7x7.png | Bin 0 -> 271 bytes image/test/reftest/jpeg/jpg-size-8x8.jpg | Bin 0 -> 412 bytes image/test/reftest/jpeg/jpg-size-8x8.png | Bin 0 -> 313 bytes image/test/reftest/jpeg/jpg-size-9x9.jpg | Bin 0 -> 438 bytes image/test/reftest/jpeg/jpg-size-9x9.png | Bin 0 -> 368 bytes image/test/reftest/jpeg/jpg-srgb-icc.jpg | Bin 0 -> 3226 bytes image/test/reftest/jpeg/jpg-srgb-icc.png | Bin 0 -> 2738 bytes image/test/reftest/jpeg/red.jpg | Bin 0 -> 3938 bytes image/test/reftest/jpeg/reftest-stylo.list | 57 + image/test/reftest/jpeg/reftest.list | 56 + image/test/reftest/jpeg/webcam-simulacrum.mjpg | Bin 0 -> 7978 bytes .../reftest/jpeg/webcam-simulacrum.mjpg^headers^ | 3 + .../test/reftest/pngsuite-ancillary/ccwn2c08.html | 1242 ++++++++++++++ image/test/reftest/pngsuite-ancillary/ccwn2c08.png | Bin 0 -> 1514 bytes .../test/reftest/pngsuite-ancillary/ccwn3p08.html | 1272 +++++++++++++++ image/test/reftest/pngsuite-ancillary/ccwn3p08.png | Bin 0 -> 1554 bytes .../test/reftest/pngsuite-ancillary/cdfn2c08.html | 326 ++++ image/test/reftest/pngsuite-ancillary/cdfn2c08.png | Bin 0 -> 404 bytes .../test/reftest/pngsuite-ancillary/cdhn2c08.html | 278 ++++ image/test/reftest/pngsuite-ancillary/cdhn2c08.png | Bin 0 -> 344 bytes .../test/reftest/pngsuite-ancillary/cdsn2c08.html | 86 + image/test/reftest/pngsuite-ancillary/cdsn2c08.png | Bin 0 -> 232 bytes .../test/reftest/pngsuite-ancillary/cdun2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cdun2c08.png | Bin 0 -> 724 bytes .../test/reftest/pngsuite-ancillary/ch1n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ch1n3p04.png | Bin 0 -> 258 bytes .../test/reftest/pngsuite-ancillary/ch2n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ch2n3p08.png | Bin 0 -> 1810 bytes .../test/reftest/pngsuite-ancillary/cm0n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cm0n0g04.png | Bin 0 -> 292 bytes .../test/reftest/pngsuite-ancillary/cm7n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cm7n0g04.png | Bin 0 -> 292 bytes .../test/reftest/pngsuite-ancillary/cm9n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cm9n0g04.png | Bin 0 -> 292 bytes .../test/reftest/pngsuite-ancillary/cs3n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs3n2c16.png | Bin 0 -> 214 bytes .../test/reftest/pngsuite-ancillary/cs3n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs3n3p08.png | Bin 0 -> 259 bytes .../test/reftest/pngsuite-ancillary/cs5n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs5n2c08.png | Bin 0 -> 186 bytes .../test/reftest/pngsuite-ancillary/cs5n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs5n3p08.png | Bin 0 -> 271 bytes .../test/reftest/pngsuite-ancillary/cs8n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs8n2c08.png | Bin 0 -> 149 bytes .../test/reftest/pngsuite-ancillary/cs8n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs8n3p08.png | Bin 0 -> 256 bytes .../test/reftest/pngsuite-ancillary/ct0n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ct0n0g04.png | Bin 0 -> 273 bytes .../test/reftest/pngsuite-ancillary/ct1n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ct1n0g04.png | Bin 0 -> 792 bytes .../test/reftest/pngsuite-ancillary/ctzn0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ctzn0g04.png | Bin 0 -> 753 bytes .../reftest/pngsuite-ancillary/qcms-asm-check.js | 28 + .../reftest/pngsuite-ancillary/reftest-stylo.list | 63 + image/test/reftest/pngsuite-ancillary/reftest.list | 62 + .../test/reftest/pngsuite-background/bg__4a08.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bg__4a16.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bg__6a08.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bg__6a16.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bgai4a08.png | Bin 0 -> 214 bytes .../test/reftest/pngsuite-background/bgai4a16.png | Bin 0 -> 2855 bytes .../test/reftest/pngsuite-background/bgan6a08.png | Bin 0 -> 184 bytes .../test/reftest/pngsuite-background/bgan6a16.png | Bin 0 -> 3435 bytes .../test/reftest/pngsuite-background/bgbn4a08.png | Bin 0 -> 140 bytes .../test/reftest/pngsuite-background/bggn4a16.png | Bin 0 -> 2220 bytes .../test/reftest/pngsuite-background/bgwn6a08.png | Bin 0 -> 202 bytes .../test/reftest/pngsuite-background/bgyn6a16.png | Bin 0 -> 3453 bytes .../reftest/pngsuite-background/reftest-stylo.list | 23 + .../test/reftest/pngsuite-background/reftest.list | 22 + .../test/reftest/pngsuite-background/wrapper.html | 27 + image/test/reftest/pngsuite-basic-i/basi0g01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g01.png | Bin 0 -> 217 bytes image/test/reftest/pngsuite-basic-i/basi0g02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g02.png | Bin 0 -> 154 bytes image/test/reftest/pngsuite-basic-i/basi0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g04.png | Bin 0 -> 247 bytes image/test/reftest/pngsuite-basic-i/basi0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g08.png | Bin 0 -> 254 bytes image/test/reftest/pngsuite-basic-i/basi0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g16.png | Bin 0 -> 299 bytes image/test/reftest/pngsuite-basic-i/basi2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi2c08.png | Bin 0 -> 315 bytes image/test/reftest/pngsuite-basic-i/basi2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi2c16.png | Bin 0 -> 595 bytes image/test/reftest/pngsuite-basic-i/basi3p01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p01.png | Bin 0 -> 132 bytes image/test/reftest/pngsuite-basic-i/basi3p02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p02.png | Bin 0 -> 193 bytes image/test/reftest/pngsuite-basic-i/basi3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p04.png | Bin 0 -> 327 bytes image/test/reftest/pngsuite-basic-i/basi3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p08.png | Bin 0 -> 1527 bytes image/test/reftest/pngsuite-basic-i/basi4a08.png | Bin 0 -> 214 bytes image/test/reftest/pngsuite-basic-i/basi4a16.png | Bin 0 -> 2855 bytes image/test/reftest/pngsuite-basic-i/basi6a08.png | Bin 0 -> 361 bytes image/test/reftest/pngsuite-basic-i/basi6a16.png | Bin 0 -> 4180 bytes .../reftest/pngsuite-basic-i/reftest-stylo.list | 34 + image/test/reftest/pngsuite-basic-i/reftest.list | 33 + image/test/reftest/pngsuite-basic-n/basn0g01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g01.png | Bin 0 -> 164 bytes image/test/reftest/pngsuite-basic-n/basn0g02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g02.png | Bin 0 -> 104 bytes image/test/reftest/pngsuite-basic-n/basn0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g04.png | Bin 0 -> 145 bytes image/test/reftest/pngsuite-basic-n/basn0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g08.png | Bin 0 -> 138 bytes image/test/reftest/pngsuite-basic-n/basn0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g16.png | Bin 0 -> 167 bytes image/test/reftest/pngsuite-basic-n/basn2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn2c08.png | Bin 0 -> 145 bytes image/test/reftest/pngsuite-basic-n/basn2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn2c16.png | Bin 0 -> 302 bytes image/test/reftest/pngsuite-basic-n/basn3p01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p01.png | Bin 0 -> 112 bytes image/test/reftest/pngsuite-basic-n/basn3p02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p02.png | Bin 0 -> 146 bytes image/test/reftest/pngsuite-basic-n/basn3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p04.png | Bin 0 -> 216 bytes image/test/reftest/pngsuite-basic-n/basn3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p08.png | Bin 0 -> 1286 bytes image/test/reftest/pngsuite-basic-n/basn4a08.png | Bin 0 -> 126 bytes image/test/reftest/pngsuite-basic-n/basn4a16.png | Bin 0 -> 2206 bytes image/test/reftest/pngsuite-basic-n/basn6a08.png | Bin 0 -> 184 bytes image/test/reftest/pngsuite-basic-n/basn6a16.png | Bin 0 -> 3435 bytes .../reftest/pngsuite-basic-n/reftest-stylo.list | 34 + image/test/reftest/pngsuite-basic-n/reftest.list | 33 + image/test/reftest/pngsuite-chunkorder/color.html | 1094 +++++++++++++ .../reftest/pngsuite-chunkorder/grayscale.html | 1094 +++++++++++++ .../test/reftest/pngsuite-chunkorder/oi1n0g16.png | Bin 0 -> 167 bytes .../test/reftest/pngsuite-chunkorder/oi1n2c16.png | Bin 0 -> 302 bytes .../test/reftest/pngsuite-chunkorder/oi2n0g16.png | Bin 0 -> 179 bytes .../test/reftest/pngsuite-chunkorder/oi2n2c16.png | Bin 0 -> 314 bytes .../test/reftest/pngsuite-chunkorder/oi4n0g16.png | Bin 0 -> 203 bytes .../test/reftest/pngsuite-chunkorder/oi4n2c16.png | Bin 0 -> 338 bytes .../test/reftest/pngsuite-chunkorder/oi9n0g16.png | Bin 0 -> 1283 bytes .../test/reftest/pngsuite-chunkorder/oi9n2c16.png | Bin 0 -> 3038 bytes .../reftest/pngsuite-chunkorder/reftest-stylo.list | 22 + .../test/reftest/pngsuite-chunkorder/reftest.list | 21 + .../reftest/pngsuite-corrupted/reftest-stylo.list | 11 + image/test/reftest/pngsuite-corrupted/reftest.list | 10 + image/test/reftest/pngsuite-corrupted/wrapper.html | 28 + image/test/reftest/pngsuite-corrupted/x00n0g01.png | Bin 0 -> 49 bytes image/test/reftest/pngsuite-corrupted/xcrn0g04.png | Bin 0 -> 261 bytes image/test/reftest/pngsuite-corrupted/xlfn0g04.png | 13 + .../test/reftest/pngsuite-filtering/f00n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f00n0g08.png | Bin 0 -> 319 bytes .../test/reftest/pngsuite-filtering/f00n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f00n2c08.png | Bin 0 -> 2475 bytes .../test/reftest/pngsuite-filtering/f01n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f01n0g08.png | Bin 0 -> 321 bytes .../test/reftest/pngsuite-filtering/f01n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f01n2c08.png | Bin 0 -> 1180 bytes .../test/reftest/pngsuite-filtering/f02n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f02n0g08.png | Bin 0 -> 355 bytes .../test/reftest/pngsuite-filtering/f02n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f02n2c08.png | Bin 0 -> 1729 bytes .../test/reftest/pngsuite-filtering/f03n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f03n0g08.png | Bin 0 -> 389 bytes .../test/reftest/pngsuite-filtering/f03n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f03n2c08.png | Bin 0 -> 1291 bytes .../test/reftest/pngsuite-filtering/f04n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f04n0g08.png | Bin 0 -> 269 bytes .../test/reftest/pngsuite-filtering/f04n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f04n2c08.png | Bin 0 -> 985 bytes .../reftest/pngsuite-filtering/reftest-stylo.list | 23 + image/test/reftest/pngsuite-filtering/reftest.list | 22 + image/test/reftest/pngsuite-gamma/g03n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g03n0g16.png | Bin 0 -> 345 bytes image/test/reftest/pngsuite-gamma/g03n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g03n2c08.png | Bin 0 -> 370 bytes image/test/reftest/pngsuite-gamma/g03n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g03n3p04.png | Bin 0 -> 214 bytes image/test/reftest/pngsuite-gamma/g04n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g04n0g16.png | Bin 0 -> 363 bytes image/test/reftest/pngsuite-gamma/g04n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g04n2c08.png | Bin 0 -> 377 bytes image/test/reftest/pngsuite-gamma/g04n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g04n3p04.png | Bin 0 -> 219 bytes image/test/reftest/pngsuite-gamma/g05n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g05n0g16.png | Bin 0 -> 339 bytes image/test/reftest/pngsuite-gamma/g05n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g05n2c08.png | Bin 0 -> 350 bytes image/test/reftest/pngsuite-gamma/g05n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g05n3p04.png | Bin 0 -> 206 bytes image/test/reftest/pngsuite-gamma/g07n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g07n0g16.png | Bin 0 -> 321 bytes image/test/reftest/pngsuite-gamma/g07n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g07n2c08.png | Bin 0 -> 340 bytes image/test/reftest/pngsuite-gamma/g07n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g07n3p04.png | Bin 0 -> 207 bytes image/test/reftest/pngsuite-gamma/g10n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g10n0g16.png | Bin 0 -> 262 bytes image/test/reftest/pngsuite-gamma/g10n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g10n2c08.png | Bin 0 -> 285 bytes image/test/reftest/pngsuite-gamma/g10n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g10n3p04.png | Bin 0 -> 214 bytes image/test/reftest/pngsuite-gamma/g25n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g25n0g16.png | Bin 0 -> 383 bytes image/test/reftest/pngsuite-gamma/g25n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g25n2c08.png | Bin 0 -> 405 bytes image/test/reftest/pngsuite-gamma/g25n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g25n3p04.png | Bin 0 -> 215 bytes .../test/reftest/pngsuite-gamma/reftest-stylo.list | 39 + image/test/reftest/pngsuite-gamma/reftest.list | 38 + .../reftest/pngsuite-oddsizes/reftest-stylo.list | 78 + image/test/reftest/pngsuite-oddsizes/reftest.list | 77 + image/test/reftest/pngsuite-oddsizes/s01_3p01.html | 9 + image/test/reftest/pngsuite-oddsizes/s01i3p01.png | Bin 0 -> 113 bytes image/test/reftest/pngsuite-oddsizes/s01n3p01.png | Bin 0 -> 113 bytes image/test/reftest/pngsuite-oddsizes/s02_3p01.html | 14 + image/test/reftest/pngsuite-oddsizes/s02i3p01.png | Bin 0 -> 114 bytes image/test/reftest/pngsuite-oddsizes/s02n3p01.png | Bin 0 -> 115 bytes image/test/reftest/pngsuite-oddsizes/s03_3p01.html | 21 + image/test/reftest/pngsuite-oddsizes/s03i3p01.png | Bin 0 -> 118 bytes image/test/reftest/pngsuite-oddsizes/s03n3p01.png | Bin 0 -> 120 bytes image/test/reftest/pngsuite-oddsizes/s04_3p01.html | 30 + image/test/reftest/pngsuite-oddsizes/s04i3p01.png | Bin 0 -> 126 bytes image/test/reftest/pngsuite-oddsizes/s04n3p01.png | Bin 0 -> 121 bytes image/test/reftest/pngsuite-oddsizes/s05_3p02.html | 41 + image/test/reftest/pngsuite-oddsizes/s05i3p02.png | Bin 0 -> 134 bytes image/test/reftest/pngsuite-oddsizes/s05n3p02.png | Bin 0 -> 129 bytes image/test/reftest/pngsuite-oddsizes/s06_3p02.html | 54 + image/test/reftest/pngsuite-oddsizes/s06i3p02.png | Bin 0 -> 143 bytes image/test/reftest/pngsuite-oddsizes/s06n3p02.png | Bin 0 -> 131 bytes image/test/reftest/pngsuite-oddsizes/s07_3p02.html | 69 + image/test/reftest/pngsuite-oddsizes/s07i3p02.png | Bin 0 -> 149 bytes image/test/reftest/pngsuite-oddsizes/s07n3p02.png | Bin 0 -> 138 bytes image/test/reftest/pngsuite-oddsizes/s08_3p02.html | 86 + image/test/reftest/pngsuite-oddsizes/s08i3p02.png | Bin 0 -> 149 bytes image/test/reftest/pngsuite-oddsizes/s08n3p02.png | Bin 0 -> 139 bytes image/test/reftest/pngsuite-oddsizes/s09_3p02.html | 105 ++ image/test/reftest/pngsuite-oddsizes/s09i3p02.png | Bin 0 -> 147 bytes image/test/reftest/pngsuite-oddsizes/s09n3p02.png | Bin 0 -> 143 bytes image/test/reftest/pngsuite-oddsizes/s32_3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-oddsizes/s32i3p04.png | Bin 0 -> 355 bytes image/test/reftest/pngsuite-oddsizes/s32n3p04.png | Bin 0 -> 263 bytes image/test/reftest/pngsuite-oddsizes/s33_3p04.html | 1161 ++++++++++++++ image/test/reftest/pngsuite-oddsizes/s33i3p04.png | Bin 0 -> 385 bytes image/test/reftest/pngsuite-oddsizes/s33n3p04.png | Bin 0 -> 329 bytes image/test/reftest/pngsuite-oddsizes/s34_3p04.html | 1230 ++++++++++++++ image/test/reftest/pngsuite-oddsizes/s34i3p04.png | Bin 0 -> 349 bytes image/test/reftest/pngsuite-oddsizes/s34n3p04.png | Bin 0 -> 248 bytes image/test/reftest/pngsuite-oddsizes/s35_3p04.html | 1301 +++++++++++++++ image/test/reftest/pngsuite-oddsizes/s35i3p04.png | Bin 0 -> 399 bytes image/test/reftest/pngsuite-oddsizes/s35n3p04.png | Bin 0 -> 338 bytes image/test/reftest/pngsuite-oddsizes/s36_3p04.html | 1374 ++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s36i3p04.png | Bin 0 -> 356 bytes image/test/reftest/pngsuite-oddsizes/s36n3p04.png | Bin 0 -> 258 bytes image/test/reftest/pngsuite-oddsizes/s37_3p04.html | 1449 +++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s37i3p04.png | Bin 0 -> 393 bytes image/test/reftest/pngsuite-oddsizes/s37n3p04.png | Bin 0 -> 336 bytes image/test/reftest/pngsuite-oddsizes/s38_3p04.html | 1526 ++++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s38i3p04.png | Bin 0 -> 357 bytes image/test/reftest/pngsuite-oddsizes/s38n3p04.png | Bin 0 -> 245 bytes image/test/reftest/pngsuite-oddsizes/s39_3p04.html | 1605 +++++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s39i3p04.png | Bin 0 -> 420 bytes image/test/reftest/pngsuite-oddsizes/s39n3p04.png | Bin 0 -> 352 bytes image/test/reftest/pngsuite-oddsizes/s40_3p04.html | 1686 ++++++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s40i3p04.png | Bin 0 -> 357 bytes image/test/reftest/pngsuite-oddsizes/s40n3p04.png | Bin 0 -> 256 bytes image/test/reftest/pngsuite-palettes/pp0n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/pp0n2c16.png | Bin 0 -> 962 bytes image/test/reftest/pngsuite-palettes/pp0n6a08.png | Bin 0 -> 818 bytes image/test/reftest/pngsuite-palettes/ps1n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps1n0g08.png | Bin 0 -> 1477 bytes image/test/reftest/pngsuite-palettes/ps1n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps1n2c16.png | Bin 0 -> 1641 bytes image/test/reftest/pngsuite-palettes/ps2n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps2n0g08.png | Bin 0 -> 2341 bytes image/test/reftest/pngsuite-palettes/ps2n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps2n2c16.png | Bin 0 -> 2505 bytes .../reftest/pngsuite-palettes/reftest-stylo.list | 15 + image/test/reftest/pngsuite-palettes/reftest.list | 14 + .../pngsuite-transparency/reftest-stylo.list | 27 + .../reftest/pngsuite-transparency/reftest.list | 26 + .../reftest/pngsuite-transparency/tbbn1g04.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbbn1g04.png | Bin 0 -> 419 bytes .../reftest/pngsuite-transparency/tbbn2c16.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbbn2c16.png | Bin 0 -> 1994 bytes .../reftest/pngsuite-transparency/tbbn3p08.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbbn3p08.png | Bin 0 -> 1128 bytes .../reftest/pngsuite-transparency/tbgn2c16.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbgn2c16.png | Bin 0 -> 1994 bytes .../reftest/pngsuite-transparency/tbgn3p08.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbgn3p08.png | Bin 0 -> 1128 bytes .../reftest/pngsuite-transparency/tbrn2c08.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbrn2c08.png | Bin 0 -> 1347 bytes .../reftest/pngsuite-transparency/tbwn1g16.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbwn1g16.png | Bin 0 -> 1146 bytes .../reftest/pngsuite-transparency/tbwn3p08.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbwn3p08.png | Bin 0 -> 1131 bytes .../reftest/pngsuite-transparency/tbyn3p08.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tbyn3p08.png | Bin 0 -> 1131 bytes .../reftest/pngsuite-transparency/tp1n3p08.html | 1092 +++++++++++++ .../reftest/pngsuite-transparency/tp1n3p08.png | Bin 0 -> 1115 bytes .../reftest/pngsuite-transparency/wrapper.html | 27 + .../test/reftest/pngsuite-zlib/reftest-stylo.list | 9 + image/test/reftest/pngsuite-zlib/reftest.list | 8 + image/test/reftest/pngsuite-zlib/z00n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z00n2c08.png | Bin 0 -> 3172 bytes image/test/reftest/pngsuite-zlib/z03n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z03n2c08.png | Bin 0 -> 232 bytes image/test/reftest/pngsuite-zlib/z06n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z06n2c08.png | Bin 0 -> 224 bytes image/test/reftest/pngsuite-zlib/z09n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z09n2c08.png | Bin 0 -> 224 bytes image/test/reftest/reftest-stylo.list | 65 + image/test/reftest/reftest.list | 50 + image/test/unit/async_load_tests.js | 214 +++ image/test/unit/bug413512.ico | Bin 0 -> 17759 bytes image/test/unit/bug815359.ico | Bin 0 -> 4286 bytes image/test/unit/image1.png | Bin 0 -> 8415 bytes image/test/unit/image1png16x16.jpg | Bin 0 -> 1051 bytes image/test/unit/image1png64x64.jpg | Bin 0 -> 4503 bytes image/test/unit/image2.jpg | Bin 0 -> 3494 bytes image/test/unit/image2jpg16x16-win.png | Bin 0 -> 948 bytes image/test/unit/image2jpg16x16.png | Bin 0 -> 950 bytes image/test/unit/image2jpg16x16cropped.jpg | Bin 0 -> 879 bytes image/test/unit/image2jpg16x16cropped2.jpg | Bin 0 -> 878 bytes image/test/unit/image2jpg16x32cropped3.jpg | Bin 0 -> 1127 bytes image/test/unit/image2jpg16x32scaled.jpg | Bin 0 -> 1219 bytes image/test/unit/image2jpg32x16cropped4.jpg | Bin 0 -> 1135 bytes image/test/unit/image2jpg32x16scaled.jpg | Bin 0 -> 1227 bytes image/test/unit/image2jpg32x32-win.png | Bin 0 -> 3104 bytes image/test/unit/image2jpg32x32.jpg | Bin 0 -> 1634 bytes image/test/unit/image2jpg32x32.png | Bin 0 -> 3105 bytes image/test/unit/image3.ico | Bin 0 -> 1406 bytes image/test/unit/image3ico16x16.png | Bin 0 -> 330 bytes image/test/unit/image3ico32x32.png | Bin 0 -> 2285 bytes image/test/unit/image4.gif | Bin 0 -> 1809 bytes image/test/unit/image4gif16x16bmp24bpp.ico | Bin 0 -> 894 bytes image/test/unit/image4gif16x16bmp32bpp.ico | Bin 0 -> 1150 bytes image/test/unit/image4gif32x32bmp24bpp.ico | Bin 0 -> 3262 bytes image/test/unit/image4gif32x32bmp32bpp.ico | Bin 0 -> 4286 bytes image/test/unit/image_load_helpers.js | 122 ++ image/test/unit/test_async_notification.js | 10 + image/test/unit/test_async_notification_404.js | 16 + .../test/unit/test_async_notification_animated.js | 14 + image/test/unit/test_encoder_apng.js | 470 ++++++ image/test/unit/test_encoder_png.js | 256 +++ image/test/unit/test_imgtools.js | 737 +++++++++ image/test/unit/test_moz_icon_uri.js | 157 ++ image/test/unit/test_private_channel.js | 143 ++ image/test/unit/xpcshell.ini | 45 + 1273 files changed, 136570 insertions(+) create mode 100644 image/test/browser/animated.gif create mode 100644 image/test/browser/animated2.gif create mode 100644 image/test/browser/big.png create mode 100644 image/test/browser/browser.ini create mode 100644 image/test/browser/browser_bug666317.js create mode 100644 image/test/browser/browser_docshell_type_editor.js create mode 100644 image/test/browser/browser_image.js create mode 100644 image/test/browser/head.js create mode 100644 image/test/browser/image.html create mode 100644 image/test/browser/imageX2.html create mode 100644 image/test/crashtests/1205923-1.html create mode 100644 image/test/crashtests/1210745-1.gif create mode 100644 image/test/crashtests/1212954-1.svg create mode 100644 image/test/crashtests/1235605.gif create mode 100644 image/test/crashtests/1241728-1.html create mode 100644 image/test/crashtests/1241729-1.bmp create mode 100644 image/test/crashtests/1241729-1.html create mode 100644 image/test/crashtests/1242093-1.html create mode 100644 image/test/crashtests/1242778-1.png create mode 100644 image/test/crashtests/1249576-1.png create mode 100644 image/test/crashtests/1251091-1.html create mode 100644 image/test/crashtests/1251091-1.png create mode 100644 image/test/crashtests/1253362-1.html create mode 100644 image/test/crashtests/256-height.ico create mode 100644 image/test/crashtests/256-width.ico create mode 100644 image/test/crashtests/463696.bmp create mode 100644 image/test/crashtests/523528-1.gif create mode 100644 image/test/crashtests/523528-2.gif create mode 100644 image/test/crashtests/570451.png create mode 100644 image/test/crashtests/681190.html create mode 100644 image/test/crashtests/694165-1.xhtml create mode 100644 image/test/crashtests/732319-1.html create mode 100644 image/test/crashtests/83804-1.gif create mode 100644 image/test/crashtests/844403-1.html create mode 100644 image/test/crashtests/856616.gif create mode 100644 image/test/crashtests/89341-1.gif create mode 100644 image/test/crashtests/944353.jpg create mode 100644 image/test/crashtests/colormap-range.gif create mode 100644 image/test/crashtests/crashtests.list create mode 100644 image/test/crashtests/delayedframe.sjs create mode 100644 image/test/crashtests/delaytest.html create mode 100644 image/test/crashtests/discardframe.htm create mode 100644 image/test/crashtests/ie.png create mode 100644 image/test/crashtests/invalid-disposal-method-1.gif create mode 100644 image/test/crashtests/invalid-disposal-method-2.gif create mode 100644 image/test/crashtests/invalid-disposal-method-3.gif create mode 100644 image/test/crashtests/invalid-icc-profile.jpg create mode 100644 image/test/crashtests/invalid-size-second-frame.gif create mode 100644 image/test/crashtests/invalid-size.gif create mode 100644 image/test/crashtests/invalid_ico_height.ico create mode 100644 image/test/crashtests/invalid_ico_width.ico create mode 100644 image/test/crashtests/multiple-png-hassize.ico create mode 100644 image/test/crashtests/ownerdiscard.html create mode 100644 image/test/crashtests/threeframes-end.gif create mode 100644 image/test/crashtests/threeframes-start.gif create mode 100644 image/test/crashtests/truncated-second-frame.png create mode 100644 image/test/crashtests/unsized-svg.svg create mode 100644 image/test/gtest/Common.cpp create mode 100644 image/test/gtest/Common.h create mode 100644 image/test/gtest/TestADAM7InterpolatingFilter.cpp create mode 100644 image/test/gtest/TestCopyOnWrite.cpp create mode 100644 image/test/gtest/TestDecodeToSurface.cpp create mode 100644 image/test/gtest/TestDecoders.cpp create mode 100644 image/test/gtest/TestDeinterlacingFilter.cpp create mode 100644 image/test/gtest/TestDownscalingFilter.cpp create mode 100644 image/test/gtest/TestDownscalingFilterNoSkia.cpp create mode 100644 image/test/gtest/TestMetadata.cpp create mode 100644 image/test/gtest/TestRemoveFrameRectFilter.cpp create mode 100644 image/test/gtest/TestSourceBuffer.cpp create mode 100644 image/test/gtest/TestStreamingLexer.cpp create mode 100644 image/test/gtest/TestSurfacePipeIntegration.cpp create mode 100644 image/test/gtest/TestSurfaceSink.cpp create mode 100644 image/test/gtest/animated-with-extra-image-sub-blocks.gif create mode 100644 image/test/gtest/corrupt-with-bad-bmp-height.ico create mode 100644 image/test/gtest/corrupt-with-bad-bmp-width.ico create mode 100644 image/test/gtest/corrupt.jpg create mode 100644 image/test/gtest/downscaled.bmp create mode 100644 image/test/gtest/downscaled.gif create mode 100644 image/test/gtest/downscaled.ico create mode 100644 image/test/gtest/downscaled.icon create mode 100644 image/test/gtest/downscaled.jpg create mode 100644 image/test/gtest/downscaled.png create mode 100644 image/test/gtest/first-frame-green.gif create mode 100644 image/test/gtest/first-frame-green.png create mode 100644 image/test/gtest/first-frame-padding.gif create mode 100644 image/test/gtest/green-1x1-truncated.gif create mode 100644 image/test/gtest/green.bmp create mode 100644 image/test/gtest/green.gif create mode 100644 image/test/gtest/green.ico create mode 100644 image/test/gtest/green.icon create mode 100644 image/test/gtest/green.jpg create mode 100644 image/test/gtest/green.png create mode 100644 image/test/gtest/invalid-truncated-metadata.bmp create mode 100644 image/test/gtest/moz.build create mode 100644 image/test/gtest/no-frame-delay.gif create mode 100644 image/test/gtest/rle4.bmp create mode 100644 image/test/gtest/rle8.bmp create mode 100644 image/test/gtest/transparent-ico-with-and-mask.ico create mode 100644 image/test/gtest/transparent-if-within-ico.bmp create mode 100644 image/test/gtest/transparent.gif create mode 100644 image/test/gtest/transparent.png create mode 100644 image/test/mochitest/12M-pixels-1.png create mode 100644 image/test/mochitest/12M-pixels-2.png create mode 100644 image/test/mochitest/6M-pixels.png create mode 100644 image/test/mochitest/INT32_MIN.bmp create mode 100644 image/test/mochitest/animated-gif-finalframe.gif create mode 100644 image/test/mochitest/animated-gif.gif create mode 100644 image/test/mochitest/animated-gif2.gif create mode 100644 image/test/mochitest/animated-gif_trailing-garbage.gif create mode 100644 image/test/mochitest/animated1.gif create mode 100644 image/test/mochitest/animated2.gif create mode 100644 image/test/mochitest/animation.svg create mode 100644 image/test/mochitest/animationPolling.js create mode 100644 image/test/mochitest/bad.jpg create mode 100644 image/test/mochitest/big.png create mode 100644 image/test/mochitest/blue.gif create mode 100644 image/test/mochitest/blue.png create mode 100644 image/test/mochitest/bug1132427.gif create mode 100644 image/test/mochitest/bug1132427.html create mode 100644 image/test/mochitest/bug1180105-waiter.sjs create mode 100644 image/test/mochitest/bug1180105.sjs create mode 100644 image/test/mochitest/bug1217571-iframe.html create mode 100644 image/test/mochitest/bug1319025-ref.png create mode 100644 image/test/mochitest/bug1319025.png create mode 100644 image/test/mochitest/bug399925.gif create mode 100644 image/test/mochitest/bug415761.ico create mode 100644 image/test/mochitest/bug468160.sjs create mode 100644 image/test/mochitest/bug478398_ONLY.png create mode 100644 image/test/mochitest/bug490949-iframe.html create mode 100644 image/test/mochitest/bug490949.sjs create mode 100644 image/test/mochitest/bug496292-1.sjs create mode 100644 image/test/mochitest/bug496292-2.sjs create mode 100644 image/test/mochitest/bug496292-iframe-1.html create mode 100644 image/test/mochitest/bug496292-iframe-2.html create mode 100644 image/test/mochitest/bug496292-iframe-ref.html create mode 100644 image/test/mochitest/bug497665-iframe.html create mode 100644 image/test/mochitest/bug497665.sjs create mode 100644 image/test/mochitest/bug552605.sjs create mode 100644 image/test/mochitest/bug657191.sjs create mode 100644 image/test/mochitest/bug671906-iframe.html create mode 100644 image/test/mochitest/bug671906.sjs create mode 100644 image/test/mochitest/bug733553-informant.sjs create mode 100644 image/test/mochitest/bug733553.sjs create mode 100644 image/test/mochitest/bug767779.sjs create mode 100644 image/test/mochitest/bug89419-iframe.html create mode 100644 image/test/mochitest/bug89419.sjs create mode 100644 image/test/mochitest/bug900200-ref.png create mode 100644 image/test/mochitest/bug900200.png create mode 100644 image/test/mochitest/chrome.ini create mode 100644 image/test/mochitest/clear.gif create mode 100644 image/test/mochitest/clear.png create mode 100644 image/test/mochitest/clear2-results.gif create mode 100644 image/test/mochitest/clear2.gif create mode 100644 image/test/mochitest/damon.jpg create mode 100644 image/test/mochitest/error-early.png create mode 100644 image/test/mochitest/filter-final.svg create mode 100644 image/test/mochitest/filter.svg create mode 100644 image/test/mochitest/first-frame-padding.gif create mode 100644 image/test/mochitest/green-background.html create mode 100644 image/test/mochitest/green.png create mode 100644 image/test/mochitest/grey.png create mode 100644 image/test/mochitest/ico-bmp-opaque.ico create mode 100644 image/test/mochitest/ico-bmp-transparent.ico create mode 100644 image/test/mochitest/iframe.html create mode 100644 image/test/mochitest/imgutils.js create mode 100644 image/test/mochitest/invalid.jpg create mode 100644 image/test/mochitest/keep.gif create mode 100644 image/test/mochitest/keep.png create mode 100644 image/test/mochitest/lime-anim-100x100-2.svg create mode 100644 image/test/mochitest/lime-anim-100x100.svg create mode 100644 image/test/mochitest/lime-css-anim-100x100.svg create mode 100644 image/test/mochitest/lime100x100.svg create mode 100644 image/test/mochitest/mochitest.ini create mode 100644 image/test/mochitest/opaque.bmp create mode 100644 image/test/mochitest/over.png create mode 100644 image/test/mochitest/purple.gif create mode 100644 image/test/mochitest/red.gif create mode 100644 image/test/mochitest/red.png create mode 100644 image/test/mochitest/ref-iframe.html create mode 100644 image/test/mochitest/restore-previous.gif create mode 100644 image/test/mochitest/restore-previous.png create mode 100644 image/test/mochitest/rillybad.jpg create mode 100644 image/test/mochitest/schrep.png create mode 100644 image/test/mochitest/shaver.png create mode 100644 image/test/mochitest/short_header.gif create mode 100644 image/test/mochitest/source.png create mode 100644 image/test/mochitest/test_ImageContentLoaded.html create mode 100644 image/test/mochitest/test_animSVGImage.html create mode 100644 image/test/mochitest/test_animSVGImage2.html create mode 100644 image/test/mochitest/test_animation.html create mode 100644 image/test/mochitest/test_animation2.html create mode 100644 image/test/mochitest/test_animation_operators.html create mode 100644 image/test/mochitest/test_background_image_anim.html create mode 100644 image/test/mochitest/test_bug1132427.html create mode 100644 image/test/mochitest/test_bug1180105.html create mode 100644 image/test/mochitest/test_bug1217571.html create mode 100644 image/test/mochitest/test_bug399925.html create mode 100644 image/test/mochitest/test_bug415761.html create mode 100644 image/test/mochitest/test_bug435296.html create mode 100644 image/test/mochitest/test_bug466586.html create mode 100644 image/test/mochitest/test_bug468160.html create mode 100644 image/test/mochitest/test_bug478398.html create mode 100644 image/test/mochitest/test_bug490949.html create mode 100644 image/test/mochitest/test_bug496292.html create mode 100644 image/test/mochitest/test_bug497665.html create mode 100644 image/test/mochitest/test_bug552605-1.html create mode 100644 image/test/mochitest/test_bug552605-2.html create mode 100644 image/test/mochitest/test_bug553982.html create mode 100644 image/test/mochitest/test_bug601470.html create mode 100644 image/test/mochitest/test_bug614392.html create mode 100644 image/test/mochitest/test_bug657191.html create mode 100644 image/test/mochitest/test_bug671906.html create mode 100644 image/test/mochitest/test_bug733553.html create mode 100644 image/test/mochitest/test_bug767779.html create mode 100644 image/test/mochitest/test_bug865919.html create mode 100644 image/test/mochitest/test_bug89419-1.html create mode 100644 image/test/mochitest/test_bug89419-2.html create mode 100644 image/test/mochitest/test_bullet_animation.html create mode 100644 image/test/mochitest/test_changeOfSource.html create mode 100644 image/test/mochitest/test_changeOfSource2.html create mode 100644 image/test/mochitest/test_drawDiscardedImage.html create mode 100644 image/test/mochitest/test_error_events.html create mode 100644 image/test/mochitest/test_has_transparency.html create mode 100644 image/test/mochitest/test_image_crossorigin_data_url.html create mode 100644 image/test/mochitest/test_net_failedtoprocess.html create mode 100644 image/test/mochitest/test_removal_ondecode.html create mode 100644 image/test/mochitest/test_removal_onload.html create mode 100644 image/test/mochitest/test_short_gif_header.html create mode 100644 image/test/mochitest/test_staticClone.html create mode 100644 image/test/mochitest/test_svg_animatedGIF.html create mode 100644 image/test/mochitest/test_svg_filter_animation.html create mode 100644 image/test/mochitest/test_synchronized_animation.html create mode 100644 image/test/mochitest/test_undisplayed_iframe.html create mode 100644 image/test/mochitest/test_webcam.html create mode 100644 image/test/mochitest/test_xultree_animation.xhtml create mode 100644 image/test/mochitest/transparent.gif create mode 100644 image/test/mochitest/transparent.png create mode 100644 image/test/mochitest/webcam-simulacrum.sjs create mode 100644 image/test/reftest/ImageDocument.css create mode 100644 image/test/reftest/apng/bug411852-1-ref.png create mode 100644 image/test/reftest/apng/bug411852-1.png create mode 100644 image/test/reftest/apng/bug546272-ref.png create mode 100644 image/test/reftest/apng/bug546272.png create mode 100644 image/test/reftest/apng/delaytest.html create mode 100644 image/test/reftest/apng/reftest-stylo.list create mode 100644 image/test/reftest/apng/reftest.list create mode 100644 image/test/reftest/blob/blob-uri-with-ref-param-notref.html create mode 100644 image/test/reftest/blob/blob-uri-with-ref-param.html create mode 100644 image/test/reftest/blob/image.png create mode 100644 image/test/reftest/blob/reftest-stylo.list create mode 100644 image/test/reftest/blob/reftest.list create mode 100644 image/test/reftest/bmp/1240629-1.bmp create mode 100644 image/test/reftest/bmp/1240629-2.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmp-1bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmp-24bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmp-4bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmp-8bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmp-corrupted/reftest.list create mode 100644 image/test/reftest/bmp/bmp-corrupted/wrapper.html create mode 100644 image/test/reftest/bmp/bmpsuite/COPYING.txt create mode 100644 image/test/reftest/bmp/bmpsuite/README.mozilla create mode 100644 image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/baddens1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/baddens2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badplanes.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badwidth.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal1.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal8.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal8badindex.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/reallybig.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmpsuite/b/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/shortfile.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/shortfile.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/wrapper.html create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1bg.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w124.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w125.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w126.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmpsuite/g/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16-565.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb24.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb24.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb32.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal1p1.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmpsuite/q/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16-231.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/wrapper.html create mode 100644 image/test/reftest/bmp/bmpsuite/reftest-stylo.list create mode 100644 image/test/reftest/bmp/bmpsuite/reftest.list create mode 100644 image/test/reftest/bmp/reftest-stylo.list create mode 100644 image/test/reftest/bmp/reftest.list create mode 100644 image/test/reftest/color-management/color-curv.png create mode 100644 image/test/reftest/color-management/color-lin.png create mode 100644 image/test/reftest/color-management/color-table.png create mode 100644 image/test/reftest/color-management/invalid-chrm-ref.png create mode 100644 image/test/reftest/color-management/invalid-chrm.png create mode 100644 image/test/reftest/color-management/invalid-whitepoint.png create mode 100644 image/test/reftest/color-management/reftest-stylo.list create mode 100644 image/test/reftest/color-management/reftest.list create mode 100644 image/test/reftest/color-management/trc-type-ref.html create mode 100644 image/test/reftest/color-management/trc-type.html create mode 100644 image/test/reftest/colordepth.html create mode 100644 image/test/reftest/downscaling/black-border-bottom.png create mode 100644 image/test/reftest/downscaling/black-border-left.png create mode 100644 image/test/reftest/downscaling/black-border-rect.svg create mode 100644 image/test/reftest/downscaling/black-border-right.png create mode 100644 image/test/reftest/downscaling/black-border-top.png create mode 100644 image/test/reftest/downscaling/bmp-size-16x16-24bpp.png create mode 100644 image/test/reftest/downscaling/downscale-1-bigimage.png create mode 100644 image/test/reftest/downscaling/downscale-1-ref.html create mode 100644 image/test/reftest/downscaling/downscale-1-smallimage.png create mode 100644 image/test/reftest/downscaling/downscale-1.html create mode 100644 image/test/reftest/downscaling/downscale-16px.html create mode 100644 image/test/reftest/downscaling/downscale-2a.html create mode 100644 image/test/reftest/downscaling/downscale-2b.html create mode 100644 image/test/reftest/downscaling/downscale-2c.html create mode 100644 image/test/reftest/downscaling/downscale-2d.html create mode 100644 image/test/reftest/downscaling/downscale-2e.html create mode 100644 image/test/reftest/downscaling/downscale-2f.html create mode 100644 image/test/reftest/downscaling/downscale-32px-ref.html create mode 100644 image/test/reftest/downscaling/downscale-32px.html create mode 100644 image/test/reftest/downscaling/downscale-8px.html create mode 100644 image/test/reftest/downscaling/downscale-moz-icon-1-ref.html create mode 100644 image/test/reftest/downscaling/downscale-moz-icon-1.html create mode 100644 image/test/reftest/downscaling/downscale-png.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1-ref.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1a.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1b.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1c.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1d.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1e.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1f.html create mode 100644 image/test/reftest/downscaling/ff-0RGB.ico create mode 100644 image/test/reftest/downscaling/ff-0RGB.png create mode 100644 image/test/reftest/downscaling/ff-ARGB.ico create mode 100644 image/test/reftest/downscaling/ff-ARGB.png create mode 100644 image/test/reftest/downscaling/lime-red-256px-bmp-in.ico create mode 100644 image/test/reftest/downscaling/lime-red-256px-png-in.ico create mode 100644 image/test/reftest/downscaling/lime-red-256px.bmp create mode 100644 image/test/reftest/downscaling/lime-red-256px.gif create mode 100644 image/test/reftest/downscaling/lime-red-256px.jpg create mode 100644 image/test/reftest/downscaling/lime-red-256px.png create mode 100644 image/test/reftest/downscaling/lime-red-256px.svg create mode 100644 image/test/reftest/downscaling/lime-red-32px.png create mode 100644 image/test/reftest/downscaling/png-interlaced.png create mode 100644 image/test/reftest/downscaling/png-normal.png create mode 100644 image/test/reftest/downscaling/reftest-stylo.list create mode 100644 image/test/reftest/downscaling/reftest.list create mode 100644 image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp create mode 100644 image/test/reftest/encoders-lossless/ImageDocument.css create mode 100644 image/test/reftest/encoders-lossless/encoder.html create mode 100644 image/test/reftest/encoders-lossless/reftest-stylo.list create mode 100644 image/test/reftest/encoders-lossless/reftest.list create mode 100644 image/test/reftest/encoders-lossless/size-15x15.png create mode 100644 image/test/reftest/encoders-lossless/size-16x16.png create mode 100644 image/test/reftest/encoders-lossless/size-17x17.png create mode 100644 image/test/reftest/encoders-lossless/size-1x1.png create mode 100644 image/test/reftest/encoders-lossless/size-256x256.png create mode 100644 image/test/reftest/encoders-lossless/size-2x2.png create mode 100644 image/test/reftest/encoders-lossless/size-31x31.png create mode 100644 image/test/reftest/encoders-lossless/size-32x32.png create mode 100644 image/test/reftest/encoders-lossless/size-33x33.png create mode 100644 image/test/reftest/encoders-lossless/size-3x3.png create mode 100644 image/test/reftest/encoders-lossless/size-4x4.png create mode 100644 image/test/reftest/encoders-lossless/size-5x5.png create mode 100644 image/test/reftest/encoders-lossless/size-6x6.png create mode 100644 image/test/reftest/encoders-lossless/size-7x7.png create mode 100644 image/test/reftest/encoders-lossless/size-8x8.png create mode 100644 image/test/reftest/encoders-lossless/size-9x9.png create mode 100644 image/test/reftest/encoders-lossless/test.png create mode 100644 image/test/reftest/generic/accept-image-catchall-ref.html create mode 100644 image/test/reftest/generic/accept-image-catchall.html create mode 100644 image/test/reftest/generic/check-header.sjs create mode 100644 image/test/reftest/generic/green.png create mode 100644 image/test/reftest/generic/reftest-stylo.list create mode 100644 image/test/reftest/generic/reftest.list create mode 100644 image/test/reftest/gif/1bit-255-trans.gif create mode 100644 image/test/reftest/gif/1bit-255-trans.png create mode 100644 image/test/reftest/gif/ImageDocument.css create mode 100644 image/test/reftest/gif/animation1a.gif create mode 100644 image/test/reftest/gif/animation2a-finalframe.gif create mode 100644 image/test/reftest/gif/animation2a.gif create mode 100644 image/test/reftest/gif/blue.gif create mode 100644 image/test/reftest/gif/comment.gif create mode 100644 image/test/reftest/gif/comment.png create mode 100644 image/test/reftest/gif/delaytest.html create mode 100644 image/test/reftest/gif/in-colormap-trans.gif create mode 100644 image/test/reftest/gif/in-colormap-trans.png create mode 100644 image/test/reftest/gif/one-color-offset-ref.gif create mode 100644 image/test/reftest/gif/one-color-offset.gif create mode 100644 image/test/reftest/gif/out-of-colormap-trans.gif create mode 100644 image/test/reftest/gif/out-of-colormap-trans.png create mode 100644 image/test/reftest/gif/red.gif create mode 100644 image/test/reftest/gif/reftest-stylo.list create mode 100644 image/test/reftest/gif/reftest.list create mode 100644 image/test/reftest/gif/small-background-size-2-ref.gif create mode 100644 image/test/reftest/gif/small-background-size-2.gif create mode 100644 image/test/reftest/gif/small-background-size-ref.gif create mode 100644 image/test/reftest/gif/small-background-size.gif create mode 100644 image/test/reftest/gif/test_bug641198.html create mode 100644 image/test/reftest/gif/tile-transform-ref.html create mode 100644 image/test/reftest/gif/tile-transform.html create mode 100644 image/test/reftest/gif/tiletest-ref.png create mode 100644 image/test/reftest/gif/tiletest.gif create mode 100644 image/test/reftest/gif/transparent-animation-finalframe.gif create mode 100644 image/test/reftest/gif/transparent-animation.gif create mode 100644 image/test/reftest/gif/truncated-framerect-interlaced-ref.gif create mode 100644 image/test/reftest/gif/truncated-framerect-interlaced.gif create mode 100644 image/test/reftest/gif/truncated-framerect-ref.gif create mode 100644 image/test/reftest/gif/truncated-framerect-ref.html create mode 100644 image/test/reftest/gif/truncated-framerect.gif create mode 100644 image/test/reftest/gif/truncated-framerect.html create mode 100644 image/test/reftest/ico/cur/pointer.cur create mode 100644 image/test/reftest/ico/cur/pointer.png create mode 100644 image/test/reftest/ico/cur/reftest-stylo.list create mode 100644 image/test/reftest/ico/cur/reftest.list create mode 100644 image/test/reftest/ico/cur/wrapper.html create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/16x16.png create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/wrapper.html create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png.png create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png create mode 100644 image/test/reftest/ico/ico-mixed/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-mixed/reftest.list create mode 100644 image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico create mode 100644 image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-15x15-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-15x15-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-16x16-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-16x16-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-17x17-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-17x17-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-1x1-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-1x1-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-256x256-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-256x256-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-2x2-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-2x2-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-31x31-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-31x31-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-32x32-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-32x32-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-33x33-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-33x33-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-3x3-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-3x3-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-4x4-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-4x4-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-5x5-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-5x5-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-6x6-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-6x6-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-7x7-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-7x7-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-8x8-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-8x8-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-9x9-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-9x9-png.png create mode 100644 image/test/reftest/ico/ico-png/reftest-stylo.list create mode 100644 image/test/reftest/ico/ico-png/reftest.list create mode 100644 image/test/reftest/ico/ico-png/tmp.ico create mode 100644 image/test/reftest/ico/ico-png/transparent-png.ico create mode 100644 image/test/reftest/ico/ico-png/transparent-png.png create mode 100644 image/test/reftest/ico/ico-png/wrapper.html create mode 100644 image/test/reftest/ico/ico-png/x00n0g01.png create mode 100644 image/test/reftest/ico/ico-png/xcrn0g04.png create mode 100644 image/test/reftest/ico/reftest-stylo.list create mode 100644 image/test/reftest/ico/reftest.list create mode 100644 image/test/reftest/img2html.html create mode 100644 image/test/reftest/jpeg/blue.jpg create mode 100644 image/test/reftest/jpeg/jpg-cmyk-1.jpg create mode 100644 image/test/reftest/jpeg/jpg-cmyk-1.png create mode 100644 image/test/reftest/jpeg/jpg-cmyk-2.jpg create mode 100644 image/test/reftest/jpeg/jpg-cmyk-2.png create mode 100644 image/test/reftest/jpeg/jpg-gray.jpg create mode 100644 image/test/reftest/jpeg/jpg-gray.png create mode 100644 image/test/reftest/jpeg/jpg-progressive.jpg create mode 100644 image/test/reftest/jpeg/jpg-progressive.png create mode 100644 image/test/reftest/jpeg/jpg-size-15x15.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-15x15.png create mode 100644 image/test/reftest/jpeg/jpg-size-16x16.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-16x16.png create mode 100644 image/test/reftest/jpeg/jpg-size-17x17.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-17x17.png create mode 100644 image/test/reftest/jpeg/jpg-size-1x1.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-1x1.png create mode 100644 image/test/reftest/jpeg/jpg-size-2x2.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-2x2.png create mode 100644 image/test/reftest/jpeg/jpg-size-31x31.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-31x31.png create mode 100644 image/test/reftest/jpeg/jpg-size-32x32.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-32x32.png create mode 100644 image/test/reftest/jpeg/jpg-size-33x33.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-33x33.png create mode 100644 image/test/reftest/jpeg/jpg-size-3x3.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-3x3.png create mode 100644 image/test/reftest/jpeg/jpg-size-4x4.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-4x4.png create mode 100644 image/test/reftest/jpeg/jpg-size-5x5.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-5x5.png create mode 100644 image/test/reftest/jpeg/jpg-size-6x6.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-6x6.png create mode 100644 image/test/reftest/jpeg/jpg-size-7x7.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-7x7.png create mode 100644 image/test/reftest/jpeg/jpg-size-8x8.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-8x8.png create mode 100644 image/test/reftest/jpeg/jpg-size-9x9.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-9x9.png create mode 100644 image/test/reftest/jpeg/jpg-srgb-icc.jpg create mode 100644 image/test/reftest/jpeg/jpg-srgb-icc.png create mode 100644 image/test/reftest/jpeg/red.jpg create mode 100644 image/test/reftest/jpeg/reftest-stylo.list create mode 100644 image/test/reftest/jpeg/reftest.list create mode 100644 image/test/reftest/jpeg/webcam-simulacrum.mjpg create mode 100644 image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdfn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdfn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdhn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdhn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdsn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdsn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdun2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdun2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/ch1n3p04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ch1n3p04.png create mode 100644 image/test/reftest/pngsuite-ancillary/ch2n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/ch2n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cm0n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/cm0n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/cm7n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/cm7n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/cm9n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/cm9n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n2c16.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n2c16.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/ct0n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ct0n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/ct1n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ct1n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/ctzn0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ctzn0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/qcms-asm-check.js create mode 100644 image/test/reftest/pngsuite-ancillary/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-ancillary/reftest.list create mode 100644 image/test/reftest/pngsuite-background/bg__4a08.html create mode 100644 image/test/reftest/pngsuite-background/bg__4a16.html create mode 100644 image/test/reftest/pngsuite-background/bg__6a08.html create mode 100644 image/test/reftest/pngsuite-background/bg__6a16.html create mode 100644 image/test/reftest/pngsuite-background/bgai4a08.png create mode 100644 image/test/reftest/pngsuite-background/bgai4a16.png create mode 100644 image/test/reftest/pngsuite-background/bgan6a08.png create mode 100644 image/test/reftest/pngsuite-background/bgan6a16.png create mode 100644 image/test/reftest/pngsuite-background/bgbn4a08.png create mode 100644 image/test/reftest/pngsuite-background/bggn4a16.png create mode 100644 image/test/reftest/pngsuite-background/bgwn6a08.png create mode 100644 image/test/reftest/pngsuite-background/bgyn6a16.png create mode 100644 image/test/reftest/pngsuite-background/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-background/reftest.list create mode 100644 image/test/reftest/pngsuite-background/wrapper.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g01.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g01.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g02.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g02.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g04.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g04.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g08.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g16.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g16.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c08.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c16.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c16.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p01.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p01.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p02.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p02.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p04.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p04.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p08.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi4a08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi4a16.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi6a08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi6a16.png create mode 100644 image/test/reftest/pngsuite-basic-i/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-basic-i/reftest.list create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g01.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g01.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g02.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g02.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g04.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g04.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g08.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g16.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g16.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c08.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c16.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c16.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p01.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p01.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p02.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p02.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p04.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p04.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p08.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn4a08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn4a16.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn6a08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn6a16.png create mode 100644 image/test/reftest/pngsuite-basic-n/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-basic-n/reftest.list create mode 100644 image/test/reftest/pngsuite-chunkorder/color.html create mode 100644 image/test/reftest/pngsuite-chunkorder/grayscale.html create mode 100644 image/test/reftest/pngsuite-chunkorder/oi1n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi1n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi2n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi2n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi4n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi4n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi9n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi9n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-chunkorder/reftest.list create mode 100644 image/test/reftest/pngsuite-corrupted/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-corrupted/reftest.list create mode 100644 image/test/reftest/pngsuite-corrupted/wrapper.html create mode 100644 image/test/reftest/pngsuite-corrupted/x00n0g01.png create mode 100644 image/test/reftest/pngsuite-corrupted/xcrn0g04.png create mode 100644 image/test/reftest/pngsuite-corrupted/xlfn0g04.png create mode 100644 image/test/reftest/pngsuite-filtering/f00n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f00n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f00n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f00n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f01n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f01n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f01n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f01n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f02n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f02n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f02n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f02n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f03n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f03n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f03n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f03n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f04n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f04n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f04n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f04n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-filtering/reftest.list create mode 100644 image/test/reftest/pngsuite-gamma/g03n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g03n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g03n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g03n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g03n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g03n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g04n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g04n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g04n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g04n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g04n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g04n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g05n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g05n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g05n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g05n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g05n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g05n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g07n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g07n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g07n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g07n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g07n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g07n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g10n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g10n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g10n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g10n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g10n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g10n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g25n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g25n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g25n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g25n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g25n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g25n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-gamma/reftest.list create mode 100644 image/test/reftest/pngsuite-oddsizes/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-oddsizes/reftest.list create mode 100644 image/test/reftest/pngsuite-oddsizes/s01_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s01i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s01n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s02_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s02i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s02n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s03_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s03i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s03n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s04_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s04i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s04n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s05_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s05i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s05n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s06_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s06i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s06n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s07_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s07i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s07n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s08_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s08i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s08n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s09_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s09i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s09n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s32_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s32i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s32n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s33_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s33i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s33n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s34_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s34i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s34n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s35_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s35i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s35n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s36_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s36i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s36n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s37_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s37i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s37n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s38_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s38i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s38n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s39_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s39i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s39n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s40_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s40i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s40n3p04.png create mode 100644 image/test/reftest/pngsuite-palettes/pp0n2c16.html create mode 100644 image/test/reftest/pngsuite-palettes/pp0n2c16.png create mode 100644 image/test/reftest/pngsuite-palettes/pp0n6a08.png create mode 100644 image/test/reftest/pngsuite-palettes/ps1n0g08.html create mode 100644 image/test/reftest/pngsuite-palettes/ps1n0g08.png create mode 100644 image/test/reftest/pngsuite-palettes/ps1n2c16.html create mode 100644 image/test/reftest/pngsuite-palettes/ps1n2c16.png create mode 100644 image/test/reftest/pngsuite-palettes/ps2n0g08.html create mode 100644 image/test/reftest/pngsuite-palettes/ps2n0g08.png create mode 100644 image/test/reftest/pngsuite-palettes/ps2n2c16.html create mode 100644 image/test/reftest/pngsuite-palettes/ps2n2c16.png create mode 100644 image/test/reftest/pngsuite-palettes/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-palettes/reftest.list create mode 100644 image/test/reftest/pngsuite-transparency/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-transparency/reftest.list create mode 100644 image/test/reftest/pngsuite-transparency/tbbn1g04.html create mode 100644 image/test/reftest/pngsuite-transparency/tbbn1g04.png create mode 100644 image/test/reftest/pngsuite-transparency/tbbn2c16.html create mode 100644 image/test/reftest/pngsuite-transparency/tbbn2c16.png create mode 100644 image/test/reftest/pngsuite-transparency/tbbn3p08.html create mode 100644 image/test/reftest/pngsuite-transparency/tbbn3p08.png create mode 100644 image/test/reftest/pngsuite-transparency/tbgn2c16.html create mode 100644 image/test/reftest/pngsuite-transparency/tbgn2c16.png create mode 100644 image/test/reftest/pngsuite-transparency/tbgn3p08.html create mode 100644 image/test/reftest/pngsuite-transparency/tbgn3p08.png create mode 100644 image/test/reftest/pngsuite-transparency/tbrn2c08.html create mode 100644 image/test/reftest/pngsuite-transparency/tbrn2c08.png create mode 100644 image/test/reftest/pngsuite-transparency/tbwn1g16.html create mode 100644 image/test/reftest/pngsuite-transparency/tbwn1g16.png create mode 100644 image/test/reftest/pngsuite-transparency/tbwn3p08.html create mode 100644 image/test/reftest/pngsuite-transparency/tbwn3p08.png create mode 100644 image/test/reftest/pngsuite-transparency/tbyn3p08.html create mode 100644 image/test/reftest/pngsuite-transparency/tbyn3p08.png create mode 100644 image/test/reftest/pngsuite-transparency/tp1n3p08.html create mode 100644 image/test/reftest/pngsuite-transparency/tp1n3p08.png create mode 100644 image/test/reftest/pngsuite-transparency/wrapper.html create mode 100644 image/test/reftest/pngsuite-zlib/reftest-stylo.list create mode 100644 image/test/reftest/pngsuite-zlib/reftest.list create mode 100644 image/test/reftest/pngsuite-zlib/z00n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z00n2c08.png create mode 100644 image/test/reftest/pngsuite-zlib/z03n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z03n2c08.png create mode 100644 image/test/reftest/pngsuite-zlib/z06n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z06n2c08.png create mode 100644 image/test/reftest/pngsuite-zlib/z09n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z09n2c08.png create mode 100644 image/test/reftest/reftest-stylo.list create mode 100644 image/test/reftest/reftest.list create mode 100644 image/test/unit/async_load_tests.js create mode 100644 image/test/unit/bug413512.ico create mode 100644 image/test/unit/bug815359.ico create mode 100644 image/test/unit/image1.png create mode 100644 image/test/unit/image1png16x16.jpg create mode 100644 image/test/unit/image1png64x64.jpg create mode 100644 image/test/unit/image2.jpg create mode 100644 image/test/unit/image2jpg16x16-win.png create mode 100644 image/test/unit/image2jpg16x16.png create mode 100644 image/test/unit/image2jpg16x16cropped.jpg create mode 100644 image/test/unit/image2jpg16x16cropped2.jpg create mode 100644 image/test/unit/image2jpg16x32cropped3.jpg create mode 100644 image/test/unit/image2jpg16x32scaled.jpg create mode 100644 image/test/unit/image2jpg32x16cropped4.jpg create mode 100644 image/test/unit/image2jpg32x16scaled.jpg create mode 100644 image/test/unit/image2jpg32x32-win.png create mode 100644 image/test/unit/image2jpg32x32.jpg create mode 100644 image/test/unit/image2jpg32x32.png create mode 100644 image/test/unit/image3.ico create mode 100644 image/test/unit/image3ico16x16.png create mode 100644 image/test/unit/image3ico32x32.png create mode 100644 image/test/unit/image4.gif create mode 100644 image/test/unit/image4gif16x16bmp24bpp.ico create mode 100644 image/test/unit/image4gif16x16bmp32bpp.ico create mode 100644 image/test/unit/image4gif32x32bmp24bpp.ico create mode 100644 image/test/unit/image4gif32x32bmp32bpp.ico create mode 100644 image/test/unit/image_load_helpers.js create mode 100644 image/test/unit/test_async_notification.js create mode 100644 image/test/unit/test_async_notification_404.js create mode 100644 image/test/unit/test_async_notification_animated.js create mode 100644 image/test/unit/test_encoder_apng.js create mode 100644 image/test/unit/test_encoder_png.js create mode 100644 image/test/unit/test_imgtools.js create mode 100644 image/test/unit/test_moz_icon_uri.js create mode 100644 image/test/unit/test_private_channel.js create mode 100644 image/test/unit/xpcshell.ini (limited to 'image/test') diff --git a/image/test/browser/animated.gif b/image/test/browser/animated.gif new file mode 100644 index 000000000..eb034e150 Binary files /dev/null and b/image/test/browser/animated.gif differ diff --git a/image/test/browser/animated2.gif b/image/test/browser/animated2.gif new file mode 100644 index 000000000..053eaae68 Binary files /dev/null and b/image/test/browser/animated2.gif differ diff --git a/image/test/browser/big.png b/image/test/browser/big.png new file mode 100644 index 000000000..94e7eb6db Binary files /dev/null and b/image/test/browser/big.png differ diff --git a/image/test/browser/browser.ini b/image/test/browser/browser.ini new file mode 100644 index 000000000..d5e94e575 --- /dev/null +++ b/image/test/browser/browser.ini @@ -0,0 +1,14 @@ +[DEFAULT] +support-files = + animated.gif + animated2.gif + big.png + head.js + image.html + imageX2.html + +[browser_bug666317.js] +skip-if = true || e10s # Bug 1207012 - Permaorange from an uncaught exception that isn't actually turning the suite orange until it hits beta, Bug 948194 - Decoded Images seem to not be discarded on memory-pressure notification with e10s enabled +[browser_image.js] +skip-if = true # Bug 987616 +[browser_docshell_type_editor.js] diff --git a/image/test/browser/browser_bug666317.js b/image/test/browser/browser_bug666317.js new file mode 100644 index 000000000..2bd2d0615 --- /dev/null +++ b/image/test/browser/browser_bug666317.js @@ -0,0 +1,140 @@ +waitForExplicitFinish(); + +var pageSource = + '' + + '' + + ''; + +var oldDiscardingPref, oldTab, newTab; +var prefBranch = Cc["@mozilla.org/preferences-service;1"] + .getService(Ci.nsIPrefService) + .getBranch('image.mem.'); + +var gWaitingForDiscard = false; +var gScriptedObserver; +var gClonedRequest; + +function ImageObserver(decodeCallback, discardCallback) { + this.decodeComplete = function onDecodeComplete(aRequest) { + decodeCallback(); + } + + this.discard = function onDiscard(request) + { + if (!gWaitingForDiscard) { + return; + } + + this.synchronous = false; + discardCallback(); + } + + this.synchronous = true; +} + +function currentRequest() { + let img = gBrowser.getBrowserForTab(newTab).contentWindow + .document.getElementById('testImg'); + img.QueryInterface(Ci.nsIImageLoadingContent); + return img.getRequest(Ci.nsIImageLoadingContent.CURRENT_REQUEST); +} + +function isImgDecoded() { + let request = currentRequest(); + return request.imageStatus & Ci.imgIRequest.STATUS_DECODE_COMPLETE ? true : false; +} + +// Ensure that the image is decoded by drawing it to a canvas. +function forceDecodeImg() { + let doc = gBrowser.getBrowserForTab(newTab).contentWindow.document; + let img = doc.getElementById('testImg'); + let canvas = doc.createElement('canvas'); + let ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); +} + +function runAfterAsyncEvents(aCallback) { + function handlePostMessage(aEvent) { + if (aEvent.data == 'next') { + window.removeEventListener('message', handlePostMessage, false); + aCallback(); + } + } + + window.addEventListener('message', handlePostMessage, false); + + // We'll receive the 'message' event after everything else that's currently in + // the event queue (which is a stronger guarantee than setTimeout, because + // setTimeout events may be coalesced). This lets us ensure that we run + // aCallback *after* any asynchronous events are delivered. + window.postMessage('next', '*'); +} + +function test() { + // Enable the discarding pref. + oldDiscardingPref = prefBranch.getBoolPref('discardable'); + prefBranch.setBoolPref('discardable', true); + + // Create and focus a new tab. + oldTab = gBrowser.selectedTab; + newTab = gBrowser.addTab('data:text/html,' + pageSource); + gBrowser.selectedTab = newTab; + + // Run step2 after the tab loads. + gBrowser.getBrowserForTab(newTab) + .addEventListener("pageshow", step2); +} + +function step2() { + // Create the image observer. + var observer = + new ImageObserver(() => runAfterAsyncEvents(step3), // DECODE_COMPLETE + () => runAfterAsyncEvents(step5)); // DISCARD + gScriptedObserver = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(observer); + + // Clone the current imgIRequest with our new observer. + var request = currentRequest(); + gClonedRequest = request.clone(gScriptedObserver); + + // Check that the image is decoded. + forceDecodeImg(); + + // The DECODE_COMPLETE notification is delivered asynchronously. ImageObserver will + // eventually call step3. +} + +function step3() { + ok(isImgDecoded(), 'Image should initially be decoded.'); + + // Focus the old tab, then fire a memory-pressure notification. This should + // cause the decoded image in the new tab to be discarded. + gBrowser.selectedTab = oldTab; + + // Allow time to process the tab change. + runAfterAsyncEvents(step4); +} + +function step4() { + gWaitingForDiscard = true; + + var os = Cc["@mozilla.org/observer-service;1"] + .getService(Ci.nsIObserverService); + os.notifyObservers(null, 'memory-pressure', 'heap-minimize'); + + // The DISCARD notification is delivered asynchronously. ImageObserver will + // eventually call step5. (Or else, sadly, the test will time out.) +} + +function step5() { + ok(true, 'Image should be discarded.'); + + // And we're done. + gBrowser.removeTab(newTab); + prefBranch.setBoolPref('discardable', oldDiscardingPref); + + gClonedRequest.cancelAndForgetObserver(0); + + finish(); +} diff --git a/image/test/browser/browser_docshell_type_editor.js b/image/test/browser/browser_docshell_type_editor.js new file mode 100644 index 000000000..8ac98924f --- /dev/null +++ b/image/test/browser/browser_docshell_type_editor.js @@ -0,0 +1,92 @@ + +"use strict"; + +const Ci = Components.interfaces; +const SIMPLE_HTML = "data:text/html,"; + +// The following URI is *not* accessible to content, hence loading that URI +// from an unprivileged site should be blocked. If docshell is of appType +// APP_TYPE_EDITOR however the load should be allowed. +// >> chrome://devtools/content/framework/dev-edition-promo/dev-edition-logo.png + +add_task(function* () { + info("docshell of appType APP_TYPE_EDITOR can access privileged images."); + + yield BrowserTestUtils.withNewTab({ + gBrowser, + url: SIMPLE_HTML + }, function* (browser) { + yield ContentTask.spawn(browser, null, function* () { + let rootDocShell = docShell.QueryInterface(Ci.nsIDocShellTreeItem) + .rootTreeItem + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDocShell); + let defaultAppType = rootDocShell.appType; + + rootDocShell.appType = Ci.nsIDocShell.APP_TYPE_EDITOR; + + is(rootDocShell.appType, Ci.nsIDocShell.APP_TYPE_EDITOR, + "sanity check: appType after update should be type editor"); + + return new Promise(resolve => { + let doc = content.document; + let image = doc.createElement("img"); + image.onload = function() { + ok(true, "APP_TYPE_EDITOR is allowed to load privileged image"); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + } + image.onerror = function() { + ok(false, "APP_TYPE_EDITOR is allowed to load privileged image"); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + } + doc.body.appendChild(image); + image.src = "chrome://devtools/content/framework/dev-edition-promo/dev-edition-logo.png"; + }); + }); + }); +}); + +add_task(function* () { + info("docshell of appType APP_TYPE_UNKNOWN can *not* access privileged images."); + + yield BrowserTestUtils.withNewTab({ + gBrowser, + url: SIMPLE_HTML + }, function* (browser) { + yield ContentTask.spawn(browser, null, function* () { + let rootDocShell = docShell.QueryInterface(Ci.nsIDocShellTreeItem) + .rootTreeItem + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDocShell); + let defaultAppType = rootDocShell.appType; + + rootDocShell.appType = Ci.nsIDocShell.APP_TYPE_UNKNOWN; + + is(rootDocShell.appType, Ci.nsIDocShell.APP_TYPE_UNKNOWN, + "sanity check: appType of docshell should be unknown"); + + return new Promise(resolve => { + let doc = content.document; + let image = doc.createElement("img"); + image.onload = function() { + ok(false, "APP_TYPE_UNKNOWN is *not* allowed to acces privileged image"); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + } + image.onerror = function() { + ok(true, "APP_TYPE_UNKNOWN is *not* allowed to acces privileged image"); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + } + doc.body.appendChild(image); + image.src = "chrome://devtools/content/framework/dev-edition-promo/dev-edition-logo.png"; + }); + }); + }); +}); diff --git a/image/test/browser/browser_image.js b/image/test/browser/browser_image.js new file mode 100644 index 000000000..9527726c3 --- /dev/null +++ b/image/test/browser/browser_image.js @@ -0,0 +1,195 @@ +waitForExplicitFinish(); +requestLongerTimeout(2); // see bug 660123 -- this test is slow on Mac. + +// A hold on the current timer, so it doens't get GCed out from +// under us +var gTimer; + +// Browsing to a new URL - pushing us into the bfcache - should cause +// animations to stop, and resume when we return +function testBFCache() { + function theTest() { + var abort = false; + var chances, gImage, gFrames; + gBrowser.selectedTab = gBrowser.addTab(TESTROOT + "image.html"); + gBrowser.selectedBrowser.addEventListener("pageshow", function () { + gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, true); + var window = gBrowser.contentWindow; + // If false, we are in an optimized build, and we abort this and + // all further tests + if (!actOnMozImage(window.document, "img1", function(image) { + gImage = image; + gFrames = gImage.framesNotified; + })) { + gBrowser.removeCurrentTab(); + abort = true; + } + goer.next(); + }, true); + yield; + if (abort) { + finish(); + yield; // optimized build + } + + // Let animation run for a bit + chances = 120; + do { + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback(function() { + if (gImage.framesNotified >= 20) { + goer.send(true); + } else { + chances--; + goer.send(chances == 0); // maybe if we wait a bit, it will happen + } + }, 500, Ci.nsITimer.TYPE_ONE_SHOT); + } while (!(yield)); + is(chances > 0, true, "Must have animated a few frames so far"); + + // Browse elsewhere; push our animating page into the bfcache + gBrowser.loadURI("about:blank"); + + // Wait a bit for page to fully load, then wait a while and + // see that no animation occurs. + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback(function() { + gFrames = gImage.framesNotified; + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback(function() { + // Might have a few stray frames, until other page totally loads + var additionalFrames = gImage.framesNotified - gFrames; + is(additionalFrames == 0, true, "Must have not animated in bfcache! Got " + additionalFrames + " additional frames"); + goer.next(); + }, 4000, Ci.nsITimer.TYPE_ONE_SHOT); // 4 seconds - expect 40 frames + }, 0, Ci.nsITimer.TYPE_ONE_SHOT); // delay of 0 - wait for next event loop + yield; + + // Go back + gBrowser.goBack(); + + chances = 120; + do { + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback(function() { + if (gImage.framesNotified - gFrames >= 20) { + goer.send(true); + } else { + chances--; + goer.send(chances == 0); // maybe if we wait a bit, it will happen + } + }, 500, Ci.nsITimer.TYPE_ONE_SHOT); + } while (!(yield)); + is(chances > 0, true, "Must have animated once out of bfcache!"); + + // Finally, check that the css background image has essentially the same + // # of frames, implying that it animated at the same times as the regular + // image. We can easily retrieve regular images through their HTML image + // elements, which is what we did before. For the background image, we + // create a regular image now, and read the current frame count. + var doc = gBrowser.selectedBrowser.contentWindow.document; + var div = doc.getElementById("background_div"); + div.innerHTML += ''; + actOnMozImage(doc, "img3", function(image) { + is(Math.abs(image.framesNotified - gImage.framesNotified)/gImage.framesNotified < 0.5, true, + "Must have also animated the background image, and essentially the same # of frames. " + + "Regular image got " + gImage.framesNotified + " frames but background image got " + image.framesNotified); + }); + + gBrowser.removeCurrentTab(); + + nextTest(); + } + + var goer = theTest(); + goer.next(); +} + +// Check that imgContainers are shared on the same page and +// between tabs +function testSharedContainers() { + function theTest() { + var gImages = []; + var gFrames; + + gBrowser.selectedTab = gBrowser.addTab(TESTROOT + "image.html"); + gBrowser.selectedBrowser.addEventListener("pageshow", function () { + gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, true); + actOnMozImage(gBrowser.contentDocument, "img1", function(image) { + gImages[0] = image; + gFrames = image.framesNotified; // May in theory have frames from last test + // in this counter - so subtract them out + }); + goer.next(); + }, true); + yield; + + // Load next tab somewhat later + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback(function() { + goer.next(); + }, 1500, Ci.nsITimer.TYPE_ONE_SHOT); + yield; + + gBrowser.selectedTab = gBrowser.addTab(TESTROOT + "imageX2.html"); + gBrowser.selectedBrowser.addEventListener("pageshow", function () { + gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, true); + [1,2].forEach(function(i) { + actOnMozImage(gBrowser.contentDocument, "img"+i, function(image) { + gImages[i] = image; + }); + }); + goer.next(); + }, true); + yield; + + var chances = 120; + do { + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback(function() { + if (gImages[0].framesNotified - gFrames >= 10) { + goer.send(true); + } else { + chances--; + goer.send(chances == 0); // maybe if we wait a bit, it will happen + } + }, 500, Ci.nsITimer.TYPE_ONE_SHOT); + } while (!(yield)); + is(chances > 0, true, "Must have been animating while showing several images"); + + // Check they all have the same frame counts + var theFrames = null; + [0,1,2].forEach(function(i) { + var frames = gImages[i].framesNotified; + if (theFrames == null) { + theFrames = frames; + } else { + is(theFrames, frames, "Sharing the same imgContainer means *exactly* the same frame counts!"); + } + }); + + gBrowser.removeCurrentTab(); + gBrowser.removeCurrentTab(); + + nextTest(); + } + + var goer = theTest(); + goer.next(); +} + +var tests = [testBFCache, testSharedContainers]; + +function nextTest() { + if (tests.length == 0) { + finish(); + return; + } + tests.shift()(); +} + +function test() { + ignoreAllUncaughtExceptions(); + nextTest(); +} + diff --git a/image/test/browser/head.js b/image/test/browser/head.js new file mode 100644 index 000000000..91a5f5793 --- /dev/null +++ b/image/test/browser/head.js @@ -0,0 +1,26 @@ +const RELATIVE_DIR = "image/test/browser/"; +const TESTROOT = "http://example.com/browser/" + RELATIVE_DIR; +const TESTROOT2 = "http://example.org/browser/" + RELATIVE_DIR; + +var chrome_root = getRootDirectory(gTestPath); +const CHROMEROOT = chrome_root; + +function getImageLoading(doc, id) { + var htmlImg = doc.getElementById(id); + return htmlImg.QueryInterface(Ci.nsIImageLoadingContent); +} + +// Tries to get the Moz debug image, imgIContainerDebug. Only works +// in a debug build. If we succeed, we call func(). +function actOnMozImage(doc, id, func) { + var imgContainer = getImageLoading(doc, id).getRequest(Ci.nsIImageLoadingContent.CURRENT_REQUEST).image; + var mozImage; + try { + mozImage = imgContainer.QueryInterface(Ci.imgIContainerDebug); + } + catch (e) { + return false; + } + func(mozImage); + return true; +} diff --git a/image/test/browser/image.html b/image/test/browser/image.html new file mode 100644 index 000000000..298bf1bdc --- /dev/null +++ b/image/test/browser/image.html @@ -0,0 +1,24 @@ + + + + + Imagelib2 animation tests + + + + +

Page with image

+ +
+ + + diff --git a/image/test/browser/imageX2.html b/image/test/browser/imageX2.html new file mode 100644 index 000000000..bdacd0888 --- /dev/null +++ b/image/test/browser/imageX2.html @@ -0,0 +1,15 @@ + + + + + Imagelib2 animation tests + + +

Page with images

+ +
+ + + + diff --git a/image/test/crashtests/1205923-1.html b/image/test/crashtests/1205923-1.html new file mode 100644 index 000000000..456fc51b6 --- /dev/null +++ b/image/test/crashtests/1205923-1.html @@ -0,0 +1,36 @@ + + + + + + diff --git a/image/test/crashtests/1210745-1.gif b/image/test/crashtests/1210745-1.gif new file mode 100644 index 000000000..92bcf7222 Binary files /dev/null and b/image/test/crashtests/1210745-1.gif differ diff --git a/image/test/crashtests/1212954-1.svg b/image/test/crashtests/1212954-1.svg new file mode 100644 index 000000000..83dd7b9c7 --- /dev/null +++ b/image/test/crashtests/1212954-1.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/image/test/crashtests/1235605.gif b/image/test/crashtests/1235605.gif new file mode 100644 index 000000000..e7c3ea0b8 Binary files /dev/null and b/image/test/crashtests/1235605.gif differ diff --git a/image/test/crashtests/1241728-1.html b/image/test/crashtests/1241728-1.html new file mode 100644 index 000000000..126c02e62 --- /dev/null +++ b/image/test/crashtests/1241728-1.html @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/image/test/crashtests/1241729-1.bmp b/image/test/crashtests/1241729-1.bmp new file mode 100644 index 000000000..e6f36d039 Binary files /dev/null and b/image/test/crashtests/1241729-1.bmp differ diff --git a/image/test/crashtests/1241729-1.html b/image/test/crashtests/1241729-1.html new file mode 100644 index 000000000..47f23134b --- /dev/null +++ b/image/test/crashtests/1241729-1.html @@ -0,0 +1,5 @@ + + + + + diff --git a/image/test/crashtests/1242093-1.html b/image/test/crashtests/1242093-1.html new file mode 100644 index 000000000..3eab166ef --- /dev/null +++ b/image/test/crashtests/1242093-1.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/image/test/crashtests/1242778-1.png b/image/test/crashtests/1242778-1.png new file mode 100644 index 000000000..4504d54e4 Binary files /dev/null and b/image/test/crashtests/1242778-1.png differ diff --git a/image/test/crashtests/1249576-1.png b/image/test/crashtests/1249576-1.png new file mode 100644 index 000000000..637dafbc2 Binary files /dev/null and b/image/test/crashtests/1249576-1.png differ diff --git a/image/test/crashtests/1251091-1.html b/image/test/crashtests/1251091-1.html new file mode 100644 index 000000000..520a393b4 --- /dev/null +++ b/image/test/crashtests/1251091-1.html @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/image/test/crashtests/1251091-1.png b/image/test/crashtests/1251091-1.png new file mode 100644 index 000000000..078b19a56 Binary files /dev/null and b/image/test/crashtests/1251091-1.png differ diff --git a/image/test/crashtests/1253362-1.html b/image/test/crashtests/1253362-1.html new file mode 100644 index 000000000..fdee850aa --- /dev/null +++ b/image/test/crashtests/1253362-1.html @@ -0,0 +1,11 @@ + + + + + + + +
+ + + diff --git a/image/test/crashtests/256-height.ico b/image/test/crashtests/256-height.ico new file mode 100644 index 000000000..6a3c5c194 Binary files /dev/null and b/image/test/crashtests/256-height.ico differ diff --git a/image/test/crashtests/256-width.ico b/image/test/crashtests/256-width.ico new file mode 100644 index 000000000..a82983ce4 Binary files /dev/null and b/image/test/crashtests/256-width.ico differ diff --git a/image/test/crashtests/463696.bmp b/image/test/crashtests/463696.bmp new file mode 100644 index 000000000..ec80d5412 Binary files /dev/null and b/image/test/crashtests/463696.bmp differ diff --git a/image/test/crashtests/523528-1.gif b/image/test/crashtests/523528-1.gif new file mode 100644 index 000000000..abadca7ad Binary files /dev/null and b/image/test/crashtests/523528-1.gif differ diff --git a/image/test/crashtests/523528-2.gif b/image/test/crashtests/523528-2.gif new file mode 100644 index 000000000..5be3bd46f Binary files /dev/null and b/image/test/crashtests/523528-2.gif differ diff --git a/image/test/crashtests/570451.png b/image/test/crashtests/570451.png new file mode 100644 index 000000000..c49f2d11f Binary files /dev/null and b/image/test/crashtests/570451.png differ diff --git a/image/test/crashtests/681190.html b/image/test/crashtests/681190.html new file mode 100644 index 000000000..b513d5ac6 --- /dev/null +++ b/image/test/crashtests/681190.html @@ -0,0 +1,10 @@ + + + + + + + diff --git a/image/test/crashtests/694165-1.xhtml b/image/test/crashtests/694165-1.xhtml new file mode 100644 index 000000000..1e340a0f2 --- /dev/null +++ b/image/test/crashtests/694165-1.xhtml @@ -0,0 +1,510 @@ + + +]> + + + + diff --git a/image/test/crashtests/732319-1.html b/image/test/crashtests/732319-1.html new file mode 100644 index 000000000..b9d9c6de8 --- /dev/null +++ b/image/test/crashtests/732319-1.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/crashtests/83804-1.gif b/image/test/crashtests/83804-1.gif new file mode 100644 index 000000000..3967c703f Binary files /dev/null and b/image/test/crashtests/83804-1.gif differ diff --git a/image/test/crashtests/844403-1.html b/image/test/crashtests/844403-1.html new file mode 100644 index 000000000..5da6c9021 --- /dev/null +++ b/image/test/crashtests/844403-1.html @@ -0,0 +1,10 @@ + + + diff --git a/image/test/crashtests/856616.gif b/image/test/crashtests/856616.gif new file mode 100644 index 000000000..0fac81101 Binary files /dev/null and b/image/test/crashtests/856616.gif differ diff --git a/image/test/crashtests/89341-1.gif b/image/test/crashtests/89341-1.gif new file mode 100644 index 000000000..14b3892d1 Binary files /dev/null and b/image/test/crashtests/89341-1.gif differ diff --git a/image/test/crashtests/944353.jpg b/image/test/crashtests/944353.jpg new file mode 100644 index 000000000..fd81c5826 Binary files /dev/null and b/image/test/crashtests/944353.jpg differ diff --git a/image/test/crashtests/colormap-range.gif b/image/test/crashtests/colormap-range.gif new file mode 100644 index 000000000..887add653 Binary files /dev/null and b/image/test/crashtests/colormap-range.gif differ diff --git a/image/test/crashtests/crashtests.list b/image/test/crashtests/crashtests.list new file mode 100644 index 000000000..799c37314 --- /dev/null +++ b/image/test/crashtests/crashtests.list @@ -0,0 +1,51 @@ +# Bug 668068 - Maximum (256) width and height icons that we currently interpret as 0-width and 0-height. +load 256-height.ico +load 256-width.ico + +load 83804-1.gif +load 89341-1.gif +load 463696.bmp +load 570451.png +skip-if(Android) load 694165-1.xhtml +load 681190.html +load 732319-1.html +load 844403-1.html +load 856616.gif +load 944353.jpg +load 1205923-1.html +# Ensure we handle detecting that an image is animated, then failing to decode +# it. (See bug 1210745.) +load 1210745-1.gif +load 1212954-1.svg +load 1235605.gif +load 1241728-1.html +load 1241729-1.html +load 1242093-1.html +load 1242778-1.png +load 1249576-1.png +load 1253362-1.html +load colormap-range.gif +HTTP load delayedframe.sjs # A 3-frame animated GIF with an inordinate delay between the second and third frame + +# Animated gifs with a very large canvas, but tiny actual content. +load delaytest.html?523528-1.gif +load delaytest.html?523528-2.gif + +# Bug 1160801 - Ensure that we handle invalid disposal types. +load invalid-disposal-method-1.gif +load invalid-disposal-method-2.gif +load invalid-disposal-method-3.gif + +load invalid-icc-profile.jpg # This would have exposed the leak discovered in bug 642902 + +# Ensure we handle ICO directory entries which specify the wrong size for the contained resource. +load invalid_ico_height.ico +load invalid_ico_width.ico + +# Bug 525326 - Test image sizes of 65535x65535 which is larger than we allow) +load invalid-size.gif +load invalid-size-second-frame.gif + +load multiple-png-hassize.ico # Bug 863958 - This icon's size is such that it leads to multiple writes to the PNG decoder after we've gotten our size. +asserts(0-2) load ownerdiscard.html # Bug 807211 +load truncated-second-frame.png # Bug 863975 diff --git a/image/test/crashtests/delayedframe.sjs b/image/test/crashtests/delayedframe.sjs new file mode 100644 index 000000000..31eb1eff8 --- /dev/null +++ b/image/test/crashtests/delayedframe.sjs @@ -0,0 +1,44 @@ +function getFileStream(filename) +{ + // Get the location of this sjs file, and then use that to figure out where + // to find where our other files are. + var self = Components.classes["@mozilla.org/file/local;1"] + .createInstance(Components.interfaces.nsILocalFile); + self.initWithPath(getState("__LOCATION__")); + var file = self.parent; + file.append(filename); + dump(file.path + "\n"); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + + return fileStream; +} + +var gTimer; + +function handleRequest(request, response) +{ + response.processAsync(); + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/gif", false); + + var firststream = getFileStream("threeframes-start.gif"); + response.bodyOutputStream.writeFrom(firststream, firststream.available()) + firststream.close(); + + gTimer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); + gTimer.initWithCallback(function() + { + var secondstream = getFileStream("threeframes-end.gif"); + response.bodyOutputStream.writeFrom(secondstream, secondstream.available()) + secondstream.close(); + response.finish(); + + // This time needs to be longer than the animation timer in + // threeframes-start.gif. That's specified as 100ms; just use 5 seconds as + // a reasonable upper bound. Since this is just a crashtest, timeouts + // aren't a big deal. + }, 5 * 1000 /* milliseconds */, Components.interfaces.nsITimer.TYPE_ONE_SHOT); +} diff --git a/image/test/crashtests/delaytest.html b/image/test/crashtests/delaytest.html new file mode 100644 index 000000000..00cd1ebd1 --- /dev/null +++ b/image/test/crashtests/delaytest.html @@ -0,0 +1,44 @@ + + + +Delayed image reftest wrapper + + + + + + diff --git a/image/test/crashtests/discardframe.htm b/image/test/crashtests/discardframe.htm new file mode 100644 index 000000000..5ced0029c --- /dev/null +++ b/image/test/crashtests/discardframe.htm @@ -0,0 +1 @@ + diff --git a/image/test/crashtests/ie.png b/image/test/crashtests/ie.png new file mode 100644 index 000000000..74c4a1a32 Binary files /dev/null and b/image/test/crashtests/ie.png differ diff --git a/image/test/crashtests/invalid-disposal-method-1.gif b/image/test/crashtests/invalid-disposal-method-1.gif new file mode 100644 index 000000000..30c61de18 Binary files /dev/null and b/image/test/crashtests/invalid-disposal-method-1.gif differ diff --git a/image/test/crashtests/invalid-disposal-method-2.gif b/image/test/crashtests/invalid-disposal-method-2.gif new file mode 100644 index 000000000..66158d81a Binary files /dev/null and b/image/test/crashtests/invalid-disposal-method-2.gif differ diff --git a/image/test/crashtests/invalid-disposal-method-3.gif b/image/test/crashtests/invalid-disposal-method-3.gif new file mode 100644 index 000000000..0da072377 Binary files /dev/null and b/image/test/crashtests/invalid-disposal-method-3.gif differ diff --git a/image/test/crashtests/invalid-icc-profile.jpg b/image/test/crashtests/invalid-icc-profile.jpg new file mode 100644 index 000000000..938c7713c Binary files /dev/null and b/image/test/crashtests/invalid-icc-profile.jpg differ diff --git a/image/test/crashtests/invalid-size-second-frame.gif b/image/test/crashtests/invalid-size-second-frame.gif new file mode 100644 index 000000000..22005ae4c Binary files /dev/null and b/image/test/crashtests/invalid-size-second-frame.gif differ diff --git a/image/test/crashtests/invalid-size.gif b/image/test/crashtests/invalid-size.gif new file mode 100644 index 000000000..665ca9b5d Binary files /dev/null and b/image/test/crashtests/invalid-size.gif differ diff --git a/image/test/crashtests/invalid_ico_height.ico b/image/test/crashtests/invalid_ico_height.ico new file mode 100644 index 000000000..50d684227 Binary files /dev/null and b/image/test/crashtests/invalid_ico_height.ico differ diff --git a/image/test/crashtests/invalid_ico_width.ico b/image/test/crashtests/invalid_ico_width.ico new file mode 100644 index 000000000..4ace07c16 Binary files /dev/null and b/image/test/crashtests/invalid_ico_width.ico differ diff --git a/image/test/crashtests/multiple-png-hassize.ico b/image/test/crashtests/multiple-png-hassize.ico new file mode 100644 index 000000000..694422001 Binary files /dev/null and b/image/test/crashtests/multiple-png-hassize.ico differ diff --git a/image/test/crashtests/ownerdiscard.html b/image/test/crashtests/ownerdiscard.html new file mode 100644 index 000000000..8d4a619fc --- /dev/null +++ b/image/test/crashtests/ownerdiscard.html @@ -0,0 +1,49 @@ + + + +
+ + +
+ + + diff --git a/image/test/crashtests/threeframes-end.gif b/image/test/crashtests/threeframes-end.gif new file mode 100644 index 000000000..baf6a418c Binary files /dev/null and b/image/test/crashtests/threeframes-end.gif differ diff --git a/image/test/crashtests/threeframes-start.gif b/image/test/crashtests/threeframes-start.gif new file mode 100644 index 000000000..bc641a316 Binary files /dev/null and b/image/test/crashtests/threeframes-start.gif differ diff --git a/image/test/crashtests/truncated-second-frame.png b/image/test/crashtests/truncated-second-frame.png new file mode 100644 index 000000000..0aef5e44d Binary files /dev/null and b/image/test/crashtests/truncated-second-frame.png differ diff --git a/image/test/crashtests/unsized-svg.svg b/image/test/crashtests/unsized-svg.svg new file mode 100644 index 000000000..714efc7ef --- /dev/null +++ b/image/test/crashtests/unsized-svg.svg @@ -0,0 +1 @@ + diff --git a/image/test/gtest/Common.cpp b/image/test/gtest/Common.cpp new file mode 100644 index 000000000..5a24bbb14 --- /dev/null +++ b/image/test/gtest/Common.cpp @@ -0,0 +1,673 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "Common.h" + +#include + +#include "nsDirectoryServiceDefs.h" +#include "nsIDirectoryService.h" +#include "nsIFile.h" +#include "nsIInputStream.h" +#include "nsIProperties.h" +#include "nsNetUtil.h" +#include "mozilla/RefPtr.h" +#include "nsStreamUtils.h" +#include "nsString.h" + +namespace mozilla { +namespace image { + +using namespace gfx; + +using std::abs; +using std::vector; + +/////////////////////////////////////////////////////////////////////////////// +// General Helpers +/////////////////////////////////////////////////////////////////////////////// + +// These macros work like gtest's ASSERT_* macros, except that they can be used +// in functions that return values. +#define ASSERT_TRUE_OR_RETURN(e, rv) \ + EXPECT_TRUE(e); \ + if (!(e)) { \ + return rv; \ + } + +#define ASSERT_EQ_OR_RETURN(a, b, rv) \ + EXPECT_EQ(a, b); \ + if ((a) != (b)) { \ + return rv; \ + } + +#define ASSERT_GE_OR_RETURN(a, b, rv) \ + EXPECT_GE(a, b); \ + if (!((a) >= (b))) { \ + return rv; \ + } + +#define ASSERT_LE_OR_RETURN(a, b, rv) \ + EXPECT_LE(a, b); \ + if (!((a) <= (b))) { \ + return rv; \ + } + +#define ASSERT_LT_OR_RETURN(a, b, rv) \ + EXPECT_LT(a, b); \ + if (!((a) < (b))) { \ + return rv; \ + } + +already_AddRefed +LoadFile(const char* aRelativePath) +{ + nsresult rv; + + nsCOMPtr dirService = + do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID); + ASSERT_TRUE_OR_RETURN(dirService != nullptr, nullptr); + + // Retrieve the current working directory. + nsCOMPtr file; + rv = dirService->Get(NS_OS_CURRENT_WORKING_DIR, + NS_GET_IID(nsIFile), getter_AddRefs(file)); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + + // Construct the final path by appending the working path to the current + // working directory. + file->AppendNative(nsDependentCString(aRelativePath)); + + // Construct an input stream for the requested file. + nsCOMPtr inputStream; + rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), file); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + + // Ensure the resulting input stream is buffered. + if (!NS_InputStreamIsBuffered(inputStream)) { + nsCOMPtr bufStream; + rv = NS_NewBufferedInputStream(getter_AddRefs(bufStream), + inputStream, 1024); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + inputStream = bufStream; + } + + return inputStream.forget(); +} + +bool +IsSolidColor(SourceSurface* aSurface, + BGRAColor aColor, + uint8_t aFuzz /* = 0 */) +{ + IntSize size = aSurface->GetSize(); + return RectIsSolidColor(aSurface, IntRect(0, 0, size.width, size.height), + aColor, aFuzz); +} + +bool +IsSolidPalettedColor(Decoder* aDecoder, uint8_t aColor) +{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + return PalettedRectIsSolidColor(aDecoder, currentFrame->GetRect(), aColor); +} + +bool +RowsAreSolidColor(SourceSurface* aSurface, + int32_t aStartRow, + int32_t aRowCount, + BGRAColor aColor, + uint8_t aFuzz /* = 0 */) +{ + IntSize size = aSurface->GetSize(); + return RectIsSolidColor(aSurface, IntRect(0, aStartRow, size.width, aRowCount), + aColor, aFuzz); +} + +bool +PalettedRowsAreSolidColor(Decoder* aDecoder, + int32_t aStartRow, + int32_t aRowCount, + uint8_t aColor) +{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + IntRect frameRect = currentFrame->GetRect(); + IntRect solidColorRect(frameRect.x, aStartRow, frameRect.width, aRowCount); + return PalettedRectIsSolidColor(aDecoder, solidColorRect, aColor); +} + +bool +RectIsSolidColor(SourceSurface* aSurface, + const IntRect& aRect, + BGRAColor aColor, + uint8_t aFuzz /* = 0 */) +{ + IntSize surfaceSize = aSurface->GetSize(); + IntRect rect = + aRect.Intersect(IntRect(0, 0, surfaceSize.width, surfaceSize.height)); + + RefPtr dataSurface = aSurface->GetDataSurface(); + ASSERT_TRUE_OR_RETURN(dataSurface != nullptr, false); + + ASSERT_EQ_OR_RETURN(dataSurface->Stride(), surfaceSize.width * 4, false); + + DataSourceSurface::ScopedMap mapping(dataSurface, + DataSourceSurface::MapType::READ); + ASSERT_TRUE_OR_RETURN(mapping.IsMapped(), false); + + uint8_t* data = dataSurface->GetData(); + ASSERT_TRUE_OR_RETURN(data != nullptr, false); + + int32_t rowLength = dataSurface->Stride(); + for (int32_t row = rect.y; row < rect.YMost(); ++row) { + for (int32_t col = rect.x; col < rect.XMost(); ++col) { + int32_t i = row * rowLength + col * 4; + if (aFuzz != 0) { + ASSERT_LE_OR_RETURN(abs(aColor.mBlue - data[i + 0]), aFuzz, false); + ASSERT_LE_OR_RETURN(abs(aColor.mGreen - data[i + 1]), aFuzz, false); + ASSERT_LE_OR_RETURN(abs(aColor.mRed - data[i + 2]), aFuzz, false); + ASSERT_LE_OR_RETURN(abs(aColor.mAlpha - data[i + 3]), aFuzz, false); + } else { + ASSERT_EQ_OR_RETURN(aColor.mBlue, data[i + 0], false); + ASSERT_EQ_OR_RETURN(aColor.mGreen, data[i + 1], false); + ASSERT_EQ_OR_RETURN(aColor.mRed, data[i + 2], false); + ASSERT_EQ_OR_RETURN(aColor.mAlpha, data[i + 3], false); + } + } + } + + return true; +} + +bool +PalettedRectIsSolidColor(Decoder* aDecoder, const IntRect& aRect, uint8_t aColor) +{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + uint8_t* imageData; + uint32_t imageLength; + currentFrame->GetImageData(&imageData, &imageLength); + ASSERT_TRUE_OR_RETURN(imageData, false); + + // Clamp to the frame rect. If any pixels outside the frame rect are included, + // we immediately fail, because such pixels don't have any "color" in the + // sense this function measures - they're transparent, and that doesn't + // necessarily correspond to any color palette index at all. + IntRect frameRect = currentFrame->GetRect(); + ASSERT_EQ_OR_RETURN(imageLength, uint32_t(frameRect.Area()), false); + IntRect rect = aRect.Intersect(frameRect); + ASSERT_EQ_OR_RETURN(rect.Area(), aRect.Area(), false); + + // Translate |rect| by |frameRect.TopLeft()| to reflect the fact that the + // frame rect's offset doesn't actually mean anything in terms of the + // in-memory representation of the surface. The image data starts at the upper + // left corner of the frame rect, in other words. + rect -= frameRect.TopLeft(); + + // Walk through the image data and make sure that the entire rect has the + // palette index |aColor|. + int32_t rowLength = frameRect.width; + for (int32_t row = rect.y; row < rect.YMost(); ++row) { + for (int32_t col = rect.x; col < rect.XMost(); ++col) { + int32_t i = row * rowLength + col; + ASSERT_EQ_OR_RETURN(aColor, imageData[i], false); + } + } + + return true; +} + +bool +RowHasPixels(SourceSurface* aSurface, + int32_t aRow, + const vector& aPixels) +{ + ASSERT_GE_OR_RETURN(aRow, 0, false); + + IntSize surfaceSize = aSurface->GetSize(); + ASSERT_EQ_OR_RETURN(aPixels.size(), size_t(surfaceSize.width), false); + ASSERT_LT_OR_RETURN(aRow, surfaceSize.height, false); + + RefPtr dataSurface = aSurface->GetDataSurface(); + ASSERT_TRUE_OR_RETURN(dataSurface, false); + + ASSERT_EQ_OR_RETURN(dataSurface->Stride(), surfaceSize.width * 4, false); + + DataSourceSurface::ScopedMap mapping(dataSurface, + DataSourceSurface::MapType::READ); + ASSERT_TRUE_OR_RETURN(mapping.IsMapped(), false); + + uint8_t* data = dataSurface->GetData(); + ASSERT_TRUE_OR_RETURN(data != nullptr, false); + + int32_t rowLength = dataSurface->Stride(); + for (int32_t col = 0; col < surfaceSize.width; ++col) { + int32_t i = aRow * rowLength + col * 4; + ASSERT_EQ_OR_RETURN(aPixels[col].mBlue, data[i + 0], false); + ASSERT_EQ_OR_RETURN(aPixels[col].mGreen, data[i + 1], false); + ASSERT_EQ_OR_RETURN(aPixels[col].mRed, data[i + 2], false); + ASSERT_EQ_OR_RETURN(aPixels[col].mAlpha, data[i + 3], false); + } + + return true; +} + + +/////////////////////////////////////////////////////////////////////////////// +// SurfacePipe Helpers +/////////////////////////////////////////////////////////////////////////////// + +already_AddRefed +CreateTrivialDecoder() +{ + gfxPrefs::GetSingleton(); + DecoderType decoderType = DecoderFactory::GetDecoderType("image/gif"); + NotNull> sourceBuffer = WrapNotNull(new SourceBuffer()); + RefPtr decoder = + DecoderFactory::CreateAnonymousDecoder(decoderType, sourceBuffer, Nothing(), + DefaultSurfaceFlags()); + return decoder.forget(); +} + +void +AssertCorrectPipelineFinalState(SurfaceFilter* aFilter, + const gfx::IntRect& aInputSpaceRect, + const gfx::IntRect& aOutputSpaceRect) +{ + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(aInputSpaceRect, invalidRect->mInputSpaceRect); + EXPECT_EQ(aOutputSpaceRect, invalidRect->mOutputSpaceRect); +} + +void +CheckGeneratedImage(Decoder* aDecoder, + const IntRect& aRect, + uint8_t aFuzz /* = 0 */) +{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + const IntSize surfaceSize = surface->GetSize(); + + // This diagram shows how the surface is divided into regions that the code + // below tests for the correct content. The output rect is the bounds of the + // region labeled 'C'. + // + // +---------------------------+ + // | A | + // +---------+--------+--------+ + // | B | C | D | + // +---------+--------+--------+ + // | E | + // +---------------------------+ + + // Check that the output rect itself is green. (Region 'C'.) + EXPECT_TRUE(RectIsSolidColor(surface, aRect, BGRAColor::Green(), aFuzz)); + + // Check that the area above the output rect is transparent. (Region 'A'.) + EXPECT_TRUE(RectIsSolidColor(surface, + IntRect(0, 0, surfaceSize.width, aRect.y), + BGRAColor::Transparent(), aFuzz)); + + // Check that the area to the left of the output rect is transparent. (Region 'B'.) + EXPECT_TRUE(RectIsSolidColor(surface, + IntRect(0, aRect.y, aRect.x, aRect.YMost()), + BGRAColor::Transparent(), aFuzz)); + + // Check that the area to the right of the output rect is transparent. (Region 'D'.) + const int32_t widthOnRight = surfaceSize.width - aRect.XMost(); + EXPECT_TRUE(RectIsSolidColor(surface, + IntRect(aRect.XMost(), aRect.y, widthOnRight, aRect.YMost()), + BGRAColor::Transparent(), aFuzz)); + + // Check that the area below the output rect is transparent. (Region 'E'.) + const int32_t heightBelow = surfaceSize.height - aRect.YMost(); + EXPECT_TRUE(RectIsSolidColor(surface, + IntRect(0, aRect.YMost(), surfaceSize.width, heightBelow), + BGRAColor::Transparent(), aFuzz)); +} + +void +CheckGeneratedPalettedImage(Decoder* aDecoder, const IntRect& aRect) +{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + IntSize imageSize = currentFrame->GetImageSize(); + + // This diagram shows how the surface is divided into regions that the code + // below tests for the correct content. The output rect is the bounds of the + // region labeled 'C'. + // + // +---------------------------+ + // | A | + // +---------+--------+--------+ + // | B | C | D | + // +---------+--------+--------+ + // | E | + // +---------------------------+ + + // Check that the output rect itself is all 255's. (Region 'C'.) + EXPECT_TRUE(PalettedRectIsSolidColor(aDecoder, aRect, 255)); + + // Check that the area above the output rect is all 0's. (Region 'A'.) + EXPECT_TRUE(PalettedRectIsSolidColor(aDecoder, + IntRect(0, 0, imageSize.width, aRect.y), + 0)); + + // Check that the area to the left of the output rect is all 0's. (Region 'B'.) + EXPECT_TRUE(PalettedRectIsSolidColor(aDecoder, + IntRect(0, aRect.y, aRect.x, aRect.YMost()), + 0)); + + // Check that the area to the right of the output rect is all 0's. (Region 'D'.) + const int32_t widthOnRight = imageSize.width - aRect.XMost(); + EXPECT_TRUE(PalettedRectIsSolidColor(aDecoder, + IntRect(aRect.XMost(), aRect.y, widthOnRight, aRect.YMost()), + 0)); + + // Check that the area below the output rect is transparent. (Region 'E'.) + const int32_t heightBelow = imageSize.height - aRect.YMost(); + EXPECT_TRUE(PalettedRectIsSolidColor(aDecoder, + IntRect(0, aRect.YMost(), imageSize.width, heightBelow), + 0)); +} + +void +CheckWritePixels(Decoder* aDecoder, + SurfaceFilter* aFilter, + Maybe aOutputRect /* = Nothing() */, + Maybe aInputRect /* = Nothing() */, + Maybe aInputWriteRect /* = Nothing() */, + Maybe aOutputWriteRect /* = Nothing() */, + uint8_t aFuzz /* = 0 */) +{ + IntRect outputRect = aOutputRect.valueOr(IntRect(0, 0, 100, 100)); + IntRect inputRect = aInputRect.valueOr(IntRect(0, 0, 100, 100)); + IntRect inputWriteRect = aInputWriteRect.valueOr(inputRect); + IntRect outputWriteRect = aOutputWriteRect.valueOr(outputRect); + + // Fill the image. + int32_t count = 0; + auto result = aFilter->WritePixels([&] { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(inputWriteRect.width * inputWriteRect.height, count); + + AssertCorrectPipelineFinalState(aFilter, inputRect, outputRect); + + // Attempt to write more data and make sure nothing changes. + const int32_t oldCount = count; + result = aFilter->WritePixels([&] { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(oldCount, count); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Attempt to advance to the next row and make sure nothing changes. + aFilter->AdvanceRow(); + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. + CheckGeneratedImage(aDecoder, outputWriteRect, aFuzz); +} + +void +CheckPalettedWritePixels(Decoder* aDecoder, + SurfaceFilter* aFilter, + Maybe aOutputRect /* = Nothing() */, + Maybe aInputRect /* = Nothing() */, + Maybe aInputWriteRect /* = Nothing() */, + Maybe aOutputWriteRect /* = Nothing() */, + uint8_t aFuzz /* = 0 */) +{ + IntRect outputRect = aOutputRect.valueOr(IntRect(0, 0, 100, 100)); + IntRect inputRect = aInputRect.valueOr(IntRect(0, 0, 100, 100)); + IntRect inputWriteRect = aInputWriteRect.valueOr(inputRect); + IntRect outputWriteRect = aOutputWriteRect.valueOr(outputRect); + + // Fill the image. + int32_t count = 0; + auto result = aFilter->WritePixels([&] { + ++count; + return AsVariant(uint8_t(255)); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(inputWriteRect.width * inputWriteRect.height, count); + + AssertCorrectPipelineFinalState(aFilter, inputRect, outputRect); + + // Attempt to write more data and make sure nothing changes. + const int32_t oldCount = count; + result = aFilter->WritePixels([&] { + ++count; + return AsVariant(uint8_t(255)); + }); + EXPECT_EQ(oldCount, count); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Attempt to advance to the next row and make sure nothing changes. + aFilter->AdvanceRow(); + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + uint8_t* imageData; + uint32_t imageLength; + currentFrame->GetImageData(&imageData, &imageLength); + ASSERT_TRUE(imageData != nullptr); + ASSERT_EQ(outputWriteRect.width * outputWriteRect.height, int32_t(imageLength)); + for (uint32_t i = 0; i < imageLength; ++i) { + ASSERT_EQ(uint8_t(255), imageData[i]); + } +} + + +/////////////////////////////////////////////////////////////////////////////// +// Test Data +/////////////////////////////////////////////////////////////////////////////// + +ImageTestCase GreenPNGTestCase() +{ + return ImageTestCase("green.png", "image/png", IntSize(100, 100)); +} + +ImageTestCase GreenGIFTestCase() +{ + return ImageTestCase("green.gif", "image/gif", IntSize(100, 100)); +} + +ImageTestCase GreenJPGTestCase() +{ + return ImageTestCase("green.jpg", "image/jpeg", IntSize(100, 100), + TEST_CASE_IS_FUZZY); +} + +ImageTestCase GreenBMPTestCase() +{ + return ImageTestCase("green.bmp", "image/bmp", IntSize(100, 100)); +} + +ImageTestCase GreenICOTestCase() +{ + // This ICO contains a 32-bit BMP, and we use a BMP's alpha data by default + // when the BMP is embedded in an ICO, so it's transparent. + return ImageTestCase("green.ico", "image/x-icon", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase GreenIconTestCase() +{ + return ImageTestCase("green.icon", "image/icon", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase GreenFirstFrameAnimatedGIFTestCase() +{ + return ImageTestCase("first-frame-green.gif", "image/gif", IntSize(100, 100), + TEST_CASE_IS_ANIMATED); +} + +ImageTestCase GreenFirstFrameAnimatedPNGTestCase() +{ + return ImageTestCase("first-frame-green.png", "image/png", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IS_ANIMATED); +} + +ImageTestCase CorruptTestCase() +{ + return ImageTestCase("corrupt.jpg", "image/jpeg", IntSize(100, 100), + TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptBMPWithTruncatedHeader() +{ + // This BMP has a header which is truncated right between the BIH and the + // bitfields, which is a particularly error-prone place w.r.t. the BMP decoder + // state machine. + return ImageTestCase("invalid-truncated-metadata.bmp", "image/bmp", + IntSize(100, 100), TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptICOWithBadBMPWidthTestCase() +{ + // This ICO contains a BMP icon which has a width that doesn't match the size + // listed in the corresponding ICO directory entry. + return ImageTestCase("corrupt-with-bad-bmp-width.ico", "image/x-icon", + IntSize(100, 100), TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptICOWithBadBMPHeightTestCase() +{ + // This ICO contains a BMP icon which has a height that doesn't match the size + // listed in the corresponding ICO directory entry. + return ImageTestCase("corrupt-with-bad-bmp-height.ico", "image/x-icon", + IntSize(100, 100), TEST_CASE_HAS_ERROR); +} + +ImageTestCase TransparentPNGTestCase() +{ + return ImageTestCase("transparent.png", "image/png", IntSize(32, 32), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase TransparentGIFTestCase() +{ + return ImageTestCase("transparent.gif", "image/gif", IntSize(16, 16), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase FirstFramePaddingGIFTestCase() +{ + return ImageTestCase("transparent.gif", "image/gif", IntSize(16, 16), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase TransparentIfWithinICOBMPTestCase(TestCaseFlags aFlags) +{ + // This is a BMP that is only transparent when decoded as if it is within an + // ICO file. (Note: aFlags needs to be set to TEST_CASE_DEFAULT_FLAGS or + // TEST_CASE_IS_TRANSPARENT accordingly.) + return ImageTestCase("transparent-if-within-ico.bmp", "image/bmp", + IntSize(32, 32), aFlags); +} + +ImageTestCase RLE4BMPTestCase() +{ + return ImageTestCase("rle4.bmp", "image/bmp", IntSize(320, 240), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase RLE8BMPTestCase() +{ + return ImageTestCase("rle8.bmp", "image/bmp", IntSize(32, 32), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase NoFrameDelayGIFTestCase() +{ + // This is an invalid (or at least, questionably valid) GIF that's animated + // even though it specifies a frame delay of zero. It's animated, but it's not + // marked TEST_CASE_IS_ANIMATED because the metadata decoder can't detect that + // it's animated. + return ImageTestCase("no-frame-delay.gif", "image/gif", IntSize(100, 100)); +} + +ImageTestCase ExtraImageSubBlocksAnimatedGIFTestCase() +{ + // This is a corrupt GIF that has extra image sub blocks between the first and + // second frame. + return ImageTestCase("animated-with-extra-image-sub-blocks.gif", "image/gif", + IntSize(100, 100)); +} + +ImageTestCase DownscaledPNGTestCase() +{ + // This testcase (and all the other "downscaled") testcases) consists of 25 + // lines of green, followed by 25 lines of red, followed by 25 lines of green, + // followed by 25 more lines of red. It's intended that tests downscale it + // from 100x100 to 20x20, so we specify a 20x20 output size. + return ImageTestCase("downscaled.png", "image/png", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledGIFTestCase() +{ + return ImageTestCase("downscaled.gif", "image/gif", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledJPGTestCase() +{ + return ImageTestCase("downscaled.jpg", "image/jpeg", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledBMPTestCase() +{ + return ImageTestCase("downscaled.bmp", "image/bmp", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledICOTestCase() +{ + return ImageTestCase("downscaled.ico", "image/x-icon", IntSize(100, 100), + IntSize(20, 20), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase DownscaledIconTestCase() +{ + return ImageTestCase("downscaled.icon", "image/icon", IntSize(100, 100), + IntSize(20, 20), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase DownscaledTransparentICOWithANDMaskTestCase() +{ + // This test case is an ICO with AND mask transparency. We want to ensure that + // we can downscale it without crashing or triggering ASAN failures, but its + // content isn't simple to verify, so for now we don't check the output. + return ImageTestCase("transparent-ico-with-and-mask.ico", "image/x-icon", + IntSize(32, 32), IntSize(20, 20), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IGNORE_OUTPUT); +} + +ImageTestCase TruncatedSmallGIFTestCase() +{ + return ImageTestCase("green-1x1-truncated.gif", "image/gif", IntSize(1, 1)); +} + +} // namespace image +} // namespace mozilla diff --git a/image/test/gtest/Common.h b/image/test/gtest/Common.h new file mode 100644 index 000000000..79bed9fc1 --- /dev/null +++ b/image/test/gtest/Common.h @@ -0,0 +1,419 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_image_test_gtest_Common_h +#define mozilla_image_test_gtest_Common_h + +#include + +#include "gtest/gtest.h" + +#include "mozilla/Maybe.h" +#include "mozilla/UniquePtr.h" +#include "mozilla/gfx/2D.h" +#include "Decoder.h" +#include "gfxColor.h" +#include "imgITools.h" +#include "nsCOMPtr.h" +#include "SurfacePipe.h" +#include "SurfacePipeFactory.h" + +class nsIInputStream; + +namespace mozilla { +namespace image { + +/////////////////////////////////////////////////////////////////////////////// +// Types +/////////////////////////////////////////////////////////////////////////////// + +enum TestCaseFlags +{ + TEST_CASE_DEFAULT_FLAGS = 0, + TEST_CASE_IS_FUZZY = 1 << 0, + TEST_CASE_HAS_ERROR = 1 << 1, + TEST_CASE_IS_TRANSPARENT = 1 << 2, + TEST_CASE_IS_ANIMATED = 1 << 3, + TEST_CASE_IGNORE_OUTPUT = 1 << 4, +}; + +struct ImageTestCase +{ + ImageTestCase(const char* aPath, + const char* aMimeType, + gfx::IntSize aSize, + uint32_t aFlags = TEST_CASE_DEFAULT_FLAGS) + : mPath(aPath) + , mMimeType(aMimeType) + , mSize(aSize) + , mOutputSize(aSize) + , mFlags(aFlags) + { } + + ImageTestCase(const char* aPath, + const char* aMimeType, + gfx::IntSize aSize, + gfx::IntSize aOutputSize, + uint32_t aFlags = TEST_CASE_DEFAULT_FLAGS) + : mPath(aPath) + , mMimeType(aMimeType) + , mSize(aSize) + , mOutputSize(aOutputSize) + , mFlags(aFlags) + { } + + const char* mPath; + const char* mMimeType; + gfx::IntSize mSize; + gfx::IntSize mOutputSize; + uint32_t mFlags; +}; + +struct BGRAColor +{ + BGRAColor() : BGRAColor(0, 0, 0, 0) { } + + BGRAColor(uint8_t aBlue, uint8_t aGreen, uint8_t aRed, uint8_t aAlpha) + : mBlue(aBlue) + , mGreen(aGreen) + , mRed(aRed) + , mAlpha(aAlpha) + { } + + static BGRAColor Green() { return BGRAColor(0x00, 0xFF, 0x00, 0xFF); } + static BGRAColor Red() { return BGRAColor(0x00, 0x00, 0xFF, 0xFF); } + static BGRAColor Blue() { return BGRAColor(0xFF, 0x00, 0x00, 0xFF); } + static BGRAColor Transparent() { return BGRAColor(0x00, 0x00, 0x00, 0x00); } + + uint32_t AsPixel() const { return gfxPackedPixel(mAlpha, mRed, mGreen, mBlue); } + + uint8_t mBlue; + uint8_t mGreen; + uint8_t mRed; + uint8_t mAlpha; +}; + + +/////////////////////////////////////////////////////////////////////////////// +// General Helpers +/////////////////////////////////////////////////////////////////////////////// + +/** + * A RAII class that ensure that ImageLib services are available. Any tests that + * require ImageLib to be initialized (for example, any test that uses the + * SurfaceCache; see image::EnsureModuleInitialized() for the full list) can + * use this class to ensure that ImageLib services are available. Failure to do + * so can result in strange, non-deterministic failures. + */ +struct AutoInitializeImageLib +{ + AutoInitializeImageLib() + { + // Ensure that ImageLib services are initialized. + nsCOMPtr imgTools = do_CreateInstance("@mozilla.org/image/tools;1"); + EXPECT_TRUE(imgTools != nullptr); + } +}; + +/// Loads a file from the current directory. @return an nsIInputStream for it. +already_AddRefed LoadFile(const char* aRelativePath); + +/** + * @returns true if every pixel of @aSurface is @aColor. + * + * If @aFuzz is nonzero, a tolerance of @aFuzz is allowed in each color + * component. This may be necessary for tests that involve JPEG images or + * downscaling. + */ +bool IsSolidColor(gfx::SourceSurface* aSurface, + BGRAColor aColor, + uint8_t aFuzz = 0); + +/** + * @returns true if every pixel of @aDecoder's surface has the palette index + * specified by @aColor. + */ +bool IsSolidPalettedColor(Decoder* aDecoder, uint8_t aColor); + +/** + * @returns true if every pixel in the range of rows specified by @aStartRow and + * @aRowCount of @aSurface is @aColor. + * + * If @aFuzz is nonzero, a tolerance of @aFuzz is allowed in each color + * component. This may be necessary for tests that involve JPEG images or + * downscaling. + */ +bool RowsAreSolidColor(gfx::SourceSurface* aSurface, + int32_t aStartRow, + int32_t aRowCount, + BGRAColor aColor, + uint8_t aFuzz = 0); + +/** + * @returns true if every pixel in the range of rows specified by @aStartRow and + * @aRowCount of @aDecoder's surface has the palette index specified by @aColor. + */ +bool PalettedRowsAreSolidColor(Decoder* aDecoder, + int32_t aStartRow, + int32_t aRowCount, + uint8_t aColor); + +/** + * @returns true if every pixel in the rect specified by @aRect is @aColor. + * + * If @aFuzz is nonzero, a tolerance of @aFuzz is allowed in each color + * component. This may be necessary for tests that involve JPEG images or + * downscaling. + */ +bool RectIsSolidColor(gfx::SourceSurface* aSurface, + const gfx::IntRect& aRect, + BGRAColor aColor, + uint8_t aFuzz = 0); + +/** + * @returns true if every pixel in the rect specified by @aRect has the palette + * index specified by @aColor. + */ +bool PalettedRectIsSolidColor(Decoder* aDecoder, + const gfx::IntRect& aRect, + uint8_t aColor); + +/** + * @returns true if the pixels in @aRow of @aSurface match the pixels given in + * @aPixels. + */ +bool RowHasPixels(gfx::SourceSurface* aSurface, + int32_t aRow, + const std::vector& aPixels); + +// ExpectNoResume is an IResumable implementation for use by tests that expect +// Resume() to never get called. +class ExpectNoResume final : public IResumable +{ +public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ExpectNoResume, override) + + void Resume() override { FAIL() << "Resume() should not get called"; } + +private: + ~ExpectNoResume() override { } +}; + +// CountResumes is an IResumable implementation for use by tests that expect +// Resume() to get called a certain number of times. +class CountResumes : public IResumable +{ +public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CountResumes, override) + + CountResumes() : mCount(0) { } + + void Resume() override { mCount++; } + uint32_t Count() const { return mCount; } + +private: + ~CountResumes() override { } + + uint32_t mCount; +}; + + +/////////////////////////////////////////////////////////////////////////////// +// SurfacePipe Helpers +/////////////////////////////////////////////////////////////////////////////// + +/** + * Creates a decoder with no data associated with, suitable for testing code + * that requires a decoder to initialize or to allocate surfaces but doesn't + * actually need the decoder to do any decoding. + * + * XXX(seth): We only need this because SurfaceSink and PalettedSurfaceSink + * defer to the decoder for surface allocation. Once all decoders use + * SurfacePipe we won't need to do that anymore and we can remove this function. + */ +already_AddRefed CreateTrivialDecoder(); + +/** + * Creates a pipeline of SurfaceFilters from a list of Config structs and passes + * it to the provided lambda @aFunc. Assertions that the pipeline is constructly + * correctly and cleanup of any allocated surfaces is handled automatically. + * + * @param aDecoder The decoder to use for allocating surfaces. + * @param aFunc The lambda function to pass the filter pipeline to. + * @param aConfigs The configuration for the pipeline. + */ +template +void WithFilterPipeline(Decoder* aDecoder, Func aFunc, Configs... aConfigs) +{ + auto pipe = MakeUnique::Type>(); + nsresult rv = pipe->Configure(aConfigs...); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + aFunc(aDecoder, pipe.get()); + + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + if (currentFrame) { + currentFrame->Finish(); + } +} + +/** + * Creates a pipeline of SurfaceFilters from a list of Config structs and + * asserts that configuring it fails. Cleanup of any allocated surfaces is + * handled automatically. + * + * @param aDecoder The decoder to use for allocating surfaces. + * @param aConfigs The configuration for the pipeline. + */ +template +void AssertConfiguringPipelineFails(Decoder* aDecoder, Configs... aConfigs) +{ + auto pipe = MakeUnique::Type>(); + nsresult rv = pipe->Configure(aConfigs...); + + // Callers expect configuring the pipeline to fail. + ASSERT_TRUE(NS_FAILED(rv)); + + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + if (currentFrame) { + currentFrame->Finish(); + } +} + +/** + * Asserts that the provided filter pipeline is in the correct final state, + * which is to say, the entire surface has been written to (IsSurfaceFinished() + * returns true) and the invalid rects are as expected. + * + * @param aFilter The filter pipeline to check. + * @param aInputSpaceRect The expect invalid rect, in input space. + * @param aoutputSpaceRect The expect invalid rect, in output space. + */ +void AssertCorrectPipelineFinalState(SurfaceFilter* aFilter, + const gfx::IntRect& aInputSpaceRect, + const gfx::IntRect& aOutputSpaceRect); + +/** + * Checks a generated image for correctness. Reports any unexpected deviation + * from the expected image as GTest failures. + * + * @param aDecoder The decoder which contains the image. The decoder's current + * frame will be checked. + * @param aRect The region in the space of the output surface that the filter + * pipeline will actually write to. It's expected that pixels in + * this region are green, while pixels outside this region are + * transparent. + * @param aFuzz The amount of fuzz to use in pixel comparisons. + */ +void CheckGeneratedImage(Decoder* aDecoder, + const gfx::IntRect& aRect, + uint8_t aFuzz = 0); + +/** + * Checks a generated paletted image for correctness. Reports any unexpected + * deviation from the expected image as GTest failures. + * + * @param aDecoder The decoder which contains the image. The decoder's current + * frame will be checked. + * @param aRect The region in the space of the output surface that the filter + * pipeline will actually write to. It's expected that pixels in + * this region have a palette index of 255, while pixels outside + * this region have a palette index of 0. + */ +void CheckGeneratedPalettedImage(Decoder* aDecoder, const gfx::IntRect& aRect); + +/** + * Tests the result of calling WritePixels() using the provided SurfaceFilter + * pipeline. The pipeline must be a normal (i.e., non-paletted) pipeline. + * + * The arguments are specified in the an order intended to minimize the number + * of arguments that most test cases need to pass. + * + * @param aDecoder The decoder whose current frame will be written to. + * @param aFilter The SurfaceFilter pipeline to use. + * @param aOutputRect The region in the space of the output surface that will be + * invalidated by the filter pipeline. Defaults to + * (0, 0, 100, 100). + * @param aInputRect The region in the space of the input image that will be + * invalidated by the filter pipeline. Defaults to + * (0, 0, 100, 100). + * @param aInputWriteRect The region in the space of the input image that the + * filter pipeline will allow writes to. Note the + * difference from @aInputRect: @aInputRect is the actual + * region invalidated, while @aInputWriteRect is the + * region that is written to. These can differ in cases + * where the input is not clipped to the size of the image. + * Defaults to the entire input rect. + * @param aOutputWriteRect The region in the space of the output surface that + * the filter pipeline will actually write to. It's + * expected that pixels in this region are green, while + * pixels outside this region are transparent. Defaults + * to the entire output rect. + */ +void CheckWritePixels(Decoder* aDecoder, + SurfaceFilter* aFilter, + Maybe aOutputRect = Nothing(), + Maybe aInputRect = Nothing(), + Maybe aInputWriteRect = Nothing(), + Maybe aOutputWriteRect = Nothing(), + uint8_t aFuzz = 0); + +/** + * Tests the result of calling WritePixels() using the provided SurfaceFilter + * pipeline. The pipeline must be a paletted pipeline. + * @see CheckWritePixels() for documentation of the arguments. + */ +void CheckPalettedWritePixels(Decoder* aDecoder, + SurfaceFilter* aFilter, + Maybe aOutputRect = Nothing(), + Maybe aInputRect = Nothing(), + Maybe aInputWriteRect = Nothing(), + Maybe aOutputWriteRect = Nothing(), + uint8_t aFuzz = 0); + + +/////////////////////////////////////////////////////////////////////////////// +// Test Data +/////////////////////////////////////////////////////////////////////////////// + +ImageTestCase GreenPNGTestCase(); +ImageTestCase GreenGIFTestCase(); +ImageTestCase GreenJPGTestCase(); +ImageTestCase GreenBMPTestCase(); +ImageTestCase GreenICOTestCase(); +ImageTestCase GreenIconTestCase(); + +ImageTestCase GreenFirstFrameAnimatedGIFTestCase(); +ImageTestCase GreenFirstFrameAnimatedPNGTestCase(); + +ImageTestCase CorruptTestCase(); +ImageTestCase CorruptBMPWithTruncatedHeader(); +ImageTestCase CorruptICOWithBadBMPWidthTestCase(); +ImageTestCase CorruptICOWithBadBMPHeightTestCase(); + +ImageTestCase TransparentPNGTestCase(); +ImageTestCase TransparentGIFTestCase(); +ImageTestCase FirstFramePaddingGIFTestCase(); +ImageTestCase NoFrameDelayGIFTestCase(); +ImageTestCase ExtraImageSubBlocksAnimatedGIFTestCase(); + +ImageTestCase TransparentBMPWhenBMPAlphaEnabledTestCase(); +ImageTestCase RLE4BMPTestCase(); +ImageTestCase RLE8BMPTestCase(); + +ImageTestCase DownscaledPNGTestCase(); +ImageTestCase DownscaledGIFTestCase(); +ImageTestCase DownscaledJPGTestCase(); +ImageTestCase DownscaledBMPTestCase(); +ImageTestCase DownscaledICOTestCase(); +ImageTestCase DownscaledIconTestCase(); +ImageTestCase DownscaledTransparentICOWithANDMaskTestCase(); + +ImageTestCase TruncatedSmallGIFTestCase(); + +} // namespace image +} // namespace mozilla + +#endif // mozilla_image_test_gtest_Common_h diff --git a/image/test/gtest/TestADAM7InterpolatingFilter.cpp b/image/test/gtest/TestADAM7InterpolatingFilter.cpp new file mode 100644 index 000000000..d9dab4346 --- /dev/null +++ b/image/test/gtest/TestADAM7InterpolatingFilter.cpp @@ -0,0 +1,671 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include +#include + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "mozilla/Maybe.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +using std::generate; +using std::vector; + +template void +WithADAM7InterpolatingFilter(const IntSize& aSize, Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + WithFilterPipeline(decoder, Forward(aFunc), + ADAM7InterpolatingConfig { }, + SurfaceConfig { decoder, 0, aSize, + SurfaceFormat::B8G8R8A8, false }); +} + +void +AssertConfiguringADAM7InterpolatingFilterFails(const IntSize& aSize) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + AssertConfiguringPipelineFails(decoder, + ADAM7InterpolatingConfig { }, + SurfaceConfig { decoder, 0, aSize, + SurfaceFormat::B8G8R8A8, false }); +} + +uint8_t +InterpolateByte(uint8_t aByteA, uint8_t aByteB, float aWeight) +{ + return uint8_t(aByteA * aWeight + aByteB * (1.0f - aWeight)); +} + +BGRAColor +InterpolateColors(BGRAColor aColor1, BGRAColor aColor2, float aWeight) +{ + return BGRAColor(InterpolateByte(aColor1.mBlue, aColor2.mBlue, aWeight), + InterpolateByte(aColor1.mGreen, aColor2.mGreen, aWeight), + InterpolateByte(aColor1.mRed, aColor2.mRed, aWeight), + InterpolateByte(aColor1.mAlpha, aColor2.mAlpha, aWeight)); +} + +enum class ShouldInterpolate +{ + eYes, + eNo +}; + +BGRAColor +HorizontallyInterpolatedPixel(uint32_t aCol, + uint32_t aWidth, + const vector& aWeights, + ShouldInterpolate aShouldInterpolate, + const vector& aColors) +{ + // We cycle through the vector of weights forever. + float weight = aWeights[aCol % aWeights.size()]; + + // Find the columns of the two final pixels for this set of weights. + uint32_t finalPixel1 = aCol - aCol % aWeights.size(); + uint32_t finalPixel2 = finalPixel1 + aWeights.size(); + + // If |finalPixel2| is past the end of the row, that means that there is no + // final pixel after the pixel at |finalPixel1|. In that case, we just want to + // duplicate |finalPixel1|'s color until the end of the row. We can do that by + // setting |finalPixel2| equal to |finalPixel1| so that the interpolation has + // no effect. + if (finalPixel2 >= aWidth) { + finalPixel2 = finalPixel1; + } + + // We cycle through the vector of colors forever (subject to the above + // constraint about the end of the row). + BGRAColor color1 = aColors[finalPixel1 % aColors.size()]; + BGRAColor color2 = aColors[finalPixel2 % aColors.size()]; + + // If we're not interpolating, we treat all pixels which aren't final as + // transparent. Since the number of weights we have is equal to the stride + // between final pixels, we can check if |aCol| is a final pixel by checking + // whether |aCol| is a multiple of |aWeights.size()|. + if (aShouldInterpolate == ShouldInterpolate::eNo) { + return aCol % aWeights.size() == 0 ? color1 + : BGRAColor::Transparent(); + } + + // Interpolate. + return InterpolateColors(color1, color2, weight); +} + +vector& +InterpolationWeights(int32_t aStride) +{ + // Precalculated interpolation weights. These are used to interpolate + // between final pixels or between important rows. Although no interpolation + // is actually applied to the previous final pixel or important row value, + // the arrays still start with 1.0f, which is always skipped, primarily + // because otherwise |stride1Weights| would have zero elements. + static vector stride8Weights = + { 1.0f, 7 / 8.0f, 6 / 8.0f, 5 / 8.0f, 4 / 8.0f, 3 / 8.0f, 2 / 8.0f, 1 / 8.0f }; + static vector stride4Weights = { 1.0f, 3 / 4.0f, 2 / 4.0f, 1 / 4.0f }; + static vector stride2Weights = { 1.0f, 1 / 2.0f }; + static vector stride1Weights = { 1.0f }; + + switch (aStride) { + case 8: return stride8Weights; + case 4: return stride4Weights; + case 2: return stride2Weights; + case 1: return stride1Weights; + default: + MOZ_CRASH(); + } +} + +int32_t +ImportantRowStride(uint8_t aPass) +{ + // The stride between important rows for each pass, with a dummy value for + // the nonexistent pass 0 and for pass 8, since the tests run an extra pass to + // make sure nothing breaks. + static int32_t strides[] = { 1, 8, 8, 4, 4, 2, 2, 1, 1 }; + + return strides[aPass]; +} + +size_t +FinalPixelStride(uint8_t aPass) +{ + // The stride between the final pixels in important rows for each pass, with + // a dummy value for the nonexistent pass 0 and for pass 8, since the tests + // run an extra pass to make sure nothing breaks. + static size_t strides[] = { 1, 8, 4, 4, 2, 2, 1, 1, 1 }; + + return strides[aPass]; +} + +bool +IsImportantRow(int32_t aRow, uint8_t aPass) +{ + return aRow % ImportantRowStride(aPass) == 0; +} + +/** + * ADAM7 breaks up the image into 8x8 blocks. On each of the 7 passes, a new + * set of pixels in each block receives their final values, according to the + * following pattern: + * + * 1 6 4 6 2 6 4 6 + * 7 7 7 7 7 7 7 7 + * 5 6 5 6 5 6 5 6 + * 7 7 7 7 7 7 7 7 + * 3 6 4 6 3 6 4 6 + * 7 7 7 7 7 7 7 7 + * 5 6 5 6 5 6 5 6 + * 7 7 7 7 7 7 7 7 + * + * This function produces a row of pixels @aWidth wide, suitable for testing + * horizontal interpolation on pass @aPass. The pattern of pixels used is + * determined by @aPass and @aRow, which determine which pixels are final + * according to the table above, and @aColors, from which the pixel values + * are selected. + * + * There are two different behaviors: if |eNo| is passed for + * @aShouldInterpolate, non-final pixels are treated as transparent. If |eNo| + * is passed, non-final pixels get interpolated in from the surrounding final + * pixels. The intention is that |eNo| is passed to generate input which will + * be run through ADAM7InterpolatingFilter, and |eYes| is passed to generate + * reference data to check that the filter is performing horizontal + * interpolation correctly. + * + * This function does not perform vertical interpolation. Rows which aren't on + * the current pass are filled with transparent pixels. + * + * @return a vector representing a row of pixels. + */ +vector +ADAM7HorizontallyInterpolatedRow(uint8_t aPass, + uint32_t aRow, + uint32_t aWidth, + ShouldInterpolate aShouldInterpolate, + const vector& aColors) +{ + EXPECT_GT(aPass, 0); + EXPECT_LE(aPass, 8); + EXPECT_GT(aColors.size(), 0u); + + vector result(aWidth); + + if (IsImportantRow(aRow, aPass)) { + vector& weights = InterpolationWeights(FinalPixelStride(aPass)); + + // Compute the horizontally interpolated row. + uint32_t col = 0; + generate(result.begin(), result.end(), [&]{ + return HorizontallyInterpolatedPixel(col++, aWidth, weights, + aShouldInterpolate, aColors); + }); + } else { + // This is an unimportant row; just make the entire thing transparent. + generate(result.begin(), result.end(), []{ + return BGRAColor::Transparent(); + }); + } + + EXPECT_EQ(result.size(), size_t(aWidth)); + + return result; +} + +WriteState +WriteUninterpolatedPixels(SurfaceFilter* aFilter, + const IntSize& aSize, + uint8_t aPass, + const vector& aColors) +{ + WriteState result = WriteState::NEED_MORE_DATA; + + for (int32_t row = 0; row < aSize.height; ++row) { + // Compute uninterpolated pixels for this row. + vector pixels = + Move(ADAM7HorizontallyInterpolatedRow(aPass, row, aSize.width, + ShouldInterpolate::eNo, aColors)); + + // Write them to the surface. + auto pixelIterator = pixels.cbegin(); + result = aFilter->WritePixelsToRow([&]{ + return AsVariant((*pixelIterator++).AsPixel()); + }); + + if (result != WriteState::NEED_MORE_DATA) { + break; + } + } + + return result; +} + +bool +CheckHorizontallyInterpolatedImage(Decoder* aDecoder, + const IntSize& aSize, + uint8_t aPass, + const vector& aColors) +{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (int32_t row = 0; row < aSize.height; ++row) { + if (!IsImportantRow(row, aPass)) { + continue; // Don't check rows which aren't important on this pass. + } + + // Compute the expected pixels, *with* interpolation to match what the + // filter should have done. + vector expectedPixels = + Move(ADAM7HorizontallyInterpolatedRow(aPass, row, aSize.width, + ShouldInterpolate::eYes, aColors)); + + if (!RowHasPixels(surface, row, expectedPixels)) { + return false; + } + } + + return true; +} + +void +CheckHorizontalInterpolation(const IntSize& aSize, + const vector& aColors) +{ + const IntRect surfaceRect(IntPoint(0, 0), aSize); + + WithADAM7InterpolatingFilter(aSize, + [&](Decoder* aDecoder, SurfaceFilter* aFilter) { + // We check horizontal interpolation behavior for each pass individually. In + // addition to the normal 7 passes that ADAM7 includes, we also check an + // eighth pass to verify that nothing breaks if extra data is written. + for (uint8_t pass = 1; pass <= 8; ++pass) { + // Write our color pattern to the surface. We don't perform any + // interpolation when writing to the filter so that we can check that the + // filter itself *does*. + WriteState result = + WriteUninterpolatedPixels(aFilter, aSize, pass, aColors); + + EXPECT_EQ(WriteState::FINISHED, result); + AssertCorrectPipelineFinalState(aFilter, surfaceRect, surfaceRect); + + // Check that the generated image matches the expected pattern, with + // interpolation applied. + EXPECT_TRUE(CheckHorizontallyInterpolatedImage(aDecoder, aSize, + pass, aColors)); + + // Prepare for the next pass. + aFilter->ResetToFirstRow(); + } + }); +} + +BGRAColor +ADAM7RowColor(int32_t aRow, + uint8_t aPass, + const vector& aColors) +{ + EXPECT_LT(0, aPass); + EXPECT_GE(8, aPass); + EXPECT_LT(0u, aColors.size()); + + // If this is an important row, select the color from the provided vector of + // colors, which we cycle through infinitely. If not, just fill the row with + // transparent pixels. + return IsImportantRow(aRow, aPass) ? aColors[aRow % aColors.size()] + : BGRAColor::Transparent(); +} + +WriteState +WriteRowColorPixels(SurfaceFilter* aFilter, + const IntSize& aSize, + uint8_t aPass, + const vector& aColors) +{ + WriteState result = WriteState::NEED_MORE_DATA; + + for (int32_t row = 0; row < aSize.height; ++row) { + const uint32_t color = ADAM7RowColor(row, aPass, aColors).AsPixel(); + + // Fill the surface with |color| pixels. + result = aFilter->WritePixelsToRow([&]{ return AsVariant(color); }); + + if (result != WriteState::NEED_MORE_DATA) { + break; + } + } + + return result; +} + +bool +CheckVerticallyInterpolatedImage(Decoder* aDecoder, + const IntSize& aSize, + uint8_t aPass, + const vector& aColors) +{ + vector& weights = InterpolationWeights(ImportantRowStride(aPass)); + + for (int32_t row = 0; row < aSize.height; ++row) { + // Vertically interpolation takes place between two important rows. The + // separation between the important rows is determined by the stride of this + // pass. When there is no "next" important row because we'd run off the + // bottom of the image, we use the same row for both. This matches + // ADAM7InterpolatingFilter's behavior of duplicating the last important row + // since there isn't another important row to vertically interpolate it + // with. + const int32_t stride = ImportantRowStride(aPass); + const int32_t prevImportantRow = row - row % stride; + const int32_t maybeNextImportantRow = prevImportantRow + stride; + const int32_t nextImportantRow = maybeNextImportantRow < aSize.height + ? maybeNextImportantRow + : prevImportantRow; + + // Retrieve the colors for the important rows we're going to interpolate. + const BGRAColor prevImportantRowColor = + ADAM7RowColor(prevImportantRow, aPass, aColors); + const BGRAColor nextImportantRowColor = + ADAM7RowColor(nextImportantRow, aPass, aColors); + + // The weight we'll use for interpolation is also determined by the stride. + // A row halfway between two important rows should have pixels that have a + // 50% contribution from each of the important rows, for example. + const float weight = weights[row % stride]; + const BGRAColor interpolatedColor = + InterpolateColors(prevImportantRowColor, nextImportantRowColor, weight); + + // Generate a row of expected pixels. Every pixel in the row is always the + // same color since we're only testing vertical interpolation between + // solid-colored rows. + vector expectedPixels(aSize.width); + generate(expectedPixels.begin(), expectedPixels.end(), [&]{ + return interpolatedColor; + }); + + // Check that the pixels match. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + if (!RowHasPixels(surface, row, expectedPixels)) { + return false; + } + } + + return true; +} + +void +CheckVerticalInterpolation(const IntSize& aSize, + const vector& aColors) +{ + const IntRect surfaceRect(IntPoint(0, 0), aSize); + + WithADAM7InterpolatingFilter(aSize, + [&](Decoder* aDecoder, SurfaceFilter* aFilter) { + for (uint8_t pass = 1; pass <= 8; ++pass) { + // Write a pattern of rows to the surface. Important rows will receive a + // color selected from |aColors|; unimportant rows will be transparent. + WriteState result = WriteRowColorPixels(aFilter, aSize, pass, aColors); + + EXPECT_EQ(WriteState::FINISHED, result); + AssertCorrectPipelineFinalState(aFilter, surfaceRect, surfaceRect); + + // Check that the generated image matches the expected pattern, with + // interpolation applied. + EXPECT_TRUE(CheckVerticallyInterpolatedImage(aDecoder, aSize, + pass, aColors)); + + // Prepare for the next pass. + aFilter->ResetToFirstRow(); + } + }); +} + +void +CheckInterpolation(const IntSize& aSize, const vector& aColors) +{ + CheckHorizontalInterpolation(aSize, aColors); + CheckVerticalInterpolation(aSize, aColors); +} + +void +CheckADAM7InterpolatingWritePixels(const IntSize& aSize) +{ + // This test writes 8 passes of green pixels (the seven ADAM7 passes, plus one + // extra to make sure nothing goes wrong if we write too much input) and verifies + // that the output is a solid green surface each time. Because all the pixels + // are the same color, interpolation doesn't matter; we test the correctness + // of the interpolation algorithm itself separately. + WithADAM7InterpolatingFilter(aSize, + [&](Decoder* aDecoder, SurfaceFilter* aFilter) { + IntRect rect(IntPoint(0, 0), aSize); + + for (int32_t pass = 1; pass <= 8; ++pass) { + // We only actually write up to the last important row for each pass, + // because that row unambiguously determines the remaining rows. + const int32_t lastRow = aSize.height - 1; + const int32_t lastImportantRow = + lastRow - (lastRow % ImportantRowStride(pass)); + const IntRect inputWriteRect(0, 0, aSize.width, lastImportantRow + 1); + + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(rect), + /* aInputRect = */ Some(rect), + /* aInputWriteRect = */ Some(inputWriteRect)); + + aFilter->ResetToFirstRow(); + EXPECT_FALSE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + } + }); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels100_100) +{ + CheckADAM7InterpolatingWritePixels(IntSize(100, 100)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels99_99) +{ + CheckADAM7InterpolatingWritePixels(IntSize(99, 99)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels66_33) +{ + CheckADAM7InterpolatingWritePixels(IntSize(66, 33)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels33_66) +{ + CheckADAM7InterpolatingWritePixels(IntSize(33, 66)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels15_15) +{ + CheckADAM7InterpolatingWritePixels(IntSize(15, 15)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels9_9) +{ + CheckADAM7InterpolatingWritePixels(IntSize(9, 9)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels8_8) +{ + CheckADAM7InterpolatingWritePixels(IntSize(8, 8)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels7_7) +{ + CheckADAM7InterpolatingWritePixels(IntSize(7, 7)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels3_3) +{ + CheckADAM7InterpolatingWritePixels(IntSize(3, 3)); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels1_1) +{ + CheckADAM7InterpolatingWritePixels(IntSize(1, 1)); +} + +TEST(ImageADAM7InterpolatingFilter, TrivialInterpolation48_48) +{ + CheckInterpolation(IntSize(48, 48), { BGRAColor::Green() }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput33_17) +{ + // We check interpolation using irregular patterns to make sure that the + // interpolation will look different for different passes. + CheckInterpolation(IntSize(33, 17), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput32_16) +{ + CheckInterpolation(IntSize(32, 16), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput31_15) +{ + CheckInterpolation(IntSize(31, 15), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput17_33) +{ + CheckInterpolation(IntSize(17, 33), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput16_32) +{ + CheckInterpolation(IntSize(16, 32), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput15_31) +{ + CheckInterpolation(IntSize(15, 31), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput9_9) +{ + CheckInterpolation(IntSize(9, 9), { + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput8_8) +{ + CheckInterpolation(IntSize(8, 8), { + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput7_7) +{ + CheckInterpolation(IntSize(7, 7), { + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput3_3) +{ + CheckInterpolation(IntSize(3, 3), { + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Red() + }); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput1_1) +{ + CheckInterpolation(IntSize(1, 1), { BGRAColor::Blue() }); +} + +TEST(ImageADAM7InterpolatingFilter, ADAM7InterpolationFailsFor0_0) +{ + // A 0x0 input size is invalid, so configuration should fail. + AssertConfiguringADAM7InterpolatingFilterFails(IntSize(0, 0)); +} + +TEST(ImageADAM7InterpolatingFilter, ADAM7InterpolationFailsForMinus1_Minus1) +{ + // A negative input size is invalid, so configuration should fail. + AssertConfiguringADAM7InterpolatingFilterFails(IntSize(-1, -1)); +} + +TEST(ImageADAM7InterpolatingFilter, ConfiguringPalettedADAM7InterpolatingFilterFails) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // ADAM7InterpolatingFilter does not support paletted images, so configuration + // should fail. + AssertConfiguringPipelineFails(decoder, + ADAM7InterpolatingConfig { }, + PalettedSurfaceConfig { decoder, 0, IntSize(100, 100), + IntRect(0, 0, 50, 50), + SurfaceFormat::B8G8R8A8, 8, + false }); +} diff --git a/image/test/gtest/TestCopyOnWrite.cpp b/image/test/gtest/TestCopyOnWrite.cpp new file mode 100644 index 000000000..0d420b672 --- /dev/null +++ b/image/test/gtest/TestCopyOnWrite.cpp @@ -0,0 +1,235 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "CopyOnWrite.h" + +using namespace mozilla; +using namespace mozilla::image; + +struct ValueStats +{ + int32_t mCopies = 0; + int32_t mFrees = 0; + int32_t mCalls = 0; + int32_t mConstCalls = 0; + int32_t mSerial = 0; +}; + +struct Value +{ + NS_INLINE_DECL_REFCOUNTING(Value) + + explicit Value(ValueStats& aStats) + : mStats(aStats) + , mSerial(mStats.mSerial++) + { } + + Value(const Value& aOther) + : mStats(aOther.mStats) + , mSerial(mStats.mSerial++) + { + mStats.mCopies++; + } + + void Go() { mStats.mCalls++; } + void Go() const { mStats.mConstCalls++; } + + int32_t Serial() const { return mSerial; } + +protected: + ~Value() { mStats.mFrees++; } + +private: + ValueStats& mStats; + int32_t mSerial; +}; + +TEST(ImageCopyOnWrite, Read) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + }); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + } + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); +} + +TEST(ImageCopyOnWrite, RecursiveRead) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + // Make sure that Read() inside a Read() succeeds. + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + }, []() { + // This gets called if we can't read. We shouldn't get here. + EXPECT_TRUE(false); + }); + }); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + } + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); +} + +TEST(ImageCopyOnWrite, Write) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + cow.Write([&](Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(!cow.CanRead()); + EXPECT_TRUE(!cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(0, stats.mConstCalls); + }); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(0, stats.mConstCalls); + } + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); +} + +TEST(ImageCopyOnWrite, WriteRecursive) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + // Make sure Write() inside a Read() succeeds. + cow.Write([&](Value* aValue) { + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(1, aValue->Serial()); + EXPECT_TRUE(!cow.CanRead()); + EXPECT_TRUE(!cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(0, stats.mConstCalls); + + // Make sure Read() inside a Write() fails. + cow.Read([](const Value* aValue) { + // This gets called if we can read. We shouldn't get here. + EXPECT_TRUE(false); + }, []() { + // This gets called if we can't read. We *should* get here. + EXPECT_TRUE(true); + }); + + // Make sure Write() inside a Write() fails. + cow.Write([](Value* aValue) { + // This gets called if we can write. We shouldn't get here. + EXPECT_TRUE(false); + }, []() { + // This gets called if we can't write. We *should* get here. + EXPECT_TRUE(true); + }); + }, []() { + // This gets called if we can't write. We shouldn't get here. + EXPECT_TRUE(false); + }); + + aValue->Go(); + + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + }); + + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + } + + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(2, stats.mFrees); +} diff --git a/image/test/gtest/TestDecodeToSurface.cpp b/image/test/gtest/TestDecodeToSurface.cpp new file mode 100644 index 000000000..bd52e7590 --- /dev/null +++ b/image/test/gtest/TestDecodeToSurface.cpp @@ -0,0 +1,123 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "imgIContainer.h" +#include "imgITools.h" +#include "ImageOps.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "nsIRunnable.h" +#include "nsIThread.h" +#include "mozilla/RefPtr.h" +#include "nsString.h" +#include "nsThreadUtils.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +class DecodeToSurfaceRunnable : public Runnable +{ +public: + DecodeToSurfaceRunnable(RefPtr& aSurface, + nsIInputStream* aInputStream, + const ImageTestCase& aTestCase) + : mSurface(aSurface) + , mInputStream(aInputStream) + , mTestCase(aTestCase) + { } + + NS_IMETHOD Run() override + { + Go(); + return NS_OK; + } + + void Go() + { + mSurface = + ImageOps::DecodeToSurface(mInputStream, + nsDependentCString(mTestCase.mMimeType), + imgIContainer::DECODE_FLAGS_DEFAULT); + ASSERT_TRUE(mSurface != nullptr); + + EXPECT_EQ(SurfaceType::DATA, mSurface->GetType()); + EXPECT_TRUE(mSurface->GetFormat() == SurfaceFormat::B8G8R8X8 || + mSurface->GetFormat() == SurfaceFormat::B8G8R8A8); + EXPECT_EQ(mTestCase.mSize, mSurface->GetSize()); + + EXPECT_TRUE(IsSolidColor(mSurface, BGRAColor::Green(), + mTestCase.mFlags & TEST_CASE_IS_FUZZY ? 1 : 0)); + } + +private: + RefPtr& mSurface; + nsCOMPtr mInputStream; + ImageTestCase mTestCase; +}; + +static void +RunDecodeToSurface(const ImageTestCase& aTestCase) +{ + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + nsCOMPtr thread; + nsresult rv = NS_NewThread(getter_AddRefs(thread), nullptr); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // We run the DecodeToSurface tests off-main-thread to ensure that + // DecodeToSurface doesn't require any main-thread-only code. + RefPtr surface; + nsCOMPtr runnable = + new DecodeToSurfaceRunnable(surface, inputStream, aTestCase); + thread->Dispatch(runnable, nsIThread::DISPATCH_SYNC); + + thread->Shutdown(); + + // Explicitly release the SourceSurface on the main thread. + surface = nullptr; +} + +class ImageDecodeToSurface : public ::testing::Test +{ +protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDecodeToSurface, PNG) { RunDecodeToSurface(GreenPNGTestCase()); } +TEST_F(ImageDecodeToSurface, GIF) { RunDecodeToSurface(GreenGIFTestCase()); } +TEST_F(ImageDecodeToSurface, JPG) { RunDecodeToSurface(GreenJPGTestCase()); } +TEST_F(ImageDecodeToSurface, BMP) { RunDecodeToSurface(GreenBMPTestCase()); } +TEST_F(ImageDecodeToSurface, ICO) { RunDecodeToSurface(GreenICOTestCase()); } +TEST_F(ImageDecodeToSurface, Icon) { RunDecodeToSurface(GreenIconTestCase()); } + +TEST_F(ImageDecodeToSurface, AnimatedGIF) +{ + RunDecodeToSurface(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecodeToSurface, AnimatedPNG) +{ + RunDecodeToSurface(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecodeToSurface, Corrupt) +{ + ImageTestCase testCase = CorruptTestCase(); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + RefPtr surface = + ImageOps::DecodeToSurface(inputStream, + nsDependentCString(testCase.mMimeType), + imgIContainer::DECODE_FLAGS_DEFAULT); + EXPECT_TRUE(surface == nullptr); +} diff --git a/image/test/gtest/TestDecoders.cpp b/image/test/gtest/TestDecoders.cpp new file mode 100644 index 000000000..58caa77a2 --- /dev/null +++ b/image/test/gtest/TestDecoders.cpp @@ -0,0 +1,669 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "decoders/nsBMPDecoder.h" +#include "IDecodingTask.h" +#include "imgIContainer.h" +#include "imgITools.h" +#include "ImageFactory.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "nsIRunnable.h" +#include "nsIThread.h" +#include "mozilla/RefPtr.h" +#include "nsStreamUtils.h" +#include "nsString.h" +#include "nsThreadUtils.h" +#include "ProgressTracker.h" +#include "SourceBuffer.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +static already_AddRefed +CheckDecoderState(const ImageTestCase& aTestCase, Decoder* aDecoder) +{ + EXPECT_TRUE(aDecoder->GetDecodeDone()); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_HAS_ERROR), + aDecoder->HasError()); + + // Verify that the decoder made the expected progress. + Progress progress = aDecoder->TakeProgress(); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_HAS_ERROR), + bool(progress & FLAG_HAS_ERROR)); + + if (aTestCase.mFlags & TEST_CASE_HAS_ERROR) { + return nullptr; // That's all we can check for bad images. + } + + EXPECT_TRUE(bool(progress & FLAG_SIZE_AVAILABLE)); + EXPECT_TRUE(bool(progress & FLAG_DECODE_COMPLETE)); + EXPECT_TRUE(bool(progress & FLAG_FRAME_COMPLETE)); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_TRANSPARENT), + bool(progress & FLAG_HAS_TRANSPARENCY)); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_ANIMATED), + bool(progress & FLAG_IS_ANIMATED)); + + // The decoder should get the correct size. + IntSize size = aDecoder->Size(); + EXPECT_EQ(aTestCase.mSize.width, size.width); + EXPECT_EQ(aTestCase.mSize.height, size.height); + + // Get the current frame, which is always the first frame of the image + // because CreateAnonymousDecoder() forces a first-frame-only decode. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + // Verify that the resulting surfaces matches our expectations. + EXPECT_EQ(SurfaceType::DATA, surface->GetType()); + EXPECT_TRUE(surface->GetFormat() == SurfaceFormat::B8G8R8X8 || + surface->GetFormat() == SurfaceFormat::B8G8R8A8); + EXPECT_EQ(aTestCase.mOutputSize, surface->GetSize()); + + return surface.forget(); +} + +static void +CheckDecoderResults(const ImageTestCase& aTestCase, Decoder* aDecoder) +{ + RefPtr surface = CheckDecoderState(aTestCase, aDecoder); + if (!surface) { + return; + } + + if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) { + return; + } + + // Check the output. + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green(), + aTestCase.mFlags & TEST_CASE_IS_FUZZY ? 1 : 0)); +} + +template +void WithSingleChunkDecode(const ImageTestCase& aTestCase, + const Maybe& aOutputSize, + Func aResultChecker) +{ + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Write the data into a SourceBuffer. + NotNull> sourceBuffer = WrapNotNull(new SourceBuffer()); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + sourceBuffer->Complete(NS_OK); + + // Create a decoder. + DecoderType decoderType = + DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = + DecoderFactory::CreateAnonymousDecoder(decoderType, sourceBuffer, aOutputSize, + DefaultSurfaceFlags()); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = new AnonymousDecodingTask(WrapNotNull(decoder)); + + // Run the full decoder synchronously. + task->Run(); + + // Call the lambda to verify the expected results. + aResultChecker(decoder); +} + +static void +CheckDecoderSingleChunk(const ImageTestCase& aTestCase) +{ + WithSingleChunkDecode(aTestCase, Nothing(), [&](Decoder* aDecoder) { + CheckDecoderResults(aTestCase, aDecoder); + }); +} + +static void +CheckDecoderMultiChunk(const ImageTestCase& aTestCase) +{ + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Create a SourceBuffer and a decoder. + NotNull> sourceBuffer = WrapNotNull(new SourceBuffer()); + sourceBuffer->ExpectLength(length); + DecoderType decoderType = + DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = + DecoderFactory::CreateAnonymousDecoder(decoderType, sourceBuffer, Nothing(), + DefaultSurfaceFlags()); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = new AnonymousDecodingTask(WrapNotNull(decoder)); + + for (uint64_t read = 0; read < length ; ++read) { + uint64_t available = 0; + rv = inputStream->Available(&available); + ASSERT_TRUE(available > 0); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + rv = sourceBuffer->AppendFromInputStream(inputStream, 1); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + task->Run(); + } + + sourceBuffer->Complete(NS_OK); + task->Run(); + + CheckDecoderResults(aTestCase, decoder); +} + +static void +CheckDownscaleDuringDecode(const ImageTestCase& aTestCase) +{ + // This function expects that |aTestCase| consists of 25 lines of green, + // followed by 25 lines of red, followed by 25 lines of green, followed by 25 + // more lines of red. We'll downscale it from 100x100 to 20x20. + IntSize outputSize(20, 20); + + WithSingleChunkDecode(aTestCase, Some(outputSize), [&](Decoder* aDecoder) { + RefPtr surface = CheckDecoderState(aTestCase, aDecoder); + + // There are no downscale-during-decode tests that have TEST_CASE_HAS_ERROR + // set, so we expect to always get a surface here. + EXPECT_TRUE(surface != nullptr); + + if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) { + return; + } + + // Check that the downscaled image is correct. Note that we skip rows near + // the transitions between colors, since the downscaler does not produce a + // sharp boundary at these points. Even some of the rows we test need a + // small amount of fuzz; this is just the nature of Lanczos downscaling. + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, BGRAColor::Green(), /* aFuzz = */ 47)); + EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, BGRAColor::Red(), /* aFuzz = */ 27)); + EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), /* aFuzz = */ 47)); + EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, BGRAColor::Red(), /* aFuzz = */ 27)); + }); +} + +class ImageDecoders : public ::testing::Test +{ +protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDecoders, PNGSingleChunk) +{ + CheckDecoderSingleChunk(GreenPNGTestCase()); +} + +TEST_F(ImageDecoders, PNGMultiChunk) +{ + CheckDecoderMultiChunk(GreenPNGTestCase()); +} + +TEST_F(ImageDecoders, PNGDownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledPNGTestCase()); +} + +TEST_F(ImageDecoders, GIFSingleChunk) +{ + CheckDecoderSingleChunk(GreenGIFTestCase()); +} + +TEST_F(ImageDecoders, GIFMultiChunk) +{ + CheckDecoderMultiChunk(GreenGIFTestCase()); +} + +TEST_F(ImageDecoders, GIFDownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledGIFTestCase()); +} + +TEST_F(ImageDecoders, JPGSingleChunk) +{ + CheckDecoderSingleChunk(GreenJPGTestCase()); +} + +TEST_F(ImageDecoders, JPGMultiChunk) +{ + CheckDecoderMultiChunk(GreenJPGTestCase()); +} + +TEST_F(ImageDecoders, JPGDownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledJPGTestCase()); +} + +TEST_F(ImageDecoders, BMPSingleChunk) +{ + CheckDecoderSingleChunk(GreenBMPTestCase()); +} + +TEST_F(ImageDecoders, BMPMultiChunk) +{ + CheckDecoderMultiChunk(GreenBMPTestCase()); +} + +TEST_F(ImageDecoders, BMPDownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledBMPTestCase()); +} + +TEST_F(ImageDecoders, ICOSingleChunk) +{ + CheckDecoderSingleChunk(GreenICOTestCase()); +} + +TEST_F(ImageDecoders, ICOMultiChunk) +{ + CheckDecoderMultiChunk(GreenICOTestCase()); +} + +TEST_F(ImageDecoders, ICODownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledICOTestCase()); +} + +TEST_F(ImageDecoders, ICOWithANDMaskDownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledTransparentICOWithANDMaskTestCase()); +} + +TEST_F(ImageDecoders, IconSingleChunk) +{ + CheckDecoderSingleChunk(GreenIconTestCase()); +} + +TEST_F(ImageDecoders, IconMultiChunk) +{ + CheckDecoderMultiChunk(GreenIconTestCase()); +} + +TEST_F(ImageDecoders, IconDownscaleDuringDecode) +{ + CheckDownscaleDuringDecode(DownscaledIconTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFSingleChunk) +{ + CheckDecoderSingleChunk(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFMultiChunk) +{ + CheckDecoderMultiChunk(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedPNGSingleChunk) +{ + CheckDecoderSingleChunk(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoders, AnimatedPNGMultiChunk) +{ + CheckDecoderMultiChunk(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoders, CorruptSingleChunk) +{ + CheckDecoderSingleChunk(CorruptTestCase()); +} + +TEST_F(ImageDecoders, CorruptMultiChunk) +{ + CheckDecoderMultiChunk(CorruptTestCase()); +} + +TEST_F(ImageDecoders, CorruptBMPWithTruncatedHeaderSingleChunk) +{ + CheckDecoderSingleChunk(CorruptBMPWithTruncatedHeader()); +} + +TEST_F(ImageDecoders, CorruptBMPWithTruncatedHeaderMultiChunk) +{ + CheckDecoderMultiChunk(CorruptBMPWithTruncatedHeader()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPWidthSingleChunk) +{ + CheckDecoderSingleChunk(CorruptICOWithBadBMPWidthTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPWidthMultiChunk) +{ + CheckDecoderMultiChunk(CorruptICOWithBadBMPWidthTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPHeightSingleChunk) +{ + CheckDecoderSingleChunk(CorruptICOWithBadBMPHeightTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPHeightMultiChunk) +{ + CheckDecoderMultiChunk(CorruptICOWithBadBMPHeightTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFWithFRAME_FIRST) +{ + ImageTestCase testCase = GreenFirstFrameAnimatedGIFTestCase(); + + // Verify that we can decode this test case and retrieve the first frame using + // imgIContainer::FRAME_FIRST. This ensures that we correctly trigger a + // single-frame decode rather than an animated decode when + // imgIContainer::FRAME_FIRST is requested. + + // Create an image. + RefPtr image = + ImageFactory::CreateAnonymousImage(nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, nullptr, inputStream, 0, + static_cast(length)); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, nullptr, NS_OK, true); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Lock the image so its surfaces don't disappear during the test. + image->LockImage(); + + // Use GetFrame() to force a sync decode of the image, specifying FRAME_FIRST + // to ensure that we don't get an animated decode. + RefPtr surface = + image->GetFrame(imgIContainer::FRAME_FIRST, + imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + rv = image->GetHeight(&imageSize.height); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded the static version of the image. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eStatic)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + EXPECT_TRUE(bool(result.Surface())); + } + + // Ensure that we didn't decode the animated version of the image. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eAnimated)); + ASSERT_EQ(MatchType::NOT_FOUND, result.Type()); + } + + // Use GetFrame() to force a sync decode of the image, this time specifying + // FRAME_CURRENT to ensure that we get an animated decode. + RefPtr animatedSurface = + image->GetFrame(imgIContainer::FRAME_CURRENT, + imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that we decoded both frames of the animated version of the image. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eAnimated)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(0))); + EXPECT_TRUE(bool(result.Surface())); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(1))); + EXPECT_TRUE(bool(result.Surface())); + } + + // Ensure that the static version is still around. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eStatic)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + EXPECT_TRUE(bool(result.Surface())); + } +} + +TEST_F(ImageDecoders, AnimatedGIFWithFRAME_CURRENT) +{ + ImageTestCase testCase = GreenFirstFrameAnimatedGIFTestCase(); + + // Verify that we can decode this test case and retrieve the entire sequence + // of frames using imgIContainer::FRAME_CURRENT. This ensures that we + // correctly trigger an animated decode rather than a single-frame decode when + // imgIContainer::FRAME_CURRENT is requested. + + // Create an image. + RefPtr image = + ImageFactory::CreateAnonymousImage(nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, nullptr, inputStream, 0, + static_cast(length)); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, nullptr, NS_OK, true); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Lock the image so its surfaces don't disappear during the test. + image->LockImage(); + + // Use GetFrame() to force a sync decode of the image, specifying + // FRAME_CURRENT to ensure we get an animated decode. + RefPtr surface = + image->GetFrame(imgIContainer::FRAME_CURRENT, + imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + rv = image->GetHeight(&imageSize.height); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded both frames of the animated version of the image. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eAnimated)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(0))); + EXPECT_TRUE(bool(result.Surface())); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(1))); + EXPECT_TRUE(bool(result.Surface())); + } + + // Ensure that we didn't decode the static version of the image. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eStatic)); + ASSERT_EQ(MatchType::NOT_FOUND, result.Type()); + } + + // Use GetFrame() to force a sync decode of the image, this time specifying + // FRAME_FIRST to ensure that we get a single-frame decode. + RefPtr animatedSurface = + image->GetFrame(imgIContainer::FRAME_FIRST, + imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that we decoded the static version of the image. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eStatic)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + EXPECT_TRUE(bool(result.Surface())); + } + + // Ensure that both frames of the animated version are still around. + { + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eAnimated)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(0))); + EXPECT_TRUE(bool(result.Surface())); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(1))); + EXPECT_TRUE(bool(result.Surface())); + } +} + +TEST_F(ImageDecoders, AnimatedGIFWithExtraImageSubBlocks) +{ + ImageTestCase testCase = ExtraImageSubBlocksAnimatedGIFTestCase(); + + // Verify that we can decode this test case and get two frames, even though + // there are extra image sub blocks between the first and second frame. The + // extra data shouldn't confuse the decoder or cause the decode to fail. + + // Create an image. + RefPtr image = + ImageFactory::CreateAnonymousImage(nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, nullptr, inputStream, 0, + static_cast(length)); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, nullptr, NS_OK, true); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Use GetFrame() to force a sync decode of the image. + RefPtr surface = + image->GetFrame(imgIContainer::FRAME_CURRENT, + imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + rv = image->GetHeight(&imageSize.height); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded both frames of the image. + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eAnimated)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(0))); + EXPECT_TRUE(bool(result.Surface())); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(1))); + EXPECT_TRUE(bool(result.Surface())); +} + +TEST_F(ImageDecoders, TruncatedSmallGIFSingleChunk) +{ + CheckDecoderSingleChunk(TruncatedSmallGIFTestCase()); +} diff --git a/image/test/gtest/TestDeinterlacingFilter.cpp b/image/test/gtest/TestDeinterlacingFilter.cpp new file mode 100644 index 000000000..30cad7993 --- /dev/null +++ b/image/test/gtest/TestDeinterlacingFilter.cpp @@ -0,0 +1,672 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template void +WithDeinterlacingFilter(const IntSize& aSize, + bool aProgressiveDisplay, + Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + WithFilterPipeline(decoder, Forward(aFunc), + DeinterlacingConfig { aProgressiveDisplay }, + SurfaceConfig { decoder, 0, aSize, + SurfaceFormat::B8G8R8A8, false }); +} + +template void +WithPalettedDeinterlacingFilter(const IntSize& aSize, + Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline(decoder, Forward(aFunc), + DeinterlacingConfig { /* mProgressiveDisplay = */ true }, + PalettedSurfaceConfig { decoder, 0, aSize, + IntRect(0, 0, 100, 100), + SurfaceFormat::B8G8R8A8, 8, + false }); +} + +void +AssertConfiguringDeinterlacingFilterFails(const IntSize& aSize) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AssertConfiguringPipelineFails(decoder, + DeinterlacingConfig { /* mProgressiveDisplay = */ true}, + SurfaceConfig { decoder, 0, aSize, + SurfaceFormat::B8G8R8A8, false }); +} + +class ImageDeinterlacingFilter : public ::testing::Test +{ +protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDeinterlacingFilter, WritePixels100_100) +{ + WithDeinterlacingFilter(IntSize(100, 100), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels99_99) +{ + WithDeinterlacingFilter(IntSize(99, 99), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 99)), + /* aInputRect = */ Some(IntRect(0, 0, 99, 99))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels8_8) +{ + WithDeinterlacingFilter(IntSize(8, 8), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 8, 8)), + /* aInputRect = */ Some(IntRect(0, 0, 8, 8))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels7_7) +{ + WithDeinterlacingFilter(IntSize(7, 7), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 7, 7)), + /* aInputRect = */ Some(IntRect(0, 0, 7, 7))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels3_3) +{ + WithDeinterlacingFilter(IntSize(3, 3), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 3, 3)), + /* aInputRect = */ Some(IntRect(0, 0, 3, 3))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels1_1) +{ + WithDeinterlacingFilter(IntSize(1, 1), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 1, 1)), + /* aInputRect = */ Some(IntRect(0, 0, 1, 1))); + }); +} + +TEST_F(ImageDeinterlacingFilter, PalettedWritePixels) +{ + WithPalettedDeinterlacingFilter(IntSize(100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckPalettedWritePixels(aDecoder, aFilter); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsNonProgressiveOutput51_52) +{ + WithDeinterlacingFilter(IntSize(51, 52), /* aProgressiveDisplay = */ false, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be green for even rows and red for odd + // rows but we need to write the rows in the order that the deinterlacer + // expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 51; // Integer division. + ++count; + + // Note that we use a switch statement here, even though it's quite + // verbose, because it's useful to have the mappings between input and + // output rows available when debugging these tests. + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + case 1: // Output row 8. + case 2: // Output row 16. + case 3: // Output row 24. + case 4: // Output row 32. + case 5: // Output row 40. + case 6: // Output row 48. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + case 7: // Output row 4. + case 8: // Output row 12. + case 9: // Output row 20. + case 10: // Output row 28. + case 11: // Output row 36. + case 12: // Output row 44. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Third pass. Rows are positioned at 4n + 2. + case 13: // Output row 2. + case 14: // Output row 6. + case 15: // Output row 10. + case 16: // Output row 14. + case 17: // Output row 18. + case 18: // Output row 22. + case 19: // Output row 26. + case 20: // Output row 30. + case 21: // Output row 34. + case 22: // Output row 38. + case 23: // Output row 42. + case 24: // Output row 46. + case 25: // Output row 50. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 26: // Output row 1. + case 27: // Output row 3. + case 28: // Output row 5. + case 29: // Output row 7. + case 30: // Output row 9. + case 31: // Output row 11. + case 32: // Output row 13. + case 33: // Output row 15. + case 34: // Output row 17. + case 35: // Output row 19. + case 36: // Output row 21. + case 37: // Output row 23. + case 38: // Output row 25. + case 39: // Output row 27. + case 40: // Output row 29. + case 41: // Output row 31. + case 42: // Output row 33. + case 43: // Output row 35. + case 44: // Output row 37. + case 45: // Output row 39. + case 46: // Output row 41. + case 47: // Output row 43. + case 48: // Output row 45. + case 49: // Output row 47. + case 50: // Output row 49. + case 51: // Output row 51. + return AsVariant(BGRAColor::Red().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(51u * 52u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 51, 52), + IntRect(0, 0, 51, 52)); + + // Check that the generated image is correct. As mentioned above, we expect + // even rows to be green and odd rows to be red. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 52; ++row) { + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, + row % 2 == 0 ? BGRAColor::Green() + : BGRAColor::Red())); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput20_20) +{ + WithDeinterlacingFilter(IntSize(20, 20), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be green for even rows and red for odd + // rows but we need to write the rows in the order that the deinterlacer + // expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 20; // Integer division. + ++count; + + // Note that we use a switch statement here, even though it's quite + // verbose, because it's useful to have the mappings between input and + // output rows available when debugging these tests. + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + case 1: // Output row 8. + case 2: // Output row 16. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + case 3: // Output row 4. + case 4: // Output row 12. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Third pass. Rows are positioned at 4n + 2. + case 5: // Output row 2. + case 6: // Output row 6. + case 7: // Output row 10. + case 8: // Output row 14. + case 9: // Output row 18. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 10: // Output row 1. + case 11: // Output row 3. + case 12: // Output row 5. + case 13: // Output row 7. + case 14: // Output row 9. + case 15: // Output row 11. + case 16: // Output row 13. + case 17: // Output row 15. + case 18: // Output row 17. + case 19: // Output row 19. + return AsVariant(BGRAColor::Red().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(20u * 20u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 20, 20), + IntRect(0, 0, 20, 20)); + + // Check that the generated image is correct. As mentioned above, we expect + // even rows to be green and odd rows to be red. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 20; ++row) { + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, + row % 2 == 0 ? BGRAColor::Green() + : BGRAColor::Red())); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput7_7) +{ + WithDeinterlacingFilter(IntSize(7, 7), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a repeating pattern of two green + // rows followed by two red rows but we need to write the rows in the order + // that the deinterlacer expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 7; // Integer division. + ++count; + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + case 1: // Output row 4. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Third pass. Rows are positioned at 4n + 2. + case 2: // Output row 2. + case 3: // Output row 6. + return AsVariant(BGRAColor::Red().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 4: // Output row 1. + return AsVariant(BGRAColor::Green().AsPixel()); + + case 5: // Output row 3. + return AsVariant(BGRAColor::Red().AsPixel()); + + case 6: // Output row 5. + return AsVariant(BGRAColor::Green().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(7u * 7u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 7, 7), + IntRect(0, 0, 7, 7)); + + // Check that the generated image is correct. As mentioned above, we expect + // two green rows, followed by two red rows, then two green rows, etc. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 7; ++row) { + BGRAColor color = row == 0 || row == 1 || row == 4 || row == 5 + ? BGRAColor::Green() + : BGRAColor::Red(); + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, color)); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput3_3) +{ + WithDeinterlacingFilter(IntSize(3, 3), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be green, red, green in that order, but + // we need to write the rows in the order that the deinterlacer expects + // them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 3; // Integer division. + ++count; + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + // No rows for this pass. + + // Third pass. Rows are positioned at 4n + 2. + case 1: // Output row 2. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 2: // Output row 1. + return AsVariant(BGRAColor::Red().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(3u * 3u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 3, 3), + IntRect(0, 0, 3, 3)); + + // Check that the generated image is correct. As mentioned above, we expect + // green, red, green in that order. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 3; ++row) { + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, + row == 0 || row == 2 ? BGRAColor::Green() + : BGRAColor::Red())); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput1_1) +{ + WithDeinterlacingFilter(IntSize(1, 1), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a single red row. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(1u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 1, 1), + IntRect(0, 0, 1, 1)); + + // Check that the generated image is correct. As mentioned above, we expect + // a single red row. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 1, BGRAColor::Red())); + }); +} + +void +WriteRowAndCheckInterlacerOutput(Decoder* aDecoder, + SurfaceFilter* aFilter, + BGRAColor aColor, + WriteState aNextState, + IntRect aInvalidRect, + uint32_t aFirstHaeberliRow, + uint32_t aLastHaeberliRow) +{ + uint32_t count = 0; + + auto result = aFilter->WritePixels([&]() -> NextPixel { + if (count < 7) { + ++count; + return AsVariant(aColor.AsPixel()); + } + return AsVariant(WriteState::NEED_MORE_DATA); + }); + + EXPECT_EQ(aNextState, result); + EXPECT_EQ(7u, count); + + // Assert that we got the expected invalidation region. + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(aInvalidRect, invalidRect->mInputSpaceRect); + EXPECT_EQ(aInvalidRect, invalidRect->mOutputSpaceRect); + + // Check that the portion of the image generated so far is correct. The rows + // from aFirstHaeberliRow to aLastHaeberliRow should be filled with aColor. + // Note that this is not the same as the set of rows in aInvalidRect, because + // after writing a row the deinterlacer seeks to the next row to write, which + // may involve copying previously-written rows in the buffer to the output + // even though they don't change in this pass. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = aFirstHaeberliRow; row <= aLastHaeberliRow; ++row) { + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, aColor)); + } +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsIntermediateOutput7_7) +{ + WithDeinterlacingFilter(IntSize(7, 7), /* aProgressiveDisplay = */ true, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a repeating pattern of two green + // rows followed by two red rows but we need to write the rows in the order + // that the deinterlacer expects them. + + // First pass. Output rows are positioned at 8n + 0. + + // Output row 0. The invalid rect is the entire image because this is the + // end of the first pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + IntRect(0, 0, 7, 7), 0, 4); + + // Second pass. Rows are positioned at 8n + 4. + + // Output row 4. The invalid rect is the entire image because this is the + // end of the second pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + IntRect(0, 0, 7, 7), 1, 4); + + // Third pass. Rows are positioned at 4n + 2. + + // Output row 2. The invalid rect contains the Haeberli rows for this output + // row (rows 2 and 3) as well as the rows that we copy from previous passes + // when seeking to the next output row (rows 4 and 5). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + IntRect(0, 2, 7, 4), 2, 3); + + // Output row 6. The invalid rect is the entire image because this is the + // end of the third pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + IntRect(0, 0, 7, 7), 6, 6); + + // Fourth pass. Rows are positioned at 2n + 1. + + // Output row 1. The invalid rect contains the Haeberli rows for this output + // row (just row 1) as well as the rows that we copy from previous passes + // when seeking to the next output row (row 2). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + IntRect(0, 1, 7, 2), 1, 1); + + // Output row 3. The invalid rect contains the Haeberli rows for this output + // row (just row 3) as well as the rows that we copy from previous passes + // when seeking to the next output row (row 4). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + IntRect(0, 3, 7, 2), 3, 3); + + // Output row 5. The invalid rect contains the Haeberli rows for this output + // row (just row 5) as well as the rows that we copy from previous passes + // when seeking to the next output row (row 6). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::FINISHED, + IntRect(0, 5, 7, 2), 5, 5); + + // Assert that we're in the expected final state. + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. As mentioned above, we expect + // two green rows, followed by two red rows, then two green rows, etc. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 7; ++row) { + BGRAColor color = row == 0 || row == 1 || row == 4 || row == 5 + ? BGRAColor::Green() + : BGRAColor::Red(); + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, color)); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsNonProgressiveIntermediateOutput7_7) +{ + WithDeinterlacingFilter(IntSize(7, 7), /* aProgressiveDisplay = */ false, + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a repeating pattern of two green + // rows followed by two red rows but we need to write the rows in the order + // that the deinterlacer expects them. + + // First pass. Output rows are positioned at 8n + 0. + + // Output row 0. The invalid rect is the entire image because this is the + // end of the first pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + IntRect(0, 0, 7, 7), 0, 0); + + // Second pass. Rows are positioned at 8n + 4. + + // Output row 4. The invalid rect is the entire image because this is the + // end of the second pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + IntRect(0, 0, 7, 7), 4, 4); + + // Third pass. Rows are positioned at 4n + 2. + + // Output row 2. The invalid rect contains the Haeberli rows for this output + // row (rows 2 and 3) as well as the rows that we copy from previous passes + // when seeking to the next output row (rows 4 and 5). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + IntRect(0, 2, 7, 4), 2, 2); + + // Output row 6. The invalid rect is the entire image because this is the + // end of the third pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + IntRect(0, 0, 7, 7), 6, 6); + + // Fourth pass. Rows are positioned at 2n + 1. + + // Output row 1. The invalid rect contains the Haeberli rows for this output + // row (just row 1) as well as the rows that we copy from previous passes + // when seeking to the next output row (row 2). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + IntRect(0, 1, 7, 2), 1, 1); + + // Output row 3. The invalid rect contains the Haeberli rows for this output + // row (just row 3) as well as the rows that we copy from previous passes + // when seeking to the next output row (row 4). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + IntRect(0, 3, 7, 2), 3, 3); + + // Output row 5. The invalid rect contains the Haeberli rows for this output + // row (just row 5) as well as the rows that we copy from previous passes + // when seeking to the next output row (row 6). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::FINISHED, + IntRect(0, 5, 7, 2), 5, 5); + + // Assert that we're in the expected final state. + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. As mentioned above, we expect + // two green rows, followed by two red rows, then two green rows, etc. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 7; ++row) { + BGRAColor color = row == 0 || row == 1 || row == 4 || row == 5 + ? BGRAColor::Green() + : BGRAColor::Red(); + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, color)); + } + }); +} + + +TEST_F(ImageDeinterlacingFilter, DeinterlacingFailsFor0_0) +{ + // A 0x0 input size is invalid, so configuration should fail. + AssertConfiguringDeinterlacingFilterFails(IntSize(0, 0)); +} + +TEST_F(ImageDeinterlacingFilter, DeinterlacingFailsForMinus1_Minus1) +{ + // A negative input size is invalid, so configuration should fail. + AssertConfiguringDeinterlacingFilterFails(IntSize(-1, -1)); +} diff --git a/image/test/gtest/TestDownscalingFilter.cpp b/image/test/gtest/TestDownscalingFilter.cpp new file mode 100644 index 000000000..596becab0 --- /dev/null +++ b/image/test/gtest/TestDownscalingFilter.cpp @@ -0,0 +1,231 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template void +WithDownscalingFilter(const IntSize& aInputSize, + const IntSize& aOutputSize, + Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline(decoder, Forward(aFunc), + DownscalingConfig { aInputSize, + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, aOutputSize, + SurfaceFormat::B8G8R8A8, false }); +} + +void +AssertConfiguringDownscalingFilterFails(const IntSize& aInputSize, + const IntSize& aOutputSize) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AssertConfiguringPipelineFails(decoder, + DownscalingConfig { aInputSize, + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, aOutputSize, + SurfaceFormat::B8G8R8A8, false }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to99_99) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(99, 99), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 99))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to33_33) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(33, 33), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 33, 33))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to1_1) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(1, 1), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 1, 1))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to33_99) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(33, 99), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 33, 99))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to99_33) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(99, 33), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 33))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to99_1) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(99, 1), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 1))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to1_99) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(1, 99), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 1, 99))); + }); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100to101_101) +{ + // Upscaling is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(101, 101)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100to100_100) +{ + // "Scaling" to the same size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(100, 100)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor0_0toMinus1_Minus1) +{ + // A 0x0 input size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(0, 0), IntSize(-1, -1)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsForMinus1_Minus1toMinus2_Minus2) +{ + // A negative input size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(-1, -1), IntSize(-2, -2)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100to0_0) +{ + // A 0x0 output size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(0, 0)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100toMinus1_Minus1) +{ + // A negative output size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(-1, -1)); +} + +TEST(ImageDownscalingFilter, WritePixelsOutput100_100to20_20) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(20, 20), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. It consists of 25 lines of green, followed by 25 lines of + // red, followed by 25 lines of green, followed by 25 more lines of red. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() -> NextPixel { + uint32_t color = (count <= 25 * 100) || (count > 50 * 100 && count <= 75 * 100) + ? BGRAColor::Green().AsPixel() + : BGRAColor::Red().AsPixel(); + ++count; + return AsVariant(color); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 20, 20)); + + // Check that the generated image is correct. Note that we skip rows near + // the transitions between colors, since the downscaler does not produce a + // sharp boundary at these points. Even some of the rows we test need a + // small amount of fuzz; this is just the nature of Lanczos downscaling. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, BGRAColor::Green(), /* aFuzz = */ 2)); + EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, BGRAColor::Red(), /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, BGRAColor::Red(), /* aFuzz = */ 3)); + }); +} + +TEST(ImageDownscalingFilter, WritePixelsOutput100_100to10_20) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(10, 20), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. It consists of 25 lines of green, followed by 25 lines of + // red, followed by 25 lines of green, followed by 25 more lines of red. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() -> NextPixel { + uint32_t color = (count <= 25 * 100) || (count > 50 * 100 && count <= 75 * 100) + ? BGRAColor::Green().AsPixel() + : BGRAColor::Red().AsPixel(); + ++count; + return AsVariant(color); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aFilter, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 10, 20)); + + // Check that the generated image is correct. Note that we skip rows near + // the transitions between colors, since the downscaler does not produce a + // sharp boundary at these points. Even some of the rows we test need a + // small amount of fuzz; this is just the nature of Lanczos downscaling. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, BGRAColor::Green(), /* aFuzz = */ 2)); + EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, BGRAColor::Red(), /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, BGRAColor::Red(), /* aFuzz = */ 3)); + }); +} + +TEST(ImageDownscalingFilter, ConfiguringPalettedDownscaleFails) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // DownscalingFilter does not support paletted images, so configuration should + // fail. + AssertConfiguringPipelineFails(decoder, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + PalettedSurfaceConfig { decoder, 0, IntSize(20, 20), + IntRect(0, 0, 20, 20), + SurfaceFormat::B8G8R8A8, 8, + false }); +} diff --git a/image/test/gtest/TestDownscalingFilterNoSkia.cpp b/image/test/gtest/TestDownscalingFilterNoSkia.cpp new file mode 100644 index 000000000..c62ca018d --- /dev/null +++ b/image/test/gtest/TestDownscalingFilterNoSkia.cpp @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfacePipe.h" + +// We want to ensure that we're testing the non-Skia fallback version of +// DownscalingFilter, but there are two issues: +// (1) We don't know whether Skia is currently enabled. +// (2) If we force disable it, the disabled version will get linked into the +// binary and will cause the tests in TestDownscalingFilter to fail. +// To avoid these problems, we ensure that MOZ_ENABLE_SKIA is defined when +// including DownscalingFilter.h, and we use the preprocessor to redefine the +// DownscalingFilter class to DownscalingFilterNoSkia. + +#define DownscalingFilter DownscalingFilterNoSkia + +#ifdef MOZ_ENABLE_SKIA + +#undef MOZ_ENABLE_SKIA +#include "Common.h" +#include "DownscalingFilter.h" +#define MOZ_ENABLE_SKIA + +#else + +#include "Common.h" +#include "DownscalingFilter.h" + +#endif + +#undef DownscalingFilter + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +TEST(ImageDownscalingFilter, NoSkia) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + // Configuring a DownscalingFilter should fail without Skia. + AssertConfiguringPipelineFails(decoder, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, IntSize(50, 50), + SurfaceFormat::B8G8R8A8, false }); +} diff --git a/image/test/gtest/TestMetadata.cpp b/image/test/gtest/TestMetadata.cpp new file mode 100644 index 000000000..9f3a64898 --- /dev/null +++ b/image/test/gtest/TestMetadata.cpp @@ -0,0 +1,255 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "decoders/nsBMPDecoder.h" +#include "IDecodingTask.h" +#include "imgIContainer.h" +#include "imgITools.h" +#include "ImageFactory.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "nsIRunnable.h" +#include "nsIThread.h" +#include "mozilla/RefPtr.h" +#include "nsStreamUtils.h" +#include "nsString.h" +#include "nsThreadUtils.h" +#include "ProgressTracker.h" +#include "SourceBuffer.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +enum class BMPWithinICO +{ + NO, + YES +}; + +static void +CheckMetadata(const ImageTestCase& aTestCase, + BMPWithinICO aBMPWithinICO = BMPWithinICO::NO) +{ + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Write the data into a SourceBuffer. + NotNull> sourceBuffer = WrapNotNull(new SourceBuffer()); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + sourceBuffer->Complete(NS_OK); + + // Create a metadata decoder. + DecoderType decoderType = + DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = + DecoderFactory::CreateAnonymousMetadataDecoder(decoderType, sourceBuffer); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = new AnonymousDecodingTask(WrapNotNull(decoder)); + + if (aBMPWithinICO == BMPWithinICO::YES) { + static_cast(decoder.get())->SetIsWithinICO(); + } + + // Run the metadata decoder synchronously. + task->Run(); + + // Ensure that the metadata decoder didn't make progress it shouldn't have + // (which would indicate that it decoded past the header of the image). + Progress metadataProgress = decoder->TakeProgress(); + EXPECT_TRUE(0 == (metadataProgress & ~(FLAG_SIZE_AVAILABLE | + FLAG_HAS_TRANSPARENCY | + FLAG_IS_ANIMATED))); + + // If the test case is corrupt, assert what we can and return early. + if (aTestCase.mFlags & TEST_CASE_HAS_ERROR) { + EXPECT_TRUE(decoder->GetDecodeDone()); + EXPECT_TRUE(decoder->HasError()); + return; + } + + EXPECT_TRUE(decoder->GetDecodeDone() && !decoder->HasError()); + + // Check that we got the expected metadata. + EXPECT_TRUE(metadataProgress & FLAG_SIZE_AVAILABLE); + + IntSize metadataSize = decoder->Size(); + EXPECT_EQ(aTestCase.mSize.width, metadataSize.width); + EXPECT_EQ(aTestCase.mSize.height, metadataSize.height); + + bool expectTransparency = aBMPWithinICO == BMPWithinICO::YES + ? true + : bool(aTestCase.mFlags & TEST_CASE_IS_TRANSPARENT); + EXPECT_EQ(expectTransparency, bool(metadataProgress & FLAG_HAS_TRANSPARENCY)); + + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_ANIMATED), + bool(metadataProgress & FLAG_IS_ANIMATED)); + + // Create a full decoder, so we can compare the result. + decoder = + DecoderFactory::CreateAnonymousDecoder(decoderType, sourceBuffer, Nothing(), + DefaultSurfaceFlags()); + ASSERT_TRUE(decoder != nullptr); + task = new AnonymousDecodingTask(WrapNotNull(decoder)); + + if (aBMPWithinICO == BMPWithinICO::YES) { + static_cast(decoder.get())->SetIsWithinICO(); + } + + // Run the full decoder synchronously. + task->Run(); + + EXPECT_TRUE(decoder->GetDecodeDone() && !decoder->HasError()); + Progress fullProgress = decoder->TakeProgress(); + + // If the metadata decoder set a progress bit, the full decoder should also + // have set the same bit. + EXPECT_EQ(fullProgress, metadataProgress | fullProgress); + + // The full decoder and the metadata decoder should agree on the image's size. + IntSize fullSize = decoder->Size(); + EXPECT_EQ(metadataSize.width, fullSize.width); + EXPECT_EQ(metadataSize.height, fullSize.height); + + // We should not discover transparency during the full decode that we didn't + // discover during the metadata decode, unless the image is animated. + EXPECT_TRUE(!(fullProgress & FLAG_HAS_TRANSPARENCY) || + (metadataProgress & FLAG_HAS_TRANSPARENCY) || + (fullProgress & FLAG_IS_ANIMATED)); +} + +class ImageDecoderMetadata : public ::testing::Test +{ +protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDecoderMetadata, PNG) { CheckMetadata(GreenPNGTestCase()); } +TEST_F(ImageDecoderMetadata, TransparentPNG) { CheckMetadata(TransparentPNGTestCase()); } +TEST_F(ImageDecoderMetadata, GIF) { CheckMetadata(GreenGIFTestCase()); } +TEST_F(ImageDecoderMetadata, TransparentGIF) { CheckMetadata(TransparentGIFTestCase()); } +TEST_F(ImageDecoderMetadata, JPG) { CheckMetadata(GreenJPGTestCase()); } +TEST_F(ImageDecoderMetadata, BMP) { CheckMetadata(GreenBMPTestCase()); } +TEST_F(ImageDecoderMetadata, ICO) { CheckMetadata(GreenICOTestCase()); } +TEST_F(ImageDecoderMetadata, Icon) { CheckMetadata(GreenIconTestCase()); } + +TEST_F(ImageDecoderMetadata, AnimatedGIF) +{ + CheckMetadata(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, AnimatedPNG) +{ + CheckMetadata(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoderMetadata, FirstFramePaddingGIF) +{ + CheckMetadata(FirstFramePaddingGIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, TransparentIfWithinICOBMPNotWithinICO) +{ + CheckMetadata(TransparentIfWithinICOBMPTestCase(TEST_CASE_DEFAULT_FLAGS), + BMPWithinICO::NO); +} + +TEST_F(ImageDecoderMetadata, TransparentIfWithinICOBMPWithinICO) +{ + CheckMetadata(TransparentIfWithinICOBMPTestCase(TEST_CASE_IS_TRANSPARENT), + BMPWithinICO::YES); +} + +TEST_F(ImageDecoderMetadata, RLE4BMP) { CheckMetadata(RLE4BMPTestCase()); } +TEST_F(ImageDecoderMetadata, RLE8BMP) { CheckMetadata(RLE8BMPTestCase()); } + +TEST_F(ImageDecoderMetadata, Corrupt) { CheckMetadata(CorruptTestCase()); } + +TEST_F(ImageDecoderMetadata, NoFrameDelayGIF) +{ + CheckMetadata(NoFrameDelayGIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, NoFrameDelayGIFFullDecode) +{ + ImageTestCase testCase = NoFrameDelayGIFTestCase(); + + // The previous test (NoFrameDelayGIF) verifies that we *don't* detect that + // this test case is animated, because it has a zero frame delay for the first + // frame. This test verifies that when we do a full decode, we detect the + // animation at that point and successfully decode all the frames. + + // Create an image. + RefPtr image = + ImageFactory::CreateAnonymousImage(nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, nullptr, inputStream, 0, + static_cast(length)); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, nullptr, NS_OK, true); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Use GetFrame() to force a sync decode of the image. + RefPtr surface = + image->GetFrame(imgIContainer::FRAME_CURRENT, + imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + rv = image->GetHeight(&imageSize.height); + EXPECT_TRUE(NS_SUCCEEDED(rv)); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded both frames of the image. + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, + DefaultSurfaceFlags(), + PlaybackType::eAnimated)); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(0))); + EXPECT_TRUE(bool(result.Surface())); + + EXPECT_TRUE(NS_SUCCEEDED(result.Surface().Seek(1))); + EXPECT_TRUE(bool(result.Surface())); +} diff --git a/image/test/gtest/TestRemoveFrameRectFilter.cpp b/image/test/gtest/TestRemoveFrameRectFilter.cpp new file mode 100644 index 000000000..e1def590e --- /dev/null +++ b/image/test/gtest/TestRemoveFrameRectFilter.cpp @@ -0,0 +1,327 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template void +WithRemoveFrameRectFilter(const IntSize& aSize, + const IntRect& aFrameRect, + Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline(decoder, Forward(aFunc), + RemoveFrameRectConfig { aFrameRect }, + SurfaceConfig { decoder, 0, aSize, + SurfaceFormat::B8G8R8A8, false }); +} + +void +AssertConfiguringRemoveFrameRectFilterFails(const IntSize& aSize, + const IntRect& aFrameRect) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AssertConfiguringPipelineFails(decoder, + RemoveFrameRectConfig { aFrameRect }, + SurfaceConfig { decoder, 0, aSize, + SurfaceFormat::B8G8R8A8, false }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_0_0_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 100))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_0_0_0_0) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(0, 0, 0, 0), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus50_50_0_0) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(-50, 50, 0, 0), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_50_Minus50_0_0) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(50, -50, 0, 0), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_150_50_0_0) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(150, 50, 0, 0), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_50_150_0_0) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(50, 150, 0, 0), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_200_200_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(200, 200, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus200_25_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(-200, 25, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_Minus200_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(25, -200, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_200_25_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(200, 25, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_200_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(25, 200, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus200_Minus200_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(-200, -200, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus50_Minus50_100_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(-50, -50, 100, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus50_25_100_50) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(-50, 25, 100, 50), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 50)), + /* aOutputWriteRect = */ Some(IntRect(0, 25, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_Minus50_50_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(25, -50, 50, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 50, 100)), + /* aOutputWriteRect = */ Some(IntRect(25, 0, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_50_25_100_50) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(50, 25, 100, 50), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 50)), + /* aOutputWriteRect = */ Some(IntRect(50, 25, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_50_50_100) +{ + WithRemoveFrameRectFilter(IntSize(100, 100), + IntRect(25, 50, 50, 100), + [](Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is 50x50 because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(25, 50, 50, 100))); + }); +} + +TEST(ImageRemoveFrameRectFilter, RemoveFrameRectFailsFor0_0_to_0_0_100_100) +{ + // A zero-size image is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(0, 0), + IntRect(0, 0, 100, 100)); +} + +TEST(ImageRemoveFrameRectFilter, RemoveFrameRectFailsForMinus1_Minus1_to_0_0_100_100) +{ + // A negative-size image is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(-1, -1), + IntRect(0, 0, 100, 100)); +} + +TEST(ImageRemoveFrameRectFilter, RemoveFrameRectFailsFor100_100_to_0_0_0_0) +{ + // A zero size frame rect is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(100, 100), + IntRect(0, 0, -1, -1)); +} + +TEST(ImageRemoveFrameRectFilter, RemoveFrameRectFailsFor100_100_to_0_0_Minus1_Minus1) +{ + // A negative size frame rect is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(100, 100), + IntRect(0, 0, -1, -1)); +} + +TEST(ImageRemoveFrameRectFilter, ConfiguringPalettedRemoveFrameRectFails) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // RemoveFrameRectFilter does not support paletted images, so configuration + // should fail. + AssertConfiguringPipelineFails(decoder, + RemoveFrameRectConfig { IntRect(0, 0, 50, 50) }, + PalettedSurfaceConfig { decoder, 0, IntSize(100, 100), + IntRect(0, 0, 50, 50), + SurfaceFormat::B8G8R8A8, 8, + false }); +} diff --git a/image/test/gtest/TestSourceBuffer.cpp b/image/test/gtest/TestSourceBuffer.cpp new file mode 100644 index 000000000..05a88093f --- /dev/null +++ b/image/test/gtest/TestSourceBuffer.cpp @@ -0,0 +1,810 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include +#include + +#include "mozilla/Move.h" +#include "SourceBuffer.h" +#include "SurfaceCache.h" + +using namespace mozilla; +using namespace mozilla::image; + +using std::min; + +void +ExpectChunkAndByteCount(const SourceBufferIterator& aIterator, + uint32_t aChunks, + size_t aBytes) +{ + EXPECT_EQ(aChunks, aIterator.ChunkCount()); + EXPECT_EQ(aBytes, aIterator.ByteCount()); +} + +void +ExpectRemainingBytes(const SourceBufferIterator& aIterator, size_t aBytes) +{ + EXPECT_TRUE(aIterator.RemainingBytesIsNoMoreThan(aBytes)); + EXPECT_TRUE(aIterator.RemainingBytesIsNoMoreThan(aBytes + 1)); + + if (aBytes > 0) { + EXPECT_FALSE(aIterator.RemainingBytesIsNoMoreThan(0)); + EXPECT_FALSE(aIterator.RemainingBytesIsNoMoreThan(aBytes - 1)); + } +} + +char +GenerateByte(size_t aIndex) +{ + uint8_t byte = aIndex % 256; + return *reinterpret_cast(&byte); +} + +void +GenerateData(char* aOutput, size_t aOffset, size_t aLength) +{ + for (size_t i = 0; i < aLength; ++i) { + aOutput[i] = GenerateByte(aOffset + i); + } +} + +void +GenerateData(char* aOutput, size_t aLength) +{ + GenerateData(aOutput, 0, aLength); +} + +void +CheckData(const char* aData, size_t aOffset, size_t aLength) +{ + for (size_t i = 0; i < aLength; ++i) { + ASSERT_EQ(GenerateByte(aOffset + i), aData[i]); + } +} + +enum class AdvanceMode +{ + eAdvanceAsMuchAsPossible, + eAdvanceByLengthExactly +}; + +class ImageSourceBuffer : public ::testing::Test +{ +public: + ImageSourceBuffer() + : mSourceBuffer(new SourceBuffer) + , mExpectNoResume(new ExpectNoResume) + , mCountResumes(new CountResumes) + { + GenerateData(mData, sizeof(mData)); + EXPECT_FALSE(mSourceBuffer->IsComplete()); + } + +protected: + void CheckedAppendToBuffer(const char* aData, size_t aLength) + { + EXPECT_TRUE(NS_SUCCEEDED(mSourceBuffer->Append(aData, aLength))); + } + + void CheckedAppendToBufferLastByteForLength(size_t aLength) + { + const char lastByte = GenerateByte(aLength); + CheckedAppendToBuffer(&lastByte, 1); + } + + void CheckedAppendToBufferInChunks(size_t aChunkLength, size_t aTotalLength) + { + char* data = new char[aChunkLength]; + + size_t bytesWritten = 0; + while (bytesWritten < aTotalLength) { + GenerateData(data, bytesWritten, aChunkLength); + size_t toWrite = min(aChunkLength, aTotalLength - bytesWritten); + CheckedAppendToBuffer(data, toWrite); + bytesWritten += toWrite; + } + + delete[] data; + } + + void CheckedCompleteBuffer(nsresult aCompletionStatus = NS_OK) + { + mSourceBuffer->Complete(aCompletionStatus); + EXPECT_TRUE(mSourceBuffer->IsComplete()); + } + + void CheckedCompleteBuffer(SourceBufferIterator& aIterator, + size_t aLength, + nsresult aCompletionStatus = NS_OK) + { + CheckedCompleteBuffer(aCompletionStatus); + ExpectRemainingBytes(aIterator, aLength); + } + + void CheckedAdvanceIteratorStateOnly(SourceBufferIterator& aIterator, + size_t aLength, + uint32_t aChunks, + size_t aTotalLength, + AdvanceMode aAdvanceMode + = AdvanceMode::eAdvanceAsMuchAsPossible) + { + const size_t advanceBy = aAdvanceMode == AdvanceMode::eAdvanceAsMuchAsPossible + ? SIZE_MAX + : aLength; + + auto state = aIterator.AdvanceOrScheduleResume(advanceBy, mExpectNoResume); + ASSERT_EQ(SourceBufferIterator::READY, state); + EXPECT_TRUE(aIterator.Data()); + EXPECT_EQ(aLength, aIterator.Length()); + + ExpectChunkAndByteCount(aIterator, aChunks, aTotalLength); + } + + void CheckedAdvanceIteratorStateOnly(SourceBufferIterator& aIterator, + size_t aLength) + { + CheckedAdvanceIteratorStateOnly(aIterator, aLength, 1, aLength); + } + + void CheckedAdvanceIterator(SourceBufferIterator& aIterator, + size_t aLength, + uint32_t aChunks, + size_t aTotalLength, + AdvanceMode aAdvanceMode + = AdvanceMode::eAdvanceAsMuchAsPossible) + { + // Check that the iterator is in the expected state. + CheckedAdvanceIteratorStateOnly(aIterator, aLength, aChunks, + aTotalLength, aAdvanceMode); + + // Check that we read the expected data. To do this, we need to compute our + // offset in the SourceBuffer, but fortunately that's pretty easy: it's the + // total number of bytes the iterator has advanced through, minus the length + // of the current chunk. + const size_t offset = aIterator.ByteCount() - aIterator.Length(); + CheckData(aIterator.Data(), offset, aIterator.Length()); + } + + void CheckedAdvanceIterator(SourceBufferIterator& aIterator, size_t aLength) + { + CheckedAdvanceIterator(aIterator, aLength, 1, aLength); + } + + void CheckIteratorMustWait(SourceBufferIterator& aIterator, + IResumable* aOnResume) + { + auto state = aIterator.AdvanceOrScheduleResume(1, aOnResume); + EXPECT_EQ(SourceBufferIterator::WAITING, state); + } + + void CheckIteratorIsComplete(SourceBufferIterator& aIterator, + uint32_t aChunks, + size_t aTotalLength, + nsresult aCompletionStatus = NS_OK) + { + ASSERT_TRUE(mSourceBuffer->IsComplete()); + auto state = aIterator.AdvanceOrScheduleResume(1, mExpectNoResume); + ASSERT_EQ(SourceBufferIterator::COMPLETE, state); + EXPECT_EQ(aCompletionStatus, aIterator.CompletionStatus()); + ExpectRemainingBytes(aIterator, 0); + ExpectChunkAndByteCount(aIterator, aChunks, aTotalLength); + } + + void CheckIteratorIsComplete(SourceBufferIterator& aIterator, + size_t aTotalLength) + { + CheckIteratorIsComplete(aIterator, 1, aTotalLength); + } + + AutoInitializeImageLib mInit; + char mData[9]; + RefPtr mSourceBuffer; + RefPtr mExpectNoResume; + RefPtr mCountResumes; +}; + +TEST_F(ImageSourceBuffer, InitialState) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // RemainingBytesIsNoMoreThan() should always return false in the initial + // state, since we can't know the answer until Complete() has been called. + EXPECT_FALSE(iterator.RemainingBytesIsNoMoreThan(0)); + EXPECT_FALSE(iterator.RemainingBytesIsNoMoreThan(SIZE_MAX)); + + // We haven't advanced our iterator at all, so its counters should be zero. + ExpectChunkAndByteCount(iterator, 0, 0); + + // Attempt to advance; we should fail, and end up in the WAITING state. We + // expect no resumes because we don't actually append anything to the + // SourceBuffer in this test. + CheckIteratorMustWait(iterator, mExpectNoResume); +} + +TEST_F(ImageSourceBuffer, ZeroLengthBufferAlwaysFails) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Complete the buffer without writing to it, providing a successful + // completion status. + CheckedCompleteBuffer(iterator, 0); + + // Completing a buffer without writing to it results in an automatic failure; + // make sure that the actual completion status we get from the iterator + // reflects this. + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_FAILURE); +} + +TEST_F(ImageSourceBuffer, CompleteSuccess) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write a single byte to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 1); + CheckedCompleteBuffer(iterator, 1); + + // We should be able to advance once (to read the single byte) and then should + // reach the COMPLETE state with a successful status. + CheckedAdvanceIterator(iterator, 1); + CheckIteratorIsComplete(iterator, 1); +} + +TEST_F(ImageSourceBuffer, CompleteFailure) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write a single byte to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 1); + CheckedCompleteBuffer(iterator, 1, NS_ERROR_FAILURE); + + // Advance the iterator. Because a failing status is propagated to the + // iterator as soon as it advances, we won't be able to read the single byte + // that we wrote above; we go directly into the COMPLETE state. + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_FAILURE); +} + +TEST_F(ImageSourceBuffer, Append) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write test data to the buffer. + EXPECT_TRUE(NS_SUCCEEDED(mSourceBuffer->ExpectLength(sizeof(mData)))); + CheckedAppendToBuffer(mData, sizeof(mData)); + CheckedCompleteBuffer(iterator, sizeof(mData)); + + // Verify that we can read it back via the iterator, and that the final state + // is what we expect. + CheckedAdvanceIterator(iterator, sizeof(mData)); + CheckIteratorIsComplete(iterator, sizeof(mData)); +} + +TEST_F(ImageSourceBuffer, HugeAppendFails) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // We should fail to append anything bigger than what the SurfaceCache can + // hold, so use the SurfaceCache's maximum capacity to calculate what a + // "massive amount of data" (see below) consists of on this platform. + ASSERT_LT(SurfaceCache::MaximumCapacity(), SIZE_MAX); + const size_t hugeSize = SurfaceCache::MaximumCapacity() + 1; + + // Attempt to write a massive amount of data and verify that it fails. (We'd + // get a buffer overrun during the test if it succeeds, but if it succeeds + // that's the least of our problems.) + EXPECT_TRUE(NS_FAILED(mSourceBuffer->Append(mData, hugeSize))); + EXPECT_TRUE(mSourceBuffer->IsComplete()); + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_OUT_OF_MEMORY); +} + +TEST_F(ImageSourceBuffer, AppendFromInputStream) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Construct an input stream with some arbitrary data. (We use test data from + // one of the decoder tests.) + nsCOMPtr inputStream = LoadFile(GreenPNGTestCase().mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + ASSERT_TRUE(NS_SUCCEEDED(inputStream->Available(&length))); + + // Write test data to the buffer. + EXPECT_TRUE(NS_SUCCEEDED(mSourceBuffer->AppendFromInputStream(inputStream, + length))); + CheckedCompleteBuffer(iterator, length); + + // Verify that the iterator sees the appropriate amount of data. + CheckedAdvanceIteratorStateOnly(iterator, length); + CheckIteratorIsComplete(iterator, length); +} + +TEST_F(ImageSourceBuffer, AppendAfterComplete) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write test data to the buffer. + EXPECT_TRUE(NS_SUCCEEDED(mSourceBuffer->ExpectLength(sizeof(mData)))); + CheckedAppendToBuffer(mData, sizeof(mData)); + CheckedCompleteBuffer(iterator, sizeof(mData)); + + // Verify that we can read it back via the iterator, and that the final state + // is what we expect. + CheckedAdvanceIterator(iterator, sizeof(mData)); + CheckIteratorIsComplete(iterator, sizeof(mData)); + + // Write more data to the completed buffer. + EXPECT_TRUE(NS_FAILED(mSourceBuffer->Append(mData, sizeof(mData)))); + + // Try to read with a new iterator and verify that the new data got ignored. + SourceBufferIterator iterator2 = mSourceBuffer->Iterator(); + CheckedAdvanceIterator(iterator2, sizeof(mData)); + CheckIteratorIsComplete(iterator2, sizeof(mData)); +} + +TEST_F(ImageSourceBuffer, MinChunkCapacity) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write test data to the buffer using many small appends. Since + // ExpectLength() isn't being called, we should be able to write up to + // SourceBuffer::MIN_CHUNK_CAPACITY bytes without a second chunk being + // allocated. + CheckedAppendToBufferInChunks(10, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Verify that the iterator sees the appropriate amount of data. + CheckedAdvanceIterator(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(SourceBuffer::MIN_CHUNK_CAPACITY); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 2, SourceBuffer::MIN_CHUNK_CAPACITY + 1); + CheckIteratorIsComplete(iterator, 2, SourceBuffer::MIN_CHUNK_CAPACITY + 1); +} + +TEST_F(ImageSourceBuffer, ExpectLengthDoesNotShrinkBelowMinCapacity) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the buffer, + // but call ExpectLength() first to make SourceBuffer expect only a single + // byte. We expect this to still result in only one chunk, because + // regardless of ExpectLength() we won't allocate a chunk smaller than + // MIN_CHUNK_CAPACITY bytes. + EXPECT_TRUE(NS_SUCCEEDED(mSourceBuffer->ExpectLength(1))); + CheckedAppendToBufferInChunks(10, SourceBuffer::MIN_CHUNK_CAPACITY); + CheckedCompleteBuffer(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Verify that the iterator sees a single chunk. + CheckedAdvanceIterator(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + CheckIteratorIsComplete(iterator, 1, SourceBuffer::MIN_CHUNK_CAPACITY); +} + +TEST_F(ImageSourceBuffer, ExpectLengthGrowsAboveMinCapacity) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write two times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer, calling ExpectLength() with the correct length first. We expect + // this to result in only one chunk, because ExpectLength() allows us to + // allocate a larger first chunk than MIN_CHUNK_CAPACITY bytes. + const size_t length = 2 * SourceBuffer::MIN_CHUNK_CAPACITY; + EXPECT_TRUE(NS_SUCCEEDED(mSourceBuffer->ExpectLength(length))); + CheckedAppendToBufferInChunks(10, length); + + // Verify that the iterator sees a single chunk. + CheckedAdvanceIterator(iterator, length); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(length); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 2, length + 1); + CheckIteratorIsComplete(iterator, 2, length + 1); +} + +TEST_F(ImageSourceBuffer, HugeExpectLengthFails) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // ExpectLength() should fail if the length is bigger than what the + // SurfaceCache can hold, so use the SurfaceCache's maximum capacity to + // calculate what a "massive amount of data" (see below) consists of on this + // platform. + ASSERT_LT(SurfaceCache::MaximumCapacity(), SIZE_MAX); + const size_t hugeSize = SurfaceCache::MaximumCapacity() + 1; + + // Attempt to write a massive amount of data and verify that it fails. (We'd + // get a buffer overrun during the test if it succeeds, but if it succeeds + // that's the least of our problems.) + EXPECT_TRUE(NS_FAILED(mSourceBuffer->ExpectLength(hugeSize))); + EXPECT_TRUE(mSourceBuffer->IsComplete()); + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_OUT_OF_MEMORY); +} + +TEST_F(ImageSourceBuffer, LargeAppendsAllocateOnlyOneChunk) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write two times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. We expect this to result in only one + // chunk even though ExpectLength() wasn't called, because we should always + // allocate a new chunk large enough to store the data we have at hand. + constexpr size_t length = 2 * SourceBuffer::MIN_CHUNK_CAPACITY; + char data[length]; + GenerateData(data, sizeof(data)); + CheckedAppendToBuffer(data, length); + + // Verify that the iterator sees a single chunk. + CheckedAdvanceIterator(iterator, length); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(length); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 2, length + 1); + CheckIteratorIsComplete(iterator, 2, length + 1); +} + +TEST_F(ImageSourceBuffer, LargeAppendsAllocateAtMostOneChunk) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Allocate some data we'll use below. + constexpr size_t firstWriteLength = SourceBuffer::MIN_CHUNK_CAPACITY / 2; + constexpr size_t secondWriteLength = 3 * SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = firstWriteLength + secondWriteLength; + char data[totalLength]; + GenerateData(data, sizeof(data)); + + // Write half of SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. This should fill half of the first chunk. + CheckedAppendToBuffer(data, firstWriteLength); + + // Write three times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. We expect this to result in the first of + // the first chunk being filled and a new chunk being allocated for the + // remainder. + CheckedAppendToBuffer(data + firstWriteLength, secondWriteLength); + + // Verify that the iterator sees a MIN_CHUNK_CAPACITY-length chunk. + CheckedAdvanceIterator(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Verify that the iterator sees a second chunk of the length we expect. + const size_t expectedSecondChunkLength = + totalLength - SourceBuffer::MIN_CHUNK_CAPACITY; + CheckedAdvanceIterator(iterator, expectedSecondChunkLength, 2, totalLength); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(totalLength); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 3, totalLength + 1); + CheckIteratorIsComplete(iterator, 3, totalLength + 1); +} + +TEST_F(ImageSourceBuffer, CompactionHappensWhenBufferIsComplete) +{ + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. + CheckedAppendToBufferInChunks(chunkLength, totalLength); + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Verify that the iterator sees two chunks. + CheckedAdvanceIterator(iterator, chunkLength); + CheckedAdvanceIterator(iterator, chunkLength, 2, totalLength); + } + + // Complete the buffer, which should trigger compaction implicitly. + CheckedCompleteBuffer(); + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Verify that compaction happened and there's now only one chunk. + CheckedAdvanceIterator(iterator, totalLength); + CheckIteratorIsComplete(iterator, 1, totalLength); + } +} + +TEST_F(ImageSourceBuffer, CompactionIsDelayedWhileIteratorsExist) +{ + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + { + SourceBufferIterator outerIterator = mSourceBuffer->Iterator(); + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write enough data to create two chunks. + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + // Verify that the iterator sees two chunks. Since there are live + // iterators, compaction shouldn't have happened when we completed the + // buffer. + CheckedAdvanceIterator(iterator, chunkLength); + CheckedAdvanceIterator(iterator, chunkLength, 2, totalLength); + CheckIteratorIsComplete(iterator, 2, totalLength); + } + + // Now |iterator| has been destroyed, but |outerIterator| still exists, so + // we expect no compaction to have occurred at this point. + CheckedAdvanceIterator(outerIterator, chunkLength); + CheckedAdvanceIterator(outerIterator, chunkLength, 2, totalLength); + CheckIteratorIsComplete(outerIterator, 2, totalLength); + } + + // Now all iterators have been destroyed. Since the buffer was already + // complete, we expect compaction to happen implicitly here. + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Verify that compaction happened and there's now only one chunk. + CheckedAdvanceIterator(iterator, totalLength); + CheckIteratorIsComplete(iterator, 1, totalLength); + } +} + +TEST_F(ImageSourceBuffer, SourceBufferIteratorsCanBeMoved) +{ + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. We create an iterator here to make + // sure that compaction doesn't happen during the test. + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + auto GetIterator = [&]{ + SourceBufferIterator lambdaIterator = mSourceBuffer->Iterator(); + CheckedAdvanceIterator(lambdaIterator, chunkLength); + return lambdaIterator; + }; + + // Move-construct |movedIterator| from the iterator returned from + // GetIterator() and check that its state is as we expect. + SourceBufferIterator movedIterator = Move(GetIterator()); + EXPECT_TRUE(movedIterator.Data()); + EXPECT_EQ(chunkLength, movedIterator.Length()); + ExpectChunkAndByteCount(movedIterator, 1, chunkLength); + + // Make sure that we can advance the iterator. + CheckedAdvanceIterator(movedIterator, chunkLength, 2, totalLength); + + // Make sure that the iterator handles completion properly. + CheckIteratorIsComplete(movedIterator, 2, totalLength); + + // Move-assign |movedIterator| from the iterator returned from + // GetIterator() and check that its state is as we expect. + movedIterator = Move(GetIterator()); + EXPECT_TRUE(movedIterator.Data()); + EXPECT_EQ(chunkLength, movedIterator.Length()); + ExpectChunkAndByteCount(movedIterator, 1, chunkLength); + + // Make sure that we can advance the iterator. + CheckedAdvanceIterator(movedIterator, chunkLength, 2, totalLength); + + // Make sure that the iterator handles completion properly. + CheckIteratorIsComplete(movedIterator, 2, totalLength); +} + +TEST_F(ImageSourceBuffer, SubchunkAdvance) +{ + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. We create our iterator here to make + // sure that compaction doesn't happen during the test. + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + // Advance through the first chunk. The chunk count should not increase. + // We check that by always passing 1 for the |aChunks| parameter of + // CheckedAdvanceIteratorStateOnly(). We have to call CheckData() manually + // because the offset calculation in CheckedAdvanceIterator() assumes that + // we're advancing a chunk at a time. + size_t offset = 0; + while (offset < chunkLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + } + + // Read the first byte of the second chunk. This is the point at which we + // can't advance within the same chunk, so the chunk count should increase. We + // check that by passing 2 for the |aChunks| parameter of + // CheckedAdvanceIteratorStateOnly(). + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + + // Read the rest of the second chunk. The chunk count should not increase. + while (offset < totalLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + } + + // Make sure we reached the end. + CheckIteratorIsComplete(iterator, 2, totalLength); +} + +TEST_F(ImageSourceBuffer, SubchunkZeroByteAdvance) +{ + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. We create our iterator here to make + // sure that compaction doesn't happen during the test. + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + // Make an initial zero-length advance. Although a zero-length advance + // normally won't cause us to read a chunk from the SourceBuffer, we'll do so + // if the iterator is in the initial state to keep the invariant that + // SourceBufferIterator in the READY state always returns a non-null pointer + // from Data(). + CheckedAdvanceIteratorStateOnly(iterator, 0, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + + // Advance through the first chunk. As in the |SubchunkAdvance| test, the + // chunk count should not increase. We do a zero-length advance after each + // normal advance to ensure that zero-length advances do not change the + // iterator's position or cause a new chunk to be read. + size_t offset = 0; + while (offset < chunkLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + CheckedAdvanceIteratorStateOnly(iterator, 0, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + } + + // Read the first byte of the second chunk. This is the point at which we + // can't advance within the same chunk, so the chunk count should increase. As + // before, we do a zero-length advance afterward. + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + CheckedAdvanceIteratorStateOnly(iterator, 0, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + + // Read the rest of the second chunk. The chunk count should not increase. As + // before, we do a zero-length advance after each normal advance. + while (offset < totalLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + CheckedAdvanceIteratorStateOnly(iterator, 0, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + } + + // Make sure we reached the end. + CheckIteratorIsComplete(iterator, 2, totalLength); +} + +TEST_F(ImageSourceBuffer, SubchunkZeroByteAdvanceWithNoData) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that advancing by zero bytes still makes us enter the WAITING state. + // This is because if we entered the READY state before reading any data at + // all, we'd break the invariant that SourceBufferIterator::Data() always + // returns a non-null pointer in the READY state. + auto state = iterator.AdvanceOrScheduleResume(0, mCountResumes); + EXPECT_EQ(SourceBufferIterator::WAITING, state); + + // Call Complete(). This should trigger a resume. + CheckedCompleteBuffer(); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, NullIResumable) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, nullptr); + + // Append to the buffer, which would cause a resume if we had passed a + // non-null IResumable. + CheckedAppendToBuffer(mData, sizeof(mData)); + CheckedCompleteBuffer(iterator, sizeof(mData)); +} + +TEST_F(ImageSourceBuffer, AppendTriggersResume) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mCountResumes); + + // Call Append(). This should trigger a resume. + mSourceBuffer->Append(mData, sizeof(mData)); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, OnlyOneResumeTriggeredPerAppend) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mCountResumes); + + // Allocate some data we'll use below. + constexpr size_t firstWriteLength = SourceBuffer::MIN_CHUNK_CAPACITY / 2; + constexpr size_t secondWriteLength = 3 * SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = firstWriteLength + secondWriteLength; + char data[totalLength]; + GenerateData(data, sizeof(data)); + + // Write half of SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. This should fill half of the first chunk. + // This should trigger a resume. + CheckedAppendToBuffer(data, firstWriteLength); + EXPECT_EQ(1u, mCountResumes->Count()); + + // Advance past the new data and wait again. + CheckedAdvanceIterator(iterator, firstWriteLength); + CheckIteratorMustWait(iterator, mCountResumes); + + // Write three times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. We expect this to result in the first of + // the first chunk being filled and a new chunk being allocated for the + // remainder. Even though two chunks are getting written to here, only *one* + // resume should get triggered, for a total of two in this test. + CheckedAppendToBuffer(data + firstWriteLength, secondWriteLength); + EXPECT_EQ(2u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, CompleteTriggersResume) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mCountResumes); + + // Call Complete(). This should trigger a resume. + CheckedCompleteBuffer(); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, ExpectLengthDoesNotTriggerResume) +{ + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mExpectNoResume); + + // Call ExpectLength(). If this triggers a resume, |mExpectNoResume| will + // ensure that the test fails. + mSourceBuffer->ExpectLength(1000); +} diff --git a/image/test/gtest/TestStreamingLexer.cpp b/image/test/gtest/TestStreamingLexer.cpp new file mode 100644 index 000000000..590b10e81 --- /dev/null +++ b/image/test/gtest/TestStreamingLexer.cpp @@ -0,0 +1,973 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/Vector.h" +#include "StreamingLexer.h" + +using namespace mozilla; +using namespace mozilla::image; + +enum class TestState +{ + ONE, + TWO, + THREE, + UNBUFFERED, + TRUNCATED_SUCCESS, + TRUNCATED_FAILURE +}; + +void +CheckLexedData(const char* aData, + size_t aLength, + size_t aOffset, + size_t aExpectedLength) +{ + EXPECT_TRUE(aLength == aExpectedLength); + + for (size_t i = 0; i < aLength; ++i) { + EXPECT_EQ(aData[i], char(aOffset + i + 1)); + } +} + +LexerTransition +DoLex(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::To(TestState::TWO, 3); + case TestState::TWO: + CheckLexedData(aData, aLength, 3, 3); + return Transition::To(TestState::THREE, 3); + case TestState::THREE: + CheckLexedData(aData, aLength, 6, 3); + return Transition::TerminateSuccess(); + case TestState::TRUNCATED_SUCCESS: + return Transition::TerminateSuccess(); + case TestState::TRUNCATED_FAILURE: + return Transition::TerminateFailure(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithUnbuffered(TestState aState, const char* aData, size_t aLength, + Vector& aUnbufferedVector) +{ + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 3); + case TestState::TWO: + CheckLexedData(aUnbufferedVector.begin(), aUnbufferedVector.length(), 3, 3); + return Transition::To(TestState::THREE, 3); + case TestState::THREE: + CheckLexedData(aData, aLength, 6, 3); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + EXPECT_TRUE(aLength <= 3); + EXPECT_TRUE(aUnbufferedVector.append(aData, aLength)); + return Transition::ContinueUnbuffered(TestState::UNBUFFERED); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithUnbufferedTerminate(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 3); + case TestState::UNBUFFERED: + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithYield(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToAfterYield(TestState::TWO); + case TestState::TWO: + CheckLexedData(aData, aLength, 0, 3); + return Transition::To(TestState::THREE, 6); + case TestState::THREE: + CheckLexedData(aData, aLength, 3, 6); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithTerminateAfterYield(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToAfterYield(TestState::TWO); + case TestState::TWO: + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithZeroLengthStates(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::TWO, 0); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 9); + case TestState::THREE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithZeroLengthStatesAtEnd(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::To(TestState::TWO, 0); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 0); + case TestState::THREE: + EXPECT_TRUE(aLength == 0); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithZeroLengthYield(TestState aState, const char* aData, size_t aLength) +{ + switch (aState) { + case TestState::ONE: + EXPECT_EQ(0u, aLength); + return Transition::ToAfterYield(TestState::TWO); + case TestState::TWO: + EXPECT_EQ(0u, aLength); + return Transition::To(TestState::THREE, 9); + case TestState::THREE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithZeroLengthStatesUnbuffered(TestState aState, + const char* aData, + size_t aLength) +{ + switch (aState) { + case TestState::ONE: + EXPECT_TRUE(aLength == 0); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 0); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 9); + case TestState::THREE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + ADD_FAILURE() << "Should not enter zero-length unbuffered state"; + return Transition::TerminateFailure(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition +DoLexWithZeroLengthStatesAfterUnbuffered(TestState aState, + const char* aData, + size_t aLength) +{ + switch (aState) { + case TestState::ONE: + EXPECT_TRUE(aLength == 0); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 9); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 0); + case TestState::THREE: + EXPECT_TRUE(aLength == 0); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + CheckLexedData(aData, aLength, 0, 9); + return Transition::ContinueUnbuffered(TestState::UNBUFFERED); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +class ImageStreamingLexer : public ::testing::Test +{ +public: + // Note that mLexer is configured to enter TerminalState::FAILURE immediately + // if the input data is truncated. We don't expect that to happen in most + // tests, so we want to detect that issue. If a test needs a different + // behavior, we create a special StreamingLexer just for that test. + ImageStreamingLexer() + : mLexer(Transition::To(TestState::ONE, 3), Transition::TerminateFailure()) + , mSourceBuffer(new SourceBuffer) + , mIterator(mSourceBuffer->Iterator()) + , mExpectNoResume(new ExpectNoResume) + , mCountResumes(new CountResumes) + { } + +protected: + void CheckTruncatedState(StreamingLexer& aLexer, + TerminalState aExpectedTerminalState, + nsresult aCompletionStatus = NS_OK) + { + for (unsigned i = 0; i < 9; ++i) { + if (i < 2) { + mSourceBuffer->Append(mData + i, 1); + } else if (i == 2) { + mSourceBuffer->Complete(aCompletionStatus); + } + + LexerResult result = aLexer.Lex(mIterator, mCountResumes, DoLex); + + if (i >= 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(aExpectedTerminalState, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + } + + AutoInitializeImageLib mInit; + const char mData[9] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + StreamingLexer mLexer; + RefPtr mSourceBuffer; + SourceBufferIterator mIterator; + RefPtr mExpectNoResume; + RefPtr mCountResumes; +}; + +TEST_F(ImageStreamingLexer, ZeroLengthData) +{ + // Test a zero-length input. + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLex); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthDataUnbuffered) +{ + // Test a zero-length input. + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be unbuffered. + StreamingLexer lexer(Transition::ToUnbuffered(TestState::ONE, + TestState::UNBUFFERED, + sizeof(mData)), + Transition::TerminateFailure()); + + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, DoLex); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, StartWithTerminal) +{ + // Create a special StreamingLexer for this test because we want the first + // state to be a terminal state. This doesn't really make sense, but we should + // handle it. + StreamingLexer lexer(Transition::TerminateSuccess(), + Transition::TerminateFailure()); + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, DoLex); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, SingleChunk) +{ + // Test delivering all the data at once. + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLex); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, SingleChunkWithUnbuffered) +{ + Vector unbufferedVector; + + // Test delivering all the data at once. + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = + mLexer.Lex(mIterator, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + return DoLexWithUnbuffered(aState, aData, aLength, unbufferedVector); + }); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, SingleChunkWithYield) +{ + // Test delivering all the data at once. + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLexWithYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = mLexer.Lex(mIterator, mExpectNoResume, DoLexWithYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ChunkPerState) +{ + // Test delivering in perfectly-sized chunks, one per state. + for (unsigned i = 0; i < 3; ++i) { + mSourceBuffer->Append(mData + 3 * i, 3); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLex); + + if (i == 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ChunkPerStateWithUnbuffered) +{ + Vector unbufferedVector; + + // Test delivering in perfectly-sized chunks, one per state. + for (unsigned i = 0; i < 3; ++i) { + mSourceBuffer->Append(mData + 3 * i, 3); + LexerResult result = + mLexer.Lex(mIterator, mCountResumes, + [&](TestState aState, const char* aData, size_t aLength) { + return DoLexWithUnbuffered(aState, aData, aLength, unbufferedVector); + }); + + if (i == 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ChunkPerStateWithYield) +{ + // Test delivering in perfectly-sized chunks, one per state. + mSourceBuffer->Append(mData, 3); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + + mSourceBuffer->Append(mData + 3, 6); + result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + + EXPECT_EQ(1u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ChunkPerStateWithUnbufferedYield) +{ + size_t unbufferedCallCount = 0; + Vector unbufferedVector; + auto lexerFunc = [&](TestState aState, const char* aData, size_t aLength) + -> LexerTransition { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 3); + case TestState::TWO: + CheckLexedData(unbufferedVector.begin(), unbufferedVector.length(), 3, 3); + return Transition::To(TestState::THREE, 3); + case TestState::THREE: + CheckLexedData(aData, aLength, 6, 3); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + switch (unbufferedCallCount) { + case 0: + CheckLexedData(aData, aLength, 3, 3); + EXPECT_TRUE(unbufferedVector.append(aData, 2)); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 2 bytes. + return Transition::ContinueUnbufferedAfterYield(TestState::UNBUFFERED, 2); + + case 1: + CheckLexedData(aData, aLength, 5, 1); + EXPECT_TRUE(unbufferedVector.append(aData, 1)); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 1 byte. + // We should end up in the TWO state. + return Transition::ContinueUnbuffered(TestState::UNBUFFERED); + } + ADD_FAILURE() << "Too many invocations of TestState::UNBUFFERED"; + return Transition::TerminateFailure(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } + }; + + // Test delivering in perfectly-sized chunks, one per state. + for (unsigned i = 0; i < 3; ++i) { + mSourceBuffer->Append(mData + 3 * i, 3); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, lexerFunc); + + switch (i) { + case 0: + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + EXPECT_EQ(0u, unbufferedCallCount); + break; + + case 1: + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(1u, unbufferedCallCount); + + result = mLexer.Lex(mIterator, mCountResumes, lexerFunc); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + EXPECT_EQ(2u, unbufferedCallCount); + break; + + case 2: + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + break; + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mCountResumes, lexerFunc); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, OneByteChunks) +{ + // Test delivering in one byte chunks. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLex); + + if (i == 8) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(8u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, OneByteChunksWithUnbuffered) +{ + Vector unbufferedVector; + + // Test delivering in one byte chunks. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = + mLexer.Lex(mIterator, mCountResumes, + [&](TestState aState, const char* aData, size_t aLength) { + return DoLexWithUnbuffered(aState, aData, aLength, unbufferedVector); + }); + + if (i == 8) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(8u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, OneByteChunksWithYield) +{ + // Test delivering in one byte chunks. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + + switch (i) { + case 2: + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + break; + + case 8: + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + break; + + default: + EXPECT_TRUE(i < 9); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(8u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ZeroLengthState) +{ + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be zero length. + StreamingLexer lexer(Transition::To(TestState::ONE, 0), + Transition::TerminateFailure()); + + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthStates); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStatesAtEnd) +{ + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to consume the full input. + StreamingLexer lexer(Transition::To(TestState::ONE, 9), + Transition::TerminateFailure()); + + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthStatesAtEnd); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateWithYield) +{ + // Create a special StreamingLexer for this test because we want the first + // state to be zero length. + StreamingLexer lexer(Transition::To(TestState::ONE, 0), + Transition::TerminateFailure()); + + mSourceBuffer->Append(mData, 3); + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = lexer.Lex(mIterator, mCountResumes, DoLexWithZeroLengthYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + + mSourceBuffer->Append(mData + 3, sizeof(mData) - 3); + mSourceBuffer->Complete(NS_OK); + result = lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateWithUnbuffered) +{ + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be both zero length and unbuffered. + StreamingLexer lexer(Transition::ToUnbuffered(TestState::ONE, + TestState::UNBUFFERED, + 0), + Transition::TerminateFailure()); + + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthStatesUnbuffered); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateAfterUnbuffered) +{ + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be zero length. + StreamingLexer lexer(Transition::To(TestState::ONE, 0), + Transition::TerminateFailure()); + + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthStatesAfterUnbuffered); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateWithUnbufferedYield) +{ + size_t unbufferedCallCount = 0; + auto lexerFunc = [&](TestState aState, const char* aData, size_t aLength) + -> LexerTransition { + switch (aState) { + case TestState::ONE: + EXPECT_EQ(0u, aLength); + return Transition::TerminateSuccess(); + + case TestState::UNBUFFERED: + switch (unbufferedCallCount) { + case 0: + CheckLexedData(aData, aLength, 0, 3); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 0 bytes. + return Transition::ContinueUnbufferedAfterYield(TestState::UNBUFFERED, 0); + + case 1: + CheckLexedData(aData, aLength, 0, 3); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 2 bytes. + return Transition::ContinueUnbufferedAfterYield(TestState::UNBUFFERED, 2); + + case 2: + EXPECT_EQ(1u, aLength); + CheckLexedData(aData, aLength, 2, 1); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 1 bytes. + return Transition::ContinueUnbufferedAfterYield(TestState::UNBUFFERED, 1); + + case 3: + CheckLexedData(aData, aLength, 3, 6); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 6 bytes. + // We should transition to TestState::ONE when we return from the + // yield. + return Transition::ContinueUnbufferedAfterYield(TestState::UNBUFFERED, 6); + } + + ADD_FAILURE() << "Too many invocations of TestState::UNBUFFERED"; + return Transition::TerminateFailure(); + + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } + }; + + // Create a special StreamingLexer for this test because we want the first + // state to be unbuffered. + StreamingLexer lexer(Transition::ToUnbuffered(TestState::ONE, + TestState::UNBUFFERED, + sizeof(mData)), + Transition::TerminateFailure()); + + mSourceBuffer->Append(mData, 3); + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(1u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(2u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(3u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mCountResumes, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + EXPECT_EQ(3u, unbufferedCallCount); + + mSourceBuffer->Append(mData + 3, 6); + mSourceBuffer->Complete(NS_OK); + EXPECT_EQ(1u, mCountResumes->Count()); + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(4u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, TerminateSuccess) +{ + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Test that Terminate is "sticky". + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + LexerResult result = + mLexer.Lex(iterator, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(aState == TestState::ONE); + return Transition::TerminateSuccess(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + + SourceBufferIterator iterator2 = mSourceBuffer->Iterator(); + result = + mLexer.Lex(iterator2, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(false); // Shouldn't get here. + return Transition::TerminateFailure(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, TerminateFailure) +{ + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Test that Terminate is "sticky". + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + LexerResult result = + mLexer.Lex(iterator, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(aState == TestState::ONE); + return Transition::TerminateFailure(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); + + SourceBufferIterator iterator2 = mSourceBuffer->Iterator(); + result = + mLexer.Lex(iterator2, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(false); // Shouldn't get here. + return Transition::TerminateFailure(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, TerminateUnbuffered) +{ + // Test that Terminate works during an unbuffered read. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = + mLexer.Lex(mIterator, mCountResumes, DoLexWithUnbufferedTerminate); + + if (i > 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + // We expect 3 resumes because TestState::ONE consumes 3 bytes and then + // transitions to TestState::UNBUFFERED, which calls TerminateSuccess() as + // soon as it receives a single byte. That's four bytes total, which are + // delivered one at a time, requiring 3 resumes. + EXPECT_EQ(3u, mCountResumes->Count()); + + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, TerminateAfterYield) +{ + // Test that Terminate works after yielding. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = + mLexer.Lex(mIterator, mCountResumes, DoLexWithTerminateAfterYield); + + if (i > 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else if (i == 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + // We expect 2 resumes because TestState::ONE consumes 3 bytes and then + // yields. When the lexer resumes at TestState::TWO, which receives the same 3 + // bytes, TerminateSuccess() gets called immediately. That's three bytes + // total, which are delivered one at a time, requiring 2 resumes. + EXPECT_EQ(2u, mCountResumes->Count()); + + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, SourceBufferImmediateComplete) +{ + // Test calling SourceBuffer::Complete() without appending any data. This + // causes the SourceBuffer to automatically have a failing completion status, + // no matter what you pass, so we expect TerminalState::FAILURE below. + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLex); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedTerminalStateSuccess) +{ + // Test that using a terminal state (in this case TerminalState::SUCCESS) as a + // truncated state works. + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::TerminateSuccess()); + + CheckTruncatedState(lexer, TerminalState::SUCCESS); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedTerminalStateFailure) +{ + // Test that using a terminal state (in this case TerminalState::FAILURE) as a + // truncated state works. + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::TerminateFailure()); + + CheckTruncatedState(lexer, TerminalState::FAILURE); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedStateReturningSuccess) +{ + // Test that a truncated state that returns TerminalState::SUCCESS works. When + // |lexer| discovers that the data is truncated, it invokes the + // TRUNCATED_SUCCESS state, which returns TerminalState::SUCCESS. + // CheckTruncatedState() verifies that this happens. + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::To(TestState::TRUNCATED_SUCCESS, 0)); + + CheckTruncatedState(lexer, TerminalState::SUCCESS); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedStateReturningFailure) +{ + // Test that a truncated state that returns TerminalState::FAILURE works. When + // |lexer| discovers that the data is truncated, it invokes the + // TRUNCATED_FAILURE state, which returns TerminalState::FAILURE. + // CheckTruncatedState() verifies that this happens. + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::To(TestState::TRUNCATED_FAILURE, 0)); + + CheckTruncatedState(lexer, TerminalState::FAILURE); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedFailingCompleteStatus) +{ + // Test that calling SourceBuffer::Complete() with a failing status results in + // an immediate TerminalState::FAILURE result. (Note that |lexer|'s truncated + // state is TerminalState::SUCCESS, so if we ignore the failing status, the + // test will fail.) + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::TerminateSuccess()); + + CheckTruncatedState(lexer, TerminalState::FAILURE, NS_ERROR_FAILURE); +} + +TEST_F(ImageStreamingLexer, NoSourceBufferResumable) +{ + // Test delivering in one byte chunks with no IResumable. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex(mIterator, nullptr, DoLex); + + if (i == 8) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + mSourceBuffer->Complete(NS_OK); +} diff --git a/image/test/gtest/TestSurfacePipeIntegration.cpp b/image/test/gtest/TestSurfacePipeIntegration.cpp new file mode 100644 index 000000000..5e8c19fc2 --- /dev/null +++ b/image/test/gtest/TestSurfacePipeIntegration.cpp @@ -0,0 +1,508 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +namespace mozilla { +namespace image { + +class TestSurfacePipeFactory +{ +public: + static SurfacePipe SimpleSurfacePipe() + { + SurfacePipe pipe; + return Move(pipe); + } + + template + static SurfacePipe SurfacePipeFromPipeline(T&& aPipeline) + { + return SurfacePipe { Move(aPipeline) }; + } + +private: + TestSurfacePipeFactory() { } +}; + +} // namespace image +} // namespace mozilla + +void +CheckSurfacePipeMethodResults(SurfacePipe* aPipe, + Decoder* aDecoder, + const IntRect& aRect = IntRect(0, 0, 100, 100)) +{ + // Check that the pipeline ended up in the state we expect. Note that we're + // explicitly testing the SurfacePipe versions of these methods, so we don't + // want to use AssertCorrectPipelineFinalState() here. + EXPECT_TRUE(aPipe->IsSurfaceFinished()); + Maybe invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mOutputSpaceRect); + + // Check the generated image. + CheckGeneratedImage(aDecoder, aRect); + + // Reset and clear the image before the next test. + aPipe->ResetToFirstRow(); + EXPECT_FALSE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + uint32_t count = 0; + auto result = aPipe->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Transparent().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + EXPECT_TRUE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mOutputSpaceRect); + + aPipe->ResetToFirstRow(); + EXPECT_FALSE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); +} + +void +CheckPalettedSurfacePipeMethodResults(SurfacePipe* aPipe, + Decoder* aDecoder, + const IntRect& aRect + = IntRect(0, 0, 100, 100)) +{ + // Check that the pipeline ended up in the state we expect. Note that we're + // explicitly testing the SurfacePipe versions of these methods, so we don't + // want to use AssertCorrectPipelineFinalState() here. + EXPECT_TRUE(aPipe->IsSurfaceFinished()); + Maybe invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mOutputSpaceRect); + + // Check the generated image. + CheckGeneratedPalettedImage(aDecoder, aRect); + + // Reset and clear the image before the next test. + aPipe->ResetToFirstRow(); + EXPECT_FALSE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + uint32_t count = 0; + auto result = aPipe->WritePixels([&]() { + ++count; + return AsVariant(uint8_t(0)); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + EXPECT_TRUE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 0, 100, 100), invalidRect->mOutputSpaceRect); + + aPipe->ResetToFirstRow(); + EXPECT_FALSE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); +} + +class ImageSurfacePipeIntegration : public ::testing::Test +{ +protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageSurfacePipeIntegration, SurfacePipe) +{ + // Test that SurfacePipe objects can be initialized and move constructed. + SurfacePipe pipe = TestSurfacePipeFactory::SimpleSurfacePipe(); + + // Test that SurfacePipe objects can be move assigned. + pipe = TestSurfacePipeFactory::SimpleSurfacePipe(); + + // Test that SurfacePipe objects can be initialized with a pipeline. + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto sink = MakeUnique(); + nsresult rv = + sink->Configure(SurfaceConfig { decoder, 0, IntSize(100, 100), + SurfaceFormat::B8G8R8A8, false }); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + pipe = TestSurfacePipeFactory::SurfacePipeFromPipeline(sink); + + // Test that WritePixels() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + auto result = pipe.WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Create a buffer the same size as one row of the surface, containing all + // green pixels. We'll use this for the WriteBuffer() tests. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Test that WriteBuffer() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteBuffer(buffer); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that the 3 argument version of WriteBuffer() gets passed through to + // the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteBuffer(buffer, 0, 100); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that WriteEmptyRow() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteEmptyRow(); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder, IntRect(0, 0, 0, 0)); + } + + // Mark the frame as finished so we don't get an assertion. + RawAccessFrameRef currentFrame = decoder->GetCurrentFrameRef(); + currentFrame->Finish(); +} + +TEST_F(ImageSurfacePipeIntegration, PalettedSurfacePipe) +{ + // Create a SurfacePipe containing a PalettedSurfaceSink. + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto sink = MakeUnique(); + nsresult rv = + sink->Configure(PalettedSurfaceConfig { decoder, 0, IntSize(100, 100), + IntRect(0, 0, 100, 100), + SurfaceFormat::B8G8R8A8, + 8, false }); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + SurfacePipe pipe = TestSurfacePipeFactory::SurfacePipeFromPipeline(sink); + + // Test that WritePixels() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + auto result = pipe.WritePixels([&]() { + ++count; + return AsVariant(uint8_t(255)); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + CheckPalettedSurfacePipeMethodResults(&pipe, decoder); + } + + // Create a buffer the same size as one row of the surface, containing all + // 255 pixels. We'll use this for the WriteBuffer() tests. + uint8_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 255; + } + + // Test that WriteBuffer() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteBuffer(buffer); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckPalettedSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that the 3 argument version of WriteBuffer() gets passed through to + // the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteBuffer(buffer, 0, 100); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckPalettedSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that WriteEmptyRow() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteEmptyRow(); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckPalettedSurfacePipeMethodResults(&pipe, decoder, IntRect(0, 0, 0, 0)); + } + + // Mark the frame as finished so we don't get an assertion. + RawAccessFrameRef currentFrame = decoder->GetCurrentFrameRef(); + currentFrame->Finish(); +} + +TEST_F(ImageSurfacePipeIntegration, DeinterlaceDownscaleWritePixels) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto test = [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 25, 25))); + }; + + WithFilterPipeline(decoder, test, + DeinterlacingConfig { /* mProgressiveDisplay = */ true }, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, IntSize(25, 25), + SurfaceFormat::B8G8R8A8, false }); +} + +TEST_F(ImageSurfacePipeIntegration, RemoveFrameRectBottomRightDownscaleWritePixels) +{ + // This test case uses a frame rect that extends beyond the borders of the + // image to the bottom and to the right. It looks roughly like this (with the + // box made of '#'s representing the frame rect): + // + // +------------+ + // + + + // + +------------+ + // + +############+ + // +------+############+ + // +############+ + // +------------+ + + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // Note that aInputWriteRect is 100x50 because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows unfortunately + // can't be ignored.) So the action of the pipeline is as follows: + // + // (1) RemoveFrameRectFilter reads a 100x50 region of the input. + // (aInputWriteRect captures this fact.) The remaining 50 rows are ignored + // because they extend off the bottom of the image due to the frame rect's + // (50, 50) offset. The 50 columns on the right also don't end up in the + // output, so ultimately only a 50x50 region in the output contains data + // from the input. The filter's output is not 50x50, though, but 100x100, + // because what RemoveFrameRectFilter does is introduce blank rows or + // columns as necessary to transform an image that needs a frame rect into + // an image that doesn't. + // + // (2) DownscalingFilter reads the output of RemoveFrameRectFilter (100x100) + // and downscales it to 20x20. + // + // (3) The surface owned by SurfaceSink logically has only a 10x10 region + // region in it that's non-blank; this is the downscaled version of the + // 50x50 region discussed in (1). (aOutputWriteRect captures this fact.) + // Some fuzz, as usual, is necessary when dealing with Lanczos downscaling. + + auto test = [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 20, 20)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(50, 50, 100, 50)), + /* aOutputWriteRect = */ Some(IntRect(10, 10, 10, 10)), + /* aFuzz = */ 0x33); + }; + + WithFilterPipeline(decoder, test, + RemoveFrameRectConfig { IntRect(50, 50, 100, 100) }, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, IntSize(20, 20), + SurfaceFormat::B8G8R8A8, false }); +} + +TEST_F(ImageSurfacePipeIntegration, RemoveFrameRectTopLeftDownscaleWritePixels) +{ + // This test case uses a frame rect that extends beyond the borders of the + // image to the top and to the left. It looks roughly like this (with the + // box made of '#'s representing the frame rect): + // + // +------------+ + // +############+ + // +############+------+ + // +############+ + + // +------------+ + + // + + + // +------------+ + + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto test = [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 20, 20)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 10, 10)), + /* aFuzz = */ 0x21); + }; + + WithFilterPipeline(decoder, test, + RemoveFrameRectConfig { IntRect(-50, -50, 100, 100) }, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, IntSize(20, 20), + SurfaceFormat::B8G8R8A8, false }); +} + +TEST_F(ImageSurfacePipeIntegration, DeinterlaceRemoveFrameRectWritePixels) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // Note that aInputRect is the full 100x100 size even though + // RemoveFrameRectFilter is part of this pipeline, because deinterlacing + // requires reading every row. + + auto test = [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(50, 50, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(50, 50, 50, 50))); + }; + + WithFilterPipeline(decoder, test, + DeinterlacingConfig { /* mProgressiveDisplay = */ true }, + RemoveFrameRectConfig { IntRect(50, 50, 100, 100) }, + SurfaceConfig { decoder, 0, IntSize(100, 100), + SurfaceFormat::B8G8R8A8, false }); +} + +TEST_F(ImageSurfacePipeIntegration, DeinterlaceRemoveFrameRectDownscaleWritePixels) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto test = [](Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 20, 20)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(50, 50, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(10, 10, 10, 10)), + /* aFuzz = */ 33); + }; + + WithFilterPipeline(decoder, test, + DeinterlacingConfig { /* mProgressiveDisplay = */ true }, + RemoveFrameRectConfig { IntRect(50, 50, 100, 100) }, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, IntSize(20, 20), + SurfaceFormat::B8G8R8A8, false }); +} + +TEST_F(ImageSurfacePipeIntegration, ConfiguringPalettedRemoveFrameRectDownscaleFails) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // This is an invalid pipeline for paletted images, so configuration should + // fail. + AssertConfiguringPipelineFails(decoder, + RemoveFrameRectConfig { IntRect(0, 0, 50, 50) }, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + PalettedSurfaceConfig { decoder, 0, IntSize(100, 100), + IntRect(0, 0, 50, 50), + SurfaceFormat::B8G8R8A8, 8, + false }); +} + +TEST_F(ImageSurfacePipeIntegration, ConfiguringPalettedDeinterlaceDownscaleFails) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // This is an invalid pipeline for paletted images, so configuration should + // fail. + AssertConfiguringPipelineFails(decoder, + DeinterlacingConfig { /* mProgressiveDisplay = */ true}, + DownscalingConfig { IntSize(100, 100), + SurfaceFormat::B8G8R8A8 }, + PalettedSurfaceConfig { decoder, 0, IntSize(100, 100), + IntRect(0, 0, 20, 20), + SurfaceFormat::B8G8R8A8, 8, + false }); +} + +TEST_F(ImageSurfacePipeIntegration, ConfiguringHugeDeinterlacingBufferFails) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // When DownscalingFilter is used, we may succeed in allocating an output + // surface for huge images, because we only need to store the scaled-down + // version of the image. However, regardless of downscaling, + // DeinterlacingFilter needs to allocate a buffer as large as the size of the + // input. This can cause OOMs on operating systems that allow overcommit. This + // test makes sure that we reject such allocations. + AssertConfiguringPipelineFails(decoder, + DeinterlacingConfig { /* mProgressiveDisplay = */ true}, + DownscalingConfig { IntSize(60000, 60000), + SurfaceFormat::B8G8R8A8 }, + SurfaceConfig { decoder, 0, IntSize(600, 600), + SurfaceFormat::B8G8R8A8, false }); +} diff --git a/image/test/gtest/TestSurfaceSink.cpp b/image/test/gtest/TestSurfaceSink.cpp new file mode 100644 index 000000000..ccf9be3ec --- /dev/null +++ b/image/test/gtest/TestSurfaceSink.cpp @@ -0,0 +1,1491 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +enum class Orient +{ + NORMAL, + FLIP_VERTICALLY +}; + +template void +WithSurfaceSink(Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + const bool flipVertically = Orientation == Orient::FLIP_VERTICALLY; + + WithFilterPipeline(decoder, Forward(aFunc), + SurfaceConfig { decoder, 0, IntSize(100, 100), + SurfaceFormat::B8G8R8A8, flipVertically }); +} + +template void +WithPalettedSurfaceSink(const IntRect& aFrameRect, Func aFunc) +{ + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline(decoder, Forward(aFunc), + PalettedSurfaceConfig { decoder, 0, IntSize(100, 100), + aFrameRect, SurfaceFormat::B8G8R8A8, + 8, false }); +} + +void +ResetForNextPass(SurfaceFilter* aSink) +{ + aSink->ResetToFirstRow(); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); +} + +template void +DoCheckIterativeWrite(SurfaceFilter* aSink, + WriteFunc aWriteFunc, + CheckFunc aCheckFunc) +{ + // Write the buffer to successive rows until every row of the surface + // has been written. + uint32_t row = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = aWriteFunc(row); + ++row; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, row); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + aCheckFunc(); +} + +template void +CheckIterativeWrite(Decoder* aDecoder, + SurfaceSink* aSink, + const IntRect& aOutputRect, + WriteFunc aWriteFunc) +{ + // Ignore the row passed to WriteFunc, since no callers use it. + auto writeFunc = [&](uint32_t) { + return aWriteFunc(); + }; + + DoCheckIterativeWrite(aSink, writeFunc, [&]{ + CheckGeneratedImage(aDecoder, aOutputRect); + }); +} + +template void +CheckPalettedIterativeWrite(Decoder* aDecoder, + PalettedSurfaceSink* aSink, + const IntRect& aOutputRect, + WriteFunc aWriteFunc) +{ + // Ignore the row passed to WriteFunc, since no callers use it. + auto writeFunc = [&](uint32_t) { + return aWriteFunc(); + }; + + DoCheckIterativeWrite(aSink, writeFunc, [&]{ + CheckGeneratedPalettedImage(aDecoder, aOutputRect); + }); +} + +TEST(ImageSurfaceSink, NullSurfaceSink) +{ + // Create the NullSurfaceSink. + NullSurfaceSink sink; + nsresult rv = sink.Configure(NullSurfaceConfig { }); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + EXPECT_TRUE(!sink.IsValidPalettedPipe()); + + // Ensure that we can't write anything. + bool gotCalled = false; + auto result = sink.WritePixels([&]() { + gotCalled = true; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_FALSE(gotCalled); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(sink.IsSurfaceFinished()); + Maybe invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + uint32_t source = BGRAColor::Red().AsPixel(); + result = sink.WriteBuffer(&source); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(sink.IsSurfaceFinished()); + invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + result = sink.WriteBuffer(&source, 0, 1); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(sink.IsSurfaceFinished()); + invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + result = sink.WriteEmptyRow(); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(sink.IsSurfaceFinished()); + invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + result = sink.WriteUnsafeComputedRow([&](uint32_t* aRow, + uint32_t aLength) { + gotCalled = true; + for (uint32_t col = 0; col < aLength; ++col, ++aRow) { + *aRow = BGRAColor::Red().AsPixel(); + } + }); + EXPECT_FALSE(gotCalled); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(sink.IsSurfaceFinished()); + invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Attempt to advance to the next row and make sure nothing changes. + sink.AdvanceRow(); + EXPECT_TRUE(sink.IsSurfaceFinished()); + invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Attempt to advance to the next pass and make sure nothing changes. + sink.ResetToFirstRow(); + EXPECT_TRUE(sink.IsSurfaceFinished()); + invalidRect = sink.TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); +} + +TEST(ImageSurfaceSink, SurfaceSinkInitialization) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Check initial state. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the surface is zero-initialized. We verify this by calling + // CheckGeneratedImage() and telling it that we didn't write to the surface + // anyway (i.e., we wrote to the empty rect); it will then expect the entire + // surface to be transparent, which is what it should be if it was + // zero-initialied. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 0, 0)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixels) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + CheckWritePixels(aDecoder, aSink); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsFinish) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Write nothing into the surface; just finish immediately. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + count++; + return AsVariant(WriteState::FINISHED); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(1u, count); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixels([&]() { + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Transparent())); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsEarlyExit) +{ + auto checkEarlyExit = + [](Decoder* aDecoder, SurfaceSink* aSink, WriteState aState) { + // Write half a row of green pixels and then exit early with |aState|. If + // the lambda keeps getting called, we'll write red pixels, which will cause + // the test to fail. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(aState); + } + return count++ < 50 ? AsVariant(BGRAColor::Green().AsPixel()) + : AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(aState, result); + EXPECT_EQ(50u, count); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + + if (aState != WriteState::FINISHED) { + // We should still be able to write more at this point. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Verify that we can resume writing. We'll finish up the same row. + count = 0; + result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 1)); + + return; + } + + // We should've finished the surface at this point. + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixels([&]{ + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + }; + + WithSurfaceSink([&](Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); + }); + + WithSurfaceSink([&](Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); + }); + + WithSurfaceSink([&](Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsToRow) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Write the first 99 rows of our 100x100 surface and verify that even + // though our lambda will yield pixels forever, only one row is written per + // call to WritePixelsToRow(). + for (int row = 0; row < 99; ++row) { + uint32_t count = 0; + WriteState result = aSink->WritePixelsToRow([&]{ + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); + + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, row + 1)); + } + + // Write the final line, which should finish the surface. + uint32_t count = 0; + WriteState result = aSink->WritePixelsToRow([&]{ + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + + // Note that the final invalid rect we expect here is only the last row; + // that's because we called TakeInvalidRect() repeatedly in the loop above. + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 99, 100, 1), + IntRect(0, 99, 100, 1)); + + // Check that the generated image is correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelsToRow([&]{ + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 100)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsToRowEarlyExit) +{ + auto checkEarlyExit = + [](Decoder* aDecoder, SurfaceSink* aSink, WriteState aState) { + // Write half a row of green pixels and then exit early with |aState|. If + // the lambda keeps getting called, we'll write red pixels, which will cause + // the test to fail. + uint32_t count = 0; + auto result = aSink->WritePixelsToRow([&]() -> NextPixel { + if (count == 50) { + return AsVariant(aState); + } + return count++ < 50 ? AsVariant(BGRAColor::Green().AsPixel()) + : AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(aState, result); + EXPECT_EQ(50u, count); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + + if (aState != WriteState::FINISHED) { + // We should still be able to write more at this point. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Verify that we can resume the same row and still stop at the end. + count = 0; + WriteState result = aSink->WritePixelsToRow([&]{ + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 1)); + + return; + } + + // We should've finished the surface at this point. + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelsToRow([&]{ + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + }; + + WithSurfaceSink([&](Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); + }); + + WithSurfaceSink([&](Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); + }); + + WithSurfaceSink([&](Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBuffer) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Create a green buffer the same size as one row of the surface (which is 100x100), + // containing 60 pixels of green in the middle and 20 transparent pixels on + // either side. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 20 <= i && i < 80 ? BGRAColor::Green().AsPixel() + : BGRAColor::Transparent().AsPixel(); + } + + // Write the buffer to every row of the surface and check that the generated + // image is correct. + CheckIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ + return aSink->WriteBuffer(buffer); + }); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRow) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface, containing all + // green pixels. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Write the buffer to the middle 60 pixels of every row of the surface and + // check that the generated image is correct. + CheckIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ + return aSink->WriteBuffer(buffer, 20, 60); + }); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRowStartColOverflow) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface, containing all + // green pixels. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + { + // Write the buffer to successive rows until every row of the surface + // has been written. We place the start column beyond the end of the row, + // which will prevent us from writing anything, so we check that the + // generated image is entirely transparent. + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ + return aSink->WriteBuffer(buffer, 100, 100); + }); + } + + ResetForNextPass(aSink); + + { + // Write the buffer to successive rows until every row of the surface + // has been written. We use column 50 as the start column, but we still + // write the buffer, which means we overflow the right edge of the surface + // by 50 pixels. We check that the left half of the generated image is + // transparent and the right half is green. + CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ + return aSink->WriteBuffer(buffer, 50, 100); + }); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRowBufferOverflow) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Create a buffer twice as large as a row of the surface. The first half + // (which is as large as a row of the image) will contain green pixels, + // while the second half will contain red pixels. + uint32_t buffer[200]; + for (int i = 0; i < 200; ++i) { + buffer[i] = i < 100 ? BGRAColor::Green().AsPixel() + : BGRAColor::Red().AsPixel(); + } + + { + // Write the buffer to successive rows until every row of the surface has + // been written. The buffer extends 100 pixels to the right of a row of + // the surface, but bounds checking will prevent us from overflowing the + // buffer. We check that the generated image is entirely green since the + // pixels on the right side of the buffer shouldn't have been written to + // the surface. + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 100, 100), [&]{ + return aSink->WriteBuffer(buffer, 0, 200); + }); + } + + ResetForNextPass(aSink); + + { + // Write from the buffer to the middle of each row of the surface. That + // means that the left side of each row should be transparent, since we + // didn't write anything there. A buffer overflow would cause us to write + // buffer contents into the left side of each row. We check that the + // generated image is transparent on the left side and green on the right. + CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ + return aSink->WriteBuffer(buffer, 50, 200); + }); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferFromNullSource) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Calling WriteBuffer() with a null pointer should fail without making any + // changes to the surface. + uint32_t* nullBuffer = nullptr; + WriteState result = aSink->WriteBuffer(nullBuffer); + + EXPECT_EQ(WriteState::FAILURE, result); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that nothing got written to the surface. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 0, 0)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteEmptyRow) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + { + // Write an empty row to each row of the surface. We check that the + // generated image is entirely transparent. + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ + return aSink->WriteEmptyRow(); + }); + } + + ResetForNextPass(aSink); + + { + // Write a partial row before we begin calling WriteEmptyRow(). We check + // that the generated image is entirely transparent, which is to be + // expected since WriteEmptyRow() overwrites the current row even if some + // data has already been written to it. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ + return aSink->WriteEmptyRow(); + }); + } + + ResetForNextPass(aSink); + + { + // Create a buffer the same size as one row of the surface, containing all + // green pixels. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Write an empty row to the middle 60 rows of the surface. The first 20 + // and last 20 rows will be green. (We need to use DoCheckIterativeWrite() + // here because we need a custom function to check the output, since it + // can't be described by a simple rect.) + auto writeFunc = [&](uint32_t aRow) { + if (aRow < 20 || aRow >= 80) { + return aSink->WriteBuffer(buffer); + } else { + return aSink->WriteEmptyRow(); + } + }; + + auto checkFunc = [&]{ + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 20, BGRAColor::Green())); + EXPECT_TRUE(RowsAreSolidColor(surface, 20, 60, BGRAColor::Transparent())); + EXPECT_TRUE(RowsAreSolidColor(surface, 80, 20, BGRAColor::Green())); + }; + + DoCheckIterativeWrite(aSink, writeFunc, checkFunc); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteUnsafeComputedRow) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + // Create a green buffer the same size as one row of the surface. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Write the buffer to successive rows until every row of the surface + // has been written. We only write to the right half of each row, so we + // check that the left side of the generated image is transparent and the + // right side is green. + CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ + return aSink->WriteUnsafeComputedRow([&](uint32_t* aRow, + uint32_t aLength) { + EXPECT_EQ(100u, aLength ); + memcpy(aRow + 50, buffer, 50 * sizeof(uint32_t)); + }); + }); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkProgressivePasses) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + { + // Fill the image with a first pass of red. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + ResetForNextPass(aSink); + + // Check that the generated image is still the first pass image. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + // Fill the image with a second pass of green. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkInvalidRect) +{ + WithSurfaceSink([](Decoder* aDecoder, SurfaceSink* aSink) { + { + // Write one row. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 100) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 0, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 0, 100, 1), invalidRect->mOutputSpaceRect); + } + + { + // Write eight rows. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 100 * 8) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u * 8u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 1, 100, 8), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 1, 100, 8), invalidRect->mOutputSpaceRect); + } + + { + // Write the left half of one row. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we don't have an invalid rect, since the invalid rect only + // gets updated when a row gets completed. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + } + + { + // Write the right half of the same row. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect, which will include both the + // left and right halves of this row now that we've completed it. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 9, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 9, 100, 1), invalidRect->mOutputSpaceRect); + } + + { + // Write no rows. + auto result = aSink->WritePixels([&]() { + return AsVariant(WriteState::NEED_MORE_DATA); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we don't have an invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + } + + { + // Fill the rest of the image. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 90u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 10, 100, 90), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 10, 100, 90), invalidRect->mOutputSpaceRect); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkFlipVertically) +{ + WithSurfaceSink([](Decoder* aDecoder, + SurfaceSink* aSink) { + { + // Fill the image with a first pass of red. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + ResetForNextPass(aSink); + + // Check that the generated image is still the first pass image. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + // Fill 25 rows of the image with green and make sure everything is OK. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 25 * 100) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(25u * 100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect, which should include the + // *bottom* (since we're flipping vertically) 25 rows of the image. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, 75, 100, 25), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, 75, 100, 25), invalidRect->mOutputSpaceRect); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 75, BGRAColor::Red())); + EXPECT_TRUE(RowsAreSolidColor(surface, 75, 25, BGRAColor::Green())); + } + + { + // Fill the rest of the image with a second pass of green. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(75u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 75), + IntRect(0, 0, 100, 75)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); + } + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkInitialization) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Check initial state. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the paletted image data is zero-initialized. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + uint8_t* imageData = nullptr; + uint32_t imageLength = 0; + currentFrame->GetImageData(&imageData, &imageLength); + ASSERT_TRUE(imageData != nullptr); + ASSERT_EQ(100u * 100u, imageLength); + for (uint32_t i = 0; i < imageLength; ++i) { + ASSERT_EQ(uint8_t(0), imageData[i]); + } + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor0_0_100_100) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + CheckPalettedWritePixels(aDecoder, aSink); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor25_25_50_50) +{ + WithPalettedSurfaceSink(IntRect(25, 25, 50, 50), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + CheckPalettedWritePixels(aDecoder, aSink, + /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputWriteRect = */ Some(IntRect(25, 25, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(25, 25, 50, 50))); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsForMinus25_Minus25_50_50) +{ + WithPalettedSurfaceSink(IntRect(-25, -25, 50, 50), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + CheckPalettedWritePixels(aDecoder, aSink, + /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputWriteRect = */ Some(IntRect(-25, -25, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(-25, -25, 50, 50))); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor75_Minus25_50_50) +{ + WithPalettedSurfaceSink(IntRect(75, -25, 50, 50), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + CheckPalettedWritePixels(aDecoder, aSink, + /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputWriteRect = */ Some(IntRect(75, -25, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(75, -25, 50, 50))); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsForMinus25_75_50_50) +{ + WithPalettedSurfaceSink(IntRect(-25, 75, 50, 50), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + CheckPalettedWritePixels(aDecoder, aSink, + /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputWriteRect = */ Some(IntRect(-25, 75, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(-25, 75, 50, 50))); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor75_75_50_50) +{ + WithPalettedSurfaceSink(IntRect(75, 75, 50, 50), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + CheckPalettedWritePixels(aDecoder, aSink, + /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), + /* aInputWriteRect = */ Some(IntRect(75, 75, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(75, 75, 50, 50))); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFinish) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Write nothing into the surface; just finish immediately. + uint32_t count = 0; + auto result = aSink->WritePixels([&]{ + count++; + return AsVariant(WriteState::FINISHED); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(1u, count); + + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixels([&]() { + count++; + return AsVariant(uint8_t(128)); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is correct. + EXPECT_TRUE(IsSolidPalettedColor(aDecoder, 0)); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsEarlyExit) +{ + auto checkEarlyExit = + [](Decoder* aDecoder, PalettedSurfaceSink* aSink, WriteState aState) { + // Write half a row of green pixels and then exit early with |aState|. If + // the lambda keeps getting called, we'll write red pixels, which will cause + // the test to fail. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(aState); + } + return count++ < 50 ? AsVariant(uint8_t(255)) : AsVariant(uint8_t(128)); + }); + + EXPECT_EQ(aState, result); + EXPECT_EQ(50u, count); + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); + + if (aState != WriteState::FINISHED) { + // We should still be able to write more at this point. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Verify that we can resume writing. We'll finish up the same row. + count = 0; + result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + ++count; + return AsVariant(uint8_t(255)); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 1)); + + return; + } + + // We should've finished the surface at this point. + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixels([&]{ + count++; + return AsVariant(uint8_t(128)); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); + }; + + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); + }); + + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); + }); + + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsToRow) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Write the first 99 rows of our 100x100 surface and verify that even + // though our lambda will yield pixels forever, only one row is written per + // call to WritePixelsToRow(). + for (int row = 0; row < 99; ++row) { + uint32_t count = 0; + WriteState result = aSink->WritePixelsToRow([&]{ + ++count; + return AsVariant(uint8_t(255)); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); + + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, row + 1)); + } + + // Write the final line, which should finish the surface. + uint32_t count = 0; + WriteState result = aSink->WritePixelsToRow([&]{ + ++count; + return AsVariant(uint8_t(255)); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + + // Note that the final invalid rect we expect here is only the last row; + // that's because we called TakeInvalidRect() repeatedly in the loop above. + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 99, 100, 1), + IntRect(0, 99, 100, 1)); + + // Check that the generated image is correct. + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelsToRow([&]{ + count++; + return AsVariant(uint8_t(128)); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 100)); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsToRowEarlyExit) +{ + auto checkEarlyExit = + [](Decoder* aDecoder, PalettedSurfaceSink* aSink, WriteState aState) { + // Write half a row of 255s and then exit early with |aState|. If the lambda + // keeps getting called, we'll write 128s, which will cause the test to + // fail. + uint32_t count = 0; + auto result = aSink->WritePixelsToRow([&]() -> NextPixel { + if (count == 50) { + return AsVariant(aState); + } + return count++ < 50 ? AsVariant(uint8_t(255)) + : AsVariant(uint8_t(128)); + }); + + EXPECT_EQ(aState, result); + EXPECT_EQ(50u, count); + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); + + if (aState != WriteState::FINISHED) { + // We should still be able to write more at this point. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Verify that we can resume the same row and still stop at the end. + count = 0; + WriteState result = aSink->WritePixelsToRow([&]{ + ++count; + return AsVariant(uint8_t(255)); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 1)); + + return; + } + + // We should've finished the surface at this point. + AssertCorrectPipelineFinalState(aSink, + IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelsToRow([&]{ + count++; + return AsVariant(uint8_t(128)); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); + }; + + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); + }); + + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); + }); + + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBuffer) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface (which is 100x100), + // containing 60 pixels of 255 in the middle and 20 transparent pixels of 0 on + // either side. + uint8_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 20 <= i && i < 80 ? 255 : 0; + } + + // Write the buffer to every row of the surface and check that the generated + // image is correct. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ + return aSink->WriteBuffer(buffer); + }); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferPartialRow) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface, containing all + // 255 pixels. + uint8_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 255; + } + + // Write the buffer to the middle 60 pixels of every row of the surface and + // check that the generated image is correct. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ + return aSink->WriteBuffer(buffer, 20, 60); + }); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface, containing all + // 255 pixels. + uint8_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 255; + } + + { + // Write the buffer to successive rows until every row of the surface + // has been written. We place the start column beyond the end of the row, + // which will prevent us from writing anything, so we check that the + // generated image is entirely 0. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ + return aSink->WriteBuffer(buffer, 100, 100); + }); + } + + ResetForNextPass(aSink); + + { + // Write the buffer to successive rows until every row of the surface + // has been written. We use column 50 as the start column, but we still + // write the buffer, which means we overflow the right edge of the surface + // by 50 pixels. We check that the left half of the generated image is + // 0 and the right half is 255. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ + return aSink->WriteBuffer(buffer, 50, 100); + }); + } + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Create a buffer twice as large as a row of the surface. The first half + // (which is as large as a row of the image) will contain 255 pixels, + // while the second half will contain 128 pixels. + uint8_t buffer[200]; + for (int i = 0; i < 200; ++i) { + buffer[i] = i < 100 ? 255 : 128; + } + + { + // Write the buffer to successive rows until every row of the surface has + // been written. The buffer extends 100 pixels to the right of a row of + // the surface, but bounds checking will prevent us from overflowing the + // buffer. We check that the generated image is entirely 255 since the + // pixels on the right side of the buffer shouldn't have been written to + // the surface. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 100, 100), [&]{ + return aSink->WriteBuffer(buffer, 0, 200); + }); + } + + ResetForNextPass(aSink); + + { + // Write from the buffer to the middle of each row of the surface. That + // means that the left side of each row should be 0, since we didn't write + // anything there. A buffer overflow would cause us to write buffer + // contents into the left side of each row. We check that the generated + // image is 0 on the left side and 255 on the right. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ + return aSink->WriteBuffer(buffer, 50, 200); + }); + } + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferFromNullSource) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Calling WriteBuffer() with a null pointer should fail without making any + // changes to the surface. + uint8_t* nullBuffer = nullptr; + WriteState result = aSink->WriteBuffer(nullBuffer); + + EXPECT_EQ(WriteState::FAILURE, result); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that nothing got written to the surface. + CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 0, 0)); + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteEmptyRow) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + { + // Write an empty row to each row of the surface. We check that the + // generated image is entirely 0. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ + return aSink->WriteEmptyRow(); + }); + } + + ResetForNextPass(aSink); + + { + // Write a partial row before we begin calling WriteEmptyRow(). We check + // that the generated image is entirely 0, which is to be expected since + // WriteEmptyRow() overwrites the current row even if some data has + // already been written to it. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + ++count; + return AsVariant(uint8_t(255)); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ + return aSink->WriteEmptyRow(); + }); + } + + ResetForNextPass(aSink); + + { + // Create a buffer the same size as one row of the surface, containing all + // 255 pixels. + uint8_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 255; + } + + // Write an empty row to the middle 60 rows of the surface. The first 20 + // and last 20 rows will be 255. (We need to use DoCheckIterativeWrite() + // here because we need a custom function to check the output, since it + // can't be described by a simple rect.) + auto writeFunc = [&](uint32_t aRow) { + if (aRow < 20 || aRow >= 80) { + return aSink->WriteBuffer(buffer); + } else { + return aSink->WriteEmptyRow(); + } + }; + + auto checkFunc = [&]{ + EXPECT_TRUE(PalettedRowsAreSolidColor(aDecoder, 0, 20, 255)); + EXPECT_TRUE(PalettedRowsAreSolidColor(aDecoder, 20, 60, 0)); + EXPECT_TRUE(PalettedRowsAreSolidColor(aDecoder, 80, 20, 255)); + }; + + DoCheckIterativeWrite(aSink, writeFunc, checkFunc); + } + }); +} + +TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteUnsafeComputedRow) +{ + WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), + [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { + // Create an all-255 buffer the same size as one row of the surface. + uint8_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = 255; + } + + // Write the buffer to successive rows until every row of the surface has + // been written. We only write to the right half of each row, so we check + // that the left side of the generated image is 0 and the right side is 255. + CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ + return aSink->WriteUnsafeComputedRow([&](uint8_t* aRow, + uint32_t aLength) { + EXPECT_EQ(100u, aLength ); + memcpy(aRow + 50, buffer, 50 * sizeof(uint8_t)); + }); + }); + }); +} diff --git a/image/test/gtest/animated-with-extra-image-sub-blocks.gif b/image/test/gtest/animated-with-extra-image-sub-blocks.gif new file mode 100644 index 000000000..a145c814a Binary files /dev/null and b/image/test/gtest/animated-with-extra-image-sub-blocks.gif differ diff --git a/image/test/gtest/corrupt-with-bad-bmp-height.ico b/image/test/gtest/corrupt-with-bad-bmp-height.ico new file mode 100644 index 000000000..ee4a90fcd Binary files /dev/null and b/image/test/gtest/corrupt-with-bad-bmp-height.ico differ diff --git a/image/test/gtest/corrupt-with-bad-bmp-width.ico b/image/test/gtest/corrupt-with-bad-bmp-width.ico new file mode 100644 index 000000000..aa4051cd0 Binary files /dev/null and b/image/test/gtest/corrupt-with-bad-bmp-width.ico differ diff --git a/image/test/gtest/corrupt.jpg b/image/test/gtest/corrupt.jpg new file mode 100644 index 000000000..555a416d7 Binary files /dev/null and b/image/test/gtest/corrupt.jpg differ diff --git a/image/test/gtest/downscaled.bmp b/image/test/gtest/downscaled.bmp new file mode 100644 index 000000000..9e6a29e62 Binary files /dev/null and b/image/test/gtest/downscaled.bmp differ diff --git a/image/test/gtest/downscaled.gif b/image/test/gtest/downscaled.gif new file mode 100644 index 000000000..ff9a20bcd Binary files /dev/null and b/image/test/gtest/downscaled.gif differ diff --git a/image/test/gtest/downscaled.ico b/image/test/gtest/downscaled.ico new file mode 100644 index 000000000..ee112af0a Binary files /dev/null and b/image/test/gtest/downscaled.ico differ diff --git a/image/test/gtest/downscaled.icon b/image/test/gtest/downscaled.icon new file mode 100644 index 000000000..19785f5dc Binary files /dev/null and b/image/test/gtest/downscaled.icon differ diff --git a/image/test/gtest/downscaled.jpg b/image/test/gtest/downscaled.jpg new file mode 100644 index 000000000..5a4b3cd03 Binary files /dev/null and b/image/test/gtest/downscaled.jpg differ diff --git a/image/test/gtest/downscaled.png b/image/test/gtest/downscaled.png new file mode 100644 index 000000000..b71b4652d Binary files /dev/null and b/image/test/gtest/downscaled.png differ diff --git a/image/test/gtest/first-frame-green.gif b/image/test/gtest/first-frame-green.gif new file mode 100644 index 000000000..cd3c7d3db Binary files /dev/null and b/image/test/gtest/first-frame-green.gif differ diff --git a/image/test/gtest/first-frame-green.png b/image/test/gtest/first-frame-green.png new file mode 100644 index 000000000..115f035d8 Binary files /dev/null and b/image/test/gtest/first-frame-green.png differ diff --git a/image/test/gtest/first-frame-padding.gif b/image/test/gtest/first-frame-padding.gif new file mode 100644 index 000000000..e6d7c4932 Binary files /dev/null and b/image/test/gtest/first-frame-padding.gif differ diff --git a/image/test/gtest/green-1x1-truncated.gif b/image/test/gtest/green-1x1-truncated.gif new file mode 100644 index 000000000..0829f9694 Binary files /dev/null and b/image/test/gtest/green-1x1-truncated.gif differ diff --git a/image/test/gtest/green.bmp b/image/test/gtest/green.bmp new file mode 100644 index 000000000..f79dd672a Binary files /dev/null and b/image/test/gtest/green.bmp differ diff --git a/image/test/gtest/green.gif b/image/test/gtest/green.gif new file mode 100644 index 000000000..ef215dfc9 Binary files /dev/null and b/image/test/gtest/green.gif differ diff --git a/image/test/gtest/green.ico b/image/test/gtest/green.ico new file mode 100644 index 000000000..c5dfa8b53 Binary files /dev/null and b/image/test/gtest/green.ico differ diff --git a/image/test/gtest/green.icon b/image/test/gtest/green.icon new file mode 100644 index 000000000..c74e62fee Binary files /dev/null and b/image/test/gtest/green.icon differ diff --git a/image/test/gtest/green.jpg b/image/test/gtest/green.jpg new file mode 100644 index 000000000..48c454d27 Binary files /dev/null and b/image/test/gtest/green.jpg differ diff --git a/image/test/gtest/green.png b/image/test/gtest/green.png new file mode 100644 index 000000000..7df25f33b Binary files /dev/null and b/image/test/gtest/green.png differ diff --git a/image/test/gtest/invalid-truncated-metadata.bmp b/image/test/gtest/invalid-truncated-metadata.bmp new file mode 100644 index 000000000..228c5c999 Binary files /dev/null and b/image/test/gtest/invalid-truncated-metadata.bmp differ diff --git a/image/test/gtest/moz.build b/image/test/gtest/moz.build new file mode 100644 index 000000000..5cf6d5116 --- /dev/null +++ b/image/test/gtest/moz.build @@ -0,0 +1,78 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Library('imagetest') + +UNIFIED_SOURCES = [ + 'Common.cpp', + 'TestADAM7InterpolatingFilter.cpp', + 'TestCopyOnWrite.cpp', + 'TestDecoders.cpp', + 'TestDecodeToSurface.cpp', + 'TestDeinterlacingFilter.cpp', + 'TestMetadata.cpp', + 'TestRemoveFrameRectFilter.cpp', + 'TestSourceBuffer.cpp', + 'TestStreamingLexer.cpp', + 'TestSurfaceSink.cpp', +] + +if CONFIG['MOZ_ENABLE_SKIA']: + UNIFIED_SOURCES += [ + 'TestDownscalingFilter.cpp', + 'TestSurfacePipeIntegration.cpp', + ] + +SOURCES += [ + # Can't be unified because it manipulates the preprocessor environment. + 'TestDownscalingFilterNoSkia.cpp', +] + +TEST_HARNESS_FILES.gtest += [ + 'animated-with-extra-image-sub-blocks.gif', + 'corrupt-with-bad-bmp-height.ico', + 'corrupt-with-bad-bmp-width.ico', + 'corrupt.jpg', + 'downscaled.bmp', + 'downscaled.gif', + 'downscaled.ico', + 'downscaled.icon', + 'downscaled.jpg', + 'downscaled.png', + 'first-frame-green.gif', + 'first-frame-green.png', + 'first-frame-padding.gif', + 'green-1x1-truncated.gif', + 'green.bmp', + 'green.gif', + 'green.ico', + 'green.icon', + 'green.jpg', + 'green.png', + 'invalid-truncated-metadata.bmp', + 'no-frame-delay.gif', + 'rle4.bmp', + 'rle8.bmp', + 'transparent-ico-with-and-mask.ico', + 'transparent-if-within-ico.bmp', + 'transparent.gif', + 'transparent.png', +] + +include('/ipc/chromium/chromium-config.mozbuild') + +LOCAL_INCLUDES += [ + '/dom/base', + '/gfx/2d', + '/image', +] + +LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] + +FINAL_LIBRARY = 'xul-gtest' + +if CONFIG['GNU_CXX']: + CXXFLAGS += ['-Wno-error=shadow'] diff --git a/image/test/gtest/no-frame-delay.gif b/image/test/gtest/no-frame-delay.gif new file mode 100644 index 000000000..1c50b6743 Binary files /dev/null and b/image/test/gtest/no-frame-delay.gif differ diff --git a/image/test/gtest/rle4.bmp b/image/test/gtest/rle4.bmp new file mode 100644 index 000000000..78a092787 Binary files /dev/null and b/image/test/gtest/rle4.bmp differ diff --git a/image/test/gtest/rle8.bmp b/image/test/gtest/rle8.bmp new file mode 100644 index 000000000..bd793b6b6 Binary files /dev/null and b/image/test/gtest/rle8.bmp differ diff --git a/image/test/gtest/transparent-ico-with-and-mask.ico b/image/test/gtest/transparent-ico-with-and-mask.ico new file mode 100644 index 000000000..ab0dc4bce Binary files /dev/null and b/image/test/gtest/transparent-ico-with-and-mask.ico differ diff --git a/image/test/gtest/transparent-if-within-ico.bmp b/image/test/gtest/transparent-if-within-ico.bmp new file mode 100644 index 000000000..4dc04c181 Binary files /dev/null and b/image/test/gtest/transparent-if-within-ico.bmp differ diff --git a/image/test/gtest/transparent.gif b/image/test/gtest/transparent.gif new file mode 100644 index 000000000..48f5c7caf Binary files /dev/null and b/image/test/gtest/transparent.gif differ diff --git a/image/test/gtest/transparent.png b/image/test/gtest/transparent.png new file mode 100644 index 000000000..fc8002053 Binary files /dev/null and b/image/test/gtest/transparent.png differ diff --git a/image/test/mochitest/12M-pixels-1.png b/image/test/mochitest/12M-pixels-1.png new file mode 100644 index 000000000..f802dd539 Binary files /dev/null and b/image/test/mochitest/12M-pixels-1.png differ diff --git a/image/test/mochitest/12M-pixels-2.png b/image/test/mochitest/12M-pixels-2.png new file mode 100644 index 000000000..a6d430442 Binary files /dev/null and b/image/test/mochitest/12M-pixels-2.png differ diff --git a/image/test/mochitest/6M-pixels.png b/image/test/mochitest/6M-pixels.png new file mode 100644 index 000000000..c813d8b56 Binary files /dev/null and b/image/test/mochitest/6M-pixels.png differ diff --git a/image/test/mochitest/INT32_MIN.bmp b/image/test/mochitest/INT32_MIN.bmp new file mode 100644 index 000000000..d9a001610 Binary files /dev/null and b/image/test/mochitest/INT32_MIN.bmp differ diff --git a/image/test/mochitest/animated-gif-finalframe.gif b/image/test/mochitest/animated-gif-finalframe.gif new file mode 100644 index 000000000..4e80d31a7 Binary files /dev/null and b/image/test/mochitest/animated-gif-finalframe.gif differ diff --git a/image/test/mochitest/animated-gif.gif b/image/test/mochitest/animated-gif.gif new file mode 100644 index 000000000..001cbfb87 Binary files /dev/null and b/image/test/mochitest/animated-gif.gif differ diff --git a/image/test/mochitest/animated-gif2.gif b/image/test/mochitest/animated-gif2.gif new file mode 100644 index 000000000..c66cc4b73 Binary files /dev/null and b/image/test/mochitest/animated-gif2.gif differ diff --git a/image/test/mochitest/animated-gif_trailing-garbage.gif b/image/test/mochitest/animated-gif_trailing-garbage.gif new file mode 100644 index 000000000..02f4de2e3 Binary files /dev/null and b/image/test/mochitest/animated-gif_trailing-garbage.gif differ diff --git a/image/test/mochitest/animated1.gif b/image/test/mochitest/animated1.gif new file mode 100644 index 000000000..2f9d8a512 Binary files /dev/null and b/image/test/mochitest/animated1.gif differ diff --git a/image/test/mochitest/animated2.gif b/image/test/mochitest/animated2.gif new file mode 100644 index 000000000..2f9d8a512 Binary files /dev/null and b/image/test/mochitest/animated2.gif differ diff --git a/image/test/mochitest/animation.svg b/image/test/mochitest/animation.svg new file mode 100644 index 000000000..2141d8679 --- /dev/null +++ b/image/test/mochitest/animation.svg @@ -0,0 +1,5 @@ + + + + diff --git a/image/test/mochitest/animationPolling.js b/image/test/mochitest/animationPolling.js new file mode 100644 index 000000000..6f5e7c889 --- /dev/null +++ b/image/test/mochitest/animationPolling.js @@ -0,0 +1,414 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +var currentTest; +var gIsRefImageLoaded = false; +const gShouldOutputDebugInfo = false; + +function pollForSuccess() +{ + if (!currentTest.isTestFinished) { + if (!currentTest.reusingReferenceImage || (currentTest.reusingReferenceImage + && gRefImageLoaded)) { + currentTest.checkImage(); + } + + setTimeout(pollForSuccess, currentTest.pollFreq); + } +}; + +function referencePoller() +{ + currentTest.takeReferenceSnapshot(); +} + +function reuseImageCallback() +{ + gIsRefImageLoaded = true; +} + +function failTest() +{ + if (currentTest.isTestFinished || currentTest.closeFunc) { + return; + } + + ok(false, "timing out after " + currentTest.timeout + "ms. " + + "Animated image still doesn't look correct, after poll #" + + currentTest.pollCounter); + currentTest.wereFailures = true; + + if (currentTest.currentSnapshotDataURI) { + currentTest.outputDebugInfo("Snapshot #" + currentTest.pollCounter, + "snapNum" + currentTest.pollCounter, + currentTest.currentSnapshotDataURI); + } + + currentTest.enableDisplay(document.getElementById(currentTest.debugElementId)); + + currentTest.cleanUpAndFinish(); +}; + +/** + * Create a new AnimationTest object. + * + * @param pollFreq The amount of time (in ms) to wait between consecutive + * snapshots if the reference image and the test image don't match. + * @param timeout The total amount of time (in ms) to wait before declaring the + * test as failed. + * @param referenceElementId The id attribute of the reference image element, or + * the source of the image to change to, once the reference snapshot has + * been successfully taken. This latter option could be used if you don't + * want the image to become invisible at any time during the test. + * @param imageElementId The id attribute of the test image element. + * @param debugElementId The id attribute of the div where links should be + * appended if the test fails. + * @param cleanId The id attribute of the div or element to use as the 'clean' + * test. This element is only enabled when we are testing to verify that + * the reference image has been loaded. It can be undefined. + * @param srcAttr The location of the source of the image, for preloading. This + * is usually not required, but it useful for preloading reference + * images. + * @param xulTest A boolean value indicating whether or not this is a XUL test + * (uses hidden=true/false rather than display: none to hide/show + * elements). + * @param closeFunc A function that should be called when this test is finished. + * If null, then cleanUpAndFinish() will be called. This can be used to + * chain tests together, so they are all finished exactly once. + * @returns {AnimationTest} + */ +function AnimationTest(pollFreq, timeout, referenceElementId, imageElementId, + debugElementId, cleanId, srcAttr, xulTest, closeFunc) +{ + // We want to test the cold loading behavior, so clear cache in case an + // earlier test got our image in there already. + clearAllImageCaches(); + + this.wereFailures = false; + this.pollFreq = pollFreq; + this.timeout = timeout; + this.imageElementId = imageElementId; + this.referenceElementId = referenceElementId; + + if (!document.getElementById(referenceElementId)) { + // In this case, we're assuming the user passed in a string that + // indicates the source of the image they want to change to, + // after the reference image has been taken. + this.reusingImageAsReference = true; + } + + this.srcAttr = srcAttr; + this.debugElementId = debugElementId; + this.referenceSnapshot = ""; // value will be set in takeReferenceSnapshot() + this.pollCounter = 0; + this.isTestFinished = false; + this.numRefsTaken = 0; + this.blankWaitTime = 0; + + this.cleanId = cleanId ? cleanId : ''; + this.xulTest = xulTest ? xulTest : ''; + this.closeFunc = closeFunc ? closeFunc : ''; +}; + +AnimationTest.prototype.preloadImage = function() +{ + if (this.srcAttr) { + this.myImage = new Image(); + this.myImage.onload = function() { currentTest.continueTest(); }; + this.myImage.src = this.srcAttr; + } else { + this.continueTest(); + } +}; + +AnimationTest.prototype.outputDebugInfo = function(message, id, dataUri) +{ + if (!gShouldOutputDebugInfo) { + return; + } + var debugElement = document.getElementById(this.debugElementId); + var newDataUriElement = document.createElement("a"); + newDataUriElement.setAttribute("id", id); + newDataUriElement.setAttribute("href", dataUri); + newDataUriElement.appendChild(document.createTextNode(message)); + debugElement.appendChild(newDataUriElement); + var brElement = document.createElement("br"); + debugElement.appendChild(brElement); + todo(false, "Debug (" + id + "): " + message + " " + dataUri); +}; + +AnimationTest.prototype.isFinished = function() +{ + return this.isTestFinished; +}; + +AnimationTest.prototype.takeCleanSnapshot = function() +{ + var cleanElement; + if (this.cleanId) { + cleanElement = document.getElementById(this.cleanId); + } + + // Enable clean page comparison element + if (cleanElement) { + this.enableDisplay(cleanElement); + } + + // Take a snapshot of the initial (clean) page + this.cleanSnapshot = snapshotWindow(window, false); + + // Disable the clean page comparison element + if (cleanElement) { + this.disableDisplay(cleanElement); + } + + var dataString1 = "Clean Snapshot"; + this.outputDebugInfo(dataString1, 'cleanSnap', + this.cleanSnapshot.toDataURL()); +}; + +AnimationTest.prototype.takeBlankSnapshot = function() +{ + // Take a snapshot of the initial (essentially blank) page + this.blankSnapshot = snapshotWindow(window, false); + + var dataString1 = "Initial Blank Snapshot"; + this.outputDebugInfo(dataString1, 'blank1Snap', + this.blankSnapshot.toDataURL()); +}; + +/** + * Begin the AnimationTest. This will utilize the information provided in the + * constructor to invoke a mochitest on animated images. It will automatically + * fail if allowed to run past the timeout. This will attempt to preload an + * image, if applicable, and then asynchronously call continueTest(), or if not + * applicable, synchronously trigger a call to continueTest(). + */ +AnimationTest.prototype.beginTest = function() +{ + SimpleTest.waitForExplicitFinish(); + SimpleTest.requestFlakyTimeout("untriaged"); + + currentTest = this; + this.preloadImage(); +}; + +/** + * This is the second part of the test. It is triggered (eventually) from + * beginTest() either synchronously or asynchronously, as an image load + * callback. + */ +AnimationTest.prototype.continueTest = function() +{ + // In case something goes wrong, fail earlier than mochitest timeout, + // and with more information. + setTimeout(failTest, this.timeout); + + if (!this.reusingImageAsReference) { + this.disableDisplay(document.getElementById(this.imageElementId)); + } + + this.takeReferenceSnapshot(); + this.setupPolledImage(); + SimpleTest.executeSoon(pollForSuccess); +}; + +AnimationTest.prototype.setupPolledImage = function () +{ + // Make sure the image is visible + if (!this.reusingImageAsReference) { + this.enableDisplay(document.getElementById(this.imageElementId)); + var currentSnapshot = snapshotWindow(window, false); + var result = compareSnapshots(currentSnapshot, + this.referenceSnapshot, true); + + this.currentSnapshotDataURI = currentSnapshot.toDataURL(); + + if (result[0]) { + // SUCCESS! + ok(true, "Animated image looks correct, at poll #" + + this.pollCounter); + + this.cleanUpAndFinish(); + } + } else { + if (!gIsRefImageLoaded) { + this.myImage = new Image(); + this.myImage.onload = reuseImageCallback; + document.getElementById(this.imageElementId).setAttribute('src', + this.referenceElementId); + } + } +} + +AnimationTest.prototype.checkImage = function () +{ + if (this.isTestFinished) { + return; + } + + this.pollCounter++; + + // We need this for some tests, because we need to force the + // test image to be visible. + if (!this.reusingImageAsReference) { + this.enableDisplay(document.getElementById(this.imageElementId)); + } + + var currentSnapshot = snapshotWindow(window, false); + var result = compareSnapshots(currentSnapshot, this.referenceSnapshot, true); + + this.currentSnapshotDataURI = currentSnapshot.toDataURL(); + + if (result[0]) { + // SUCCESS! + ok(true, "Animated image looks correct, at poll #" + + this.pollCounter); + + this.cleanUpAndFinish(); + } +}; + +AnimationTest.prototype.takeReferenceSnapshot = function () +{ + this.numRefsTaken++; + + // Test to make sure the reference image doesn't match a clean snapshot + if (!this.cleanSnapshot) { + this.takeCleanSnapshot(); + } + + // Used later to verify that the reference div disappeared + if (!this.blankSnapshot) { + this.takeBlankSnapshot(); + } + + if (this.reusingImageAsReference) { + // Show reference elem (which is actually our image), & take a snapshot + var referenceElem = document.getElementById(this.imageElementId); + this.enableDisplay(referenceElem); + + this.referenceSnapshot = snapshotWindow(window, false); + + var snapResult = compareSnapshots(this.cleanSnapshot, + this.referenceSnapshot, false); + if (!snapResult[0]) { + if (this.blankWaitTime > 2000) { + // if it took longer than two seconds to load the image, we probably + // have a problem. + this.wereFailures = true; + ok(snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot"); + } else { + this.blankWaitTime += currentTest.pollFreq; + // let's wait a bit and see if it clears up + setTimeout(referencePoller, currentTest.pollFreq); + return; + } + } + + ok(snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot"); + + var dataString = "Reference Snapshot #" + this.numRefsTaken; + this.outputDebugInfo(dataString, 'refSnapId', + this.referenceSnapshot.toDataURL()); + } else { + // Make sure the animation section is hidden + this.disableDisplay(document.getElementById(this.imageElementId)); + + // Show reference div, & take a snapshot + var referenceDiv = document.getElementById(this.referenceElementId); + this.enableDisplay(referenceDiv); + + this.referenceSnapshot = snapshotWindow(window, false); + var snapResult = compareSnapshots(this.cleanSnapshot, + this.referenceSnapshot, false); + if (!snapResult[0]) { + if (this.blankWaitTime > 2000) { + // if it took longer than two seconds to load the image, we probably + // have a problem. + this.wereFailures = true; + ok(snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot"); + } else { + this.blankWaitTime += 20; + // let's wait a bit and see if it clears up + setTimeout(referencePoller, 20); + return; + } + } + + ok(snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot"); + + var dataString = "Reference Snapshot #" + this.numRefsTaken; + this.outputDebugInfo(dataString, 'refSnapId', + this.referenceSnapshot.toDataURL()); + + // Re-hide reference div, and take another snapshot to be sure it's gone + this.disableDisplay(referenceDiv); + this.testBlankCameBack(); + } +}; + +AnimationTest.prototype.enableDisplay = function(element) +{ + if (!element) { + return; + } + + if (!this.xulTest) { + element.style.display = ''; + } else { + element.setAttribute('hidden', 'false'); + } +}; + +AnimationTest.prototype.disableDisplay = function(element) +{ + if (!element) { + return; + } + + if (!this.xulTest) { + element.style.display = 'none'; + } else { + element.setAttribute('hidden', 'true'); + } +}; + +AnimationTest.prototype.testBlankCameBack = function() +{ + var blankSnapshot2 = snapshotWindow(window, false); + var result = compareSnapshots(this.blankSnapshot, blankSnapshot2, true); + ok(result[0], "Reference image should disappear when it becomes display:none"); + + if (!result[0]) { + this.wereFailures = true; + var dataString = "Second Blank Snapshot"; + this.outputDebugInfo(dataString, 'blank2SnapId', result[2]); + } +}; + +AnimationTest.prototype.cleanUpAndFinish = function () +{ + // On the off chance that failTest and checkImage are triggered + // back-to-back, use a flag to prevent multiple calls to SimpleTest.finish. + if (this.isTestFinished) { + return; + } + + this.isTestFinished = true; + + // Call our closing function, if one exists + if (this.closeFunc) { + this.closeFunc(); + return; + } + + if (this.wereFailures) { + document.getElementById(this.debugElementId).style.display = 'block'; + } + + SimpleTest.finish(); + document.getElementById(this.debugElementId).style.display = ""; +}; diff --git a/image/test/mochitest/bad.jpg b/image/test/mochitest/bad.jpg new file mode 100644 index 000000000..555a416d7 Binary files /dev/null and b/image/test/mochitest/bad.jpg differ diff --git a/image/test/mochitest/big.png b/image/test/mochitest/big.png new file mode 100644 index 000000000..94e7eb6db Binary files /dev/null and b/image/test/mochitest/big.png differ diff --git a/image/test/mochitest/blue.gif b/image/test/mochitest/blue.gif new file mode 100644 index 000000000..339f3702f Binary files /dev/null and b/image/test/mochitest/blue.gif differ diff --git a/image/test/mochitest/blue.png b/image/test/mochitest/blue.png new file mode 100644 index 000000000..8df58f3a5 Binary files /dev/null and b/image/test/mochitest/blue.png differ diff --git a/image/test/mochitest/bug1132427.gif b/image/test/mochitest/bug1132427.gif new file mode 100644 index 000000000..39f49689a Binary files /dev/null and b/image/test/mochitest/bug1132427.gif differ diff --git a/image/test/mochitest/bug1132427.html b/image/test/mochitest/bug1132427.html new file mode 100644 index 000000000..c765ce14c --- /dev/null +++ b/image/test/mochitest/bug1132427.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/image/test/mochitest/bug1180105-waiter.sjs b/image/test/mochitest/bug1180105-waiter.sjs new file mode 100644 index 000000000..4e86ae287 --- /dev/null +++ b/image/test/mochitest/bug1180105-waiter.sjs @@ -0,0 +1,24 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var timer = Components.classes["@mozilla.org/timer;1"]; +var waitTimer = timer.createInstance(Components.interfaces.nsITimer); + +function handleRequest(request, response) { + response.setHeader("Content-Type", "text/html", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + response.processAsync(); + waitForFinish(response); +} + +function waitForFinish(response) { + if (getSharedState("all-parts-done") === "1") { + response.write("done"); + response.finish(); + } else { + waitTimer.initWithCallback(function() {waitForFinish(response);}, 10, + Components.interfaces.nsITimer.TYPE_ONE_SHOT); + } +} diff --git a/image/test/mochitest/bug1180105.sjs b/image/test/mochitest/bug1180105.sjs new file mode 100644 index 000000000..e138e548e --- /dev/null +++ b/image/test/mochitest/bug1180105.sjs @@ -0,0 +1,63 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var counter = 100; +var timer = Components.classes["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Components.interfaces.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) +{ + response.setHeader("Content-Type", + "multipart/x-mixed-replace;boundary=BOUNDARYOMG", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // We're sending parts off in a delayed fashion, to let the tests occur. + response.processAsync(); + response.write("--BOUNDARYOMG\r\n"); + sendParts(response); +} + +function sendParts(response) { + if (counter-- == 0) { + sendClose(response); + setSharedState("all-parts-done", "1"); + return; + } + sendNextPart(response); + partTimer.initWithCallback(function() {sendParts(response);}, 1, + Components.interfaces.nsITimer.TYPE_ONE_SHOT); +} + +function sendClose(response) { + response.write("--BOUNDARYOMG--\r\n"); + response.finish(); +} + +function sendNextPart(response) { + var nextPartHead = "Content-Type: image/jpeg\r\n\r\n"; + var inputStream = getFileAsInputStream("damon.jpg"); + response.bodyOutputStream.write(nextPartHead, nextPartHead.length); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + // Toss in the boundary, so the browser can know this part is complete + response.write("--BOUNDARYOMG\r\n"); +} + diff --git a/image/test/mochitest/bug1217571-iframe.html b/image/test/mochitest/bug1217571-iframe.html new file mode 100644 index 000000000..d67bb9ed7 --- /dev/null +++ b/image/test/mochitest/bug1217571-iframe.html @@ -0,0 +1,17 @@ + + + + + iframe for Bug 1217571 + + + + +

+ + + diff --git a/image/test/mochitest/bug1319025-ref.png b/image/test/mochitest/bug1319025-ref.png new file mode 100644 index 000000000..482d027a0 Binary files /dev/null and b/image/test/mochitest/bug1319025-ref.png differ diff --git a/image/test/mochitest/bug1319025.png b/image/test/mochitest/bug1319025.png new file mode 100644 index 000000000..8023e7787 Binary files /dev/null and b/image/test/mochitest/bug1319025.png differ diff --git a/image/test/mochitest/bug399925.gif b/image/test/mochitest/bug399925.gif new file mode 100644 index 000000000..fc1c8f3af Binary files /dev/null and b/image/test/mochitest/bug399925.gif differ diff --git a/image/test/mochitest/bug415761.ico b/image/test/mochitest/bug415761.ico new file mode 100644 index 000000000..d3f65abc2 Binary files /dev/null and b/image/test/mochitest/bug415761.ico differ diff --git a/image/test/mochitest/bug468160.sjs b/image/test/mochitest/bug468160.sjs new file mode 100644 index 000000000..4a654216a --- /dev/null +++ b/image/test/mochitest/bug468160.sjs @@ -0,0 +1,6 @@ +function handleRequest(request, response) +{ + response.setStatusLine("1.1", 302, "Found"); + response.setHeader("Location", "red.png", false); + response.setHeader("Cache-Control", "no-cache", false); +} diff --git a/image/test/mochitest/bug478398_ONLY.png b/image/test/mochitest/bug478398_ONLY.png new file mode 100644 index 000000000..e094ae2cf Binary files /dev/null and b/image/test/mochitest/bug478398_ONLY.png differ diff --git a/image/test/mochitest/bug490949-iframe.html b/image/test/mochitest/bug490949-iframe.html new file mode 100644 index 000000000..68f74b587 --- /dev/null +++ b/image/test/mochitest/bug490949-iframe.html @@ -0,0 +1,7 @@ + + +Bug 490949 iframe + + + + diff --git a/image/test/mochitest/bug490949.sjs b/image/test/mochitest/bug490949.sjs new file mode 100644 index 000000000..f306b8337 --- /dev/null +++ b/image/test/mochitest/bug490949.sjs @@ -0,0 +1,33 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + var redirectstate = "/image/test/mochitest/bug490949.sjs"; + if (getState(redirectstate) == "") { + file.append('blue.png'); + setState(redirectstate, "red"); + } else { + file.append('red.png'); + setState(redirectstate, ""); + } + response.setHeader("Cache-Control", "no-cache", false); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Components.classes['@mozilla.org/binaryinputstream;1'] + .createInstance(Components.interfaces.nsIBinaryInputStream); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug496292-1.sjs b/image/test/mochitest/bug496292-1.sjs new file mode 100644 index 000000000..0326b75d6 --- /dev/null +++ b/image/test/mochitest/bug496292-1.sjs @@ -0,0 +1,32 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + if (request.getHeader("Accept") == "*/*") { + file.append('blue.png'); + } else { + file.append('red.png'); + } + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + response.setHeader("Cache-Control", "no-cache", false); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Components.classes['@mozilla.org/binaryinputstream;1'] + .createInstance(Components.interfaces.nsIBinaryInputStream); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug496292-2.sjs b/image/test/mochitest/bug496292-2.sjs new file mode 100644 index 000000000..756ea9db2 --- /dev/null +++ b/image/test/mochitest/bug496292-2.sjs @@ -0,0 +1,32 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + if (request.getHeader("Accept") == "image/png") { + file.append('blue.png'); + } else { + file.append('red.png'); + } + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + response.setHeader("Cache-Control", "no-cache", false); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Components.classes['@mozilla.org/binaryinputstream;1'] + .createInstance(Components.interfaces.nsIBinaryInputStream); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug496292-iframe-1.html b/image/test/mochitest/bug496292-iframe-1.html new file mode 100644 index 000000000..00f0fbcfc --- /dev/null +++ b/image/test/mochitest/bug496292-iframe-1.html @@ -0,0 +1,7 @@ + + +Bug 496292 iframe 1 + + + + diff --git a/image/test/mochitest/bug496292-iframe-2.html b/image/test/mochitest/bug496292-iframe-2.html new file mode 100644 index 000000000..67c1ecea1 --- /dev/null +++ b/image/test/mochitest/bug496292-iframe-2.html @@ -0,0 +1,7 @@ + + +Bug 496292 iframe 2 + + + + diff --git a/image/test/mochitest/bug496292-iframe-ref.html b/image/test/mochitest/bug496292-iframe-ref.html new file mode 100644 index 000000000..2e804502e --- /dev/null +++ b/image/test/mochitest/bug496292-iframe-ref.html @@ -0,0 +1,7 @@ + + +Bug 496292 reference iframe + + + + diff --git a/image/test/mochitest/bug497665-iframe.html b/image/test/mochitest/bug497665-iframe.html new file mode 100644 index 000000000..a2b098e31 --- /dev/null +++ b/image/test/mochitest/bug497665-iframe.html @@ -0,0 +1,8 @@ + + +Bug 497665 iframe + + + + + diff --git a/image/test/mochitest/bug497665.sjs b/image/test/mochitest/bug497665.sjs new file mode 100644 index 000000000..67151e25b --- /dev/null +++ b/image/test/mochitest/bug497665.sjs @@ -0,0 +1,34 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + var redirectstate = "/image/test/mochitest/bug497665.sjs"; + if (getState(redirectstate) == "") { + file.append('blue.png'); + setState(redirectstate, "red"); + } else { + file.append('red.png'); + setState(redirectstate, ""); + } + + response.setHeader("Cache-Control", "max-age=3600", false); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Components.classes['@mozilla.org/binaryinputstream;1'] + .createInstance(Components.interfaces.nsIBinaryInputStream); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug552605.sjs b/image/test/mochitest/bug552605.sjs new file mode 100644 index 000000000..806a065b4 --- /dev/null +++ b/image/test/mochitest/bug552605.sjs @@ -0,0 +1,13 @@ +function handleRequest(request, response) +{ + var redirectstate = "/image/test/mochitest/bug89419.sjs"; + response.setStatusLine("1.1", 302, "Found"); + if (getState(redirectstate) == "") { + response.setHeader("Location", "red.png", false); + setState(redirectstate, "red"); + } else { + response.setHeader("Location", "blue.png", false); + setState(redirectstate, ""); + } + response.setHeader("Cache-Control", "no-cache", false); +} diff --git a/image/test/mochitest/bug657191.sjs b/image/test/mochitest/bug657191.sjs new file mode 100644 index 000000000..7451d98ee --- /dev/null +++ b/image/test/mochitest/bug657191.sjs @@ -0,0 +1,27 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append('lime100x100.svg'); + + response.setStatusLine("1.1", 500, "Internal Server Error"); + response.setHeader("Content-Type", "image/svg+xml", false); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Components.classes['@mozilla.org/binaryinputstream;1'] + .createInstance(Components.interfaces.nsIBinaryInputStream); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug671906-iframe.html b/image/test/mochitest/bug671906-iframe.html new file mode 100644 index 000000000..87f8183a4 --- /dev/null +++ b/image/test/mochitest/bug671906-iframe.html @@ -0,0 +1,7 @@ + + +Bug 671906 iframe + + + + diff --git a/image/test/mochitest/bug671906.sjs b/image/test/mochitest/bug671906.sjs new file mode 100644 index 000000000..f1fbc1b73 --- /dev/null +++ b/image/test/mochitest/bug671906.sjs @@ -0,0 +1,36 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + var filestate = "/image/test/mochitest/bug671906.sjs"; + if (getState(filestate) == "") { + file.append('blue.png'); + setState(filestate, "red"); + } else { + file.append('red.png'); + setState(filestate, ""); + } + + // Set the expires date to some silly time in the future so we're sure to + // *want* to cache this image. + var date = new Date(); + date.setFullYear(date.getFullYear() + 1); + response.setHeader("Expires", date.toUTCString(), false); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + + response.bodyOutputStream.writeFrom(fileStream, fileStream.available()); + + fileStream.close(); + + response.setHeader("Access-Control-Allow-Origin", "*", false); +} diff --git a/image/test/mochitest/bug733553-informant.sjs b/image/test/mochitest/bug733553-informant.sjs new file mode 100644 index 000000000..6f15a1195 --- /dev/null +++ b/image/test/mochitest/bug733553-informant.sjs @@ -0,0 +1,15 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +function handleRequest(request, response) +{ + response.setHeader("Content-Type", "text/plain", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // Tells bug733553.sjs that the consumer is ready for the next part + let partName = request.queryString; + setSharedState("next-part", partName); + response.write("OK!"); +} + diff --git a/image/test/mochitest/bug733553.sjs b/image/test/mochitest/bug733553.sjs new file mode 100644 index 000000000..c5279f3d2 --- /dev/null +++ b/image/test/mochitest/bug733553.sjs @@ -0,0 +1,104 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var bodyPartIndex = -1; +var bodyParts = [ + ["red.png", "image/png"], + ["animated-gif2.gif", "image/gif"], + ["red.png", "image/png"], + ["lime100x100.svg", "image/svg+xml"], + ["lime100x100.svg", "image/svg+xml"], + ["animated-gif2.gif", "image/gif"], + ["red.png", "image/png"], + // Mime type intentionally wrong (test for bug 907575) + ["shaver.png", "image/gif"], + ["red.png", "image/png"], + ["damon.jpg", "image/jpeg"], + ["damon.jpg", "application/octet-stream"], + ["damon.jpg", "image/jpeg"], + ["rillybad.jpg", "application/x-unknown-content-type"], + ["damon.jpg", "image/jpeg"], + ["bad.jpg", "image/jpeg"], + ["red.png", "image/png"], + ["invalid.jpg", "image/jpeg"], + ["animated-gif2.gif", "image/gif"] +]; +var timer = Components.classes["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Components.interfaces.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) +{ + if (!getSharedState("next-part")) { + setSharedState("next-part", "-1"); + } + response.setHeader("Content-Type", + "multipart/x-mixed-replace;boundary=BOUNDARYOMG", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // We're sending parts off in a delayed fashion, to let the tests occur. + response.processAsync(); + response.write("--BOUNDARYOMG\r\n"); + sendParts(response); +} + +function sendParts(response) { + let wait = false; + let nextPart = parseInt(getSharedState("next-part"), 10); + if (nextPart == bodyPartIndex) { + // Haven't been signaled yet, remain in holding pattern + wait = true; + } else { + bodyPartIndex = nextPart; + } + if (bodyParts.length > bodyPartIndex) { + let callback; + if (!wait) { + callback = getSendNextPart(response); + } else { + callback = function () { sendParts(response); }; + } + partTimer.initWithCallback(callback, 1000, + Components.interfaces.nsITimer.TYPE_ONE_SHOT); + } + else { + sendClose(response); + } +} + +function sendClose(response) { + response.write("--BOUNDARYOMG--\r\n"); + response.finish(); +} + +function getSendNextPart(response) { + var part = bodyParts[bodyPartIndex]; + var nextPartHead = "Content-Type: " + part[1] + "\r\n\r\n"; + var inputStream = getFileAsInputStream(part[0]); + return function () { + response.bodyOutputStream.write(nextPartHead, nextPartHead.length); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + // Toss in the boundary, so the browser can know this part is complete + response.write("--BOUNDARYOMG\r\n"); + sendParts(response); + } +} + diff --git a/image/test/mochitest/bug767779.sjs b/image/test/mochitest/bug767779.sjs new file mode 100644 index 000000000..9a7948d85 --- /dev/null +++ b/image/test/mochitest/bug767779.sjs @@ -0,0 +1,56 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var timer = Components.classes["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Components.interfaces.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) +{ + response.setHeader("Content-Type", "image/gif", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // We're sending data off in a delayed fashion + response.processAsync(); + var inputStream = getFileAsInputStream("animated-gif_trailing-garbage.gif"); + var available = inputStream.available(); // = 4029 bytes + // Send the good data at once + response.bodyOutputStream.writeFrom(inputStream, 285); + sendParts(inputStream, response); +} + +function sendParts(inputStream, response) { + // 3744 left, send in 8 chunks of 468 each + partTimer.initWithCallback(getSendNextPart(inputStream, response), 500, + Components.interfaces.nsITimer.TYPE_ONE_SHOT); +} + +function getSendNextPart(inputStream, response) { + return function () { + response.bodyOutputStream.writeFrom(inputStream, 468); + if (!inputStream.available()) { + inputStream.close(); + response.finish(); + } else { + sendParts(inputStream, response); + } + }; +} + diff --git a/image/test/mochitest/bug89419-iframe.html b/image/test/mochitest/bug89419-iframe.html new file mode 100644 index 000000000..191531563 --- /dev/null +++ b/image/test/mochitest/bug89419-iframe.html @@ -0,0 +1,7 @@ + + +Bug 89419 iframe + + + + diff --git a/image/test/mochitest/bug89419.sjs b/image/test/mochitest/bug89419.sjs new file mode 100644 index 000000000..806a065b4 --- /dev/null +++ b/image/test/mochitest/bug89419.sjs @@ -0,0 +1,13 @@ +function handleRequest(request, response) +{ + var redirectstate = "/image/test/mochitest/bug89419.sjs"; + response.setStatusLine("1.1", 302, "Found"); + if (getState(redirectstate) == "") { + response.setHeader("Location", "red.png", false); + setState(redirectstate, "red"); + } else { + response.setHeader("Location", "blue.png", false); + setState(redirectstate, ""); + } + response.setHeader("Cache-Control", "no-cache", false); +} diff --git a/image/test/mochitest/bug900200-ref.png b/image/test/mochitest/bug900200-ref.png new file mode 100644 index 000000000..636013132 Binary files /dev/null and b/image/test/mochitest/bug900200-ref.png differ diff --git a/image/test/mochitest/bug900200.png b/image/test/mochitest/bug900200.png new file mode 100644 index 000000000..d7d87adce Binary files /dev/null and b/image/test/mochitest/bug900200.png differ diff --git a/image/test/mochitest/chrome.ini b/image/test/mochitest/chrome.ini new file mode 100644 index 000000000..b84d0af89 --- /dev/null +++ b/image/test/mochitest/chrome.ini @@ -0,0 +1,7 @@ +[DEFAULT] +skip-if = os == 'android' + +[test_bug415761.html] +skip-if = os != "win" || os_version == "6.2" +support-files = + bug415761.ico diff --git a/image/test/mochitest/clear.gif b/image/test/mochitest/clear.gif new file mode 100644 index 000000000..7ae79ba86 Binary files /dev/null and b/image/test/mochitest/clear.gif differ diff --git a/image/test/mochitest/clear.png b/image/test/mochitest/clear.png new file mode 100644 index 000000000..b09aecaaa Binary files /dev/null and b/image/test/mochitest/clear.png differ diff --git a/image/test/mochitest/clear2-results.gif b/image/test/mochitest/clear2-results.gif new file mode 100644 index 000000000..965b65025 Binary files /dev/null and b/image/test/mochitest/clear2-results.gif differ diff --git a/image/test/mochitest/clear2.gif b/image/test/mochitest/clear2.gif new file mode 100644 index 000000000..00ad873c6 Binary files /dev/null and b/image/test/mochitest/clear2.gif differ diff --git a/image/test/mochitest/damon.jpg b/image/test/mochitest/damon.jpg new file mode 100644 index 000000000..917b33660 Binary files /dev/null and b/image/test/mochitest/damon.jpg differ diff --git a/image/test/mochitest/error-early.png b/image/test/mochitest/error-early.png new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/image/test/mochitest/error-early.png @@ -0,0 +1 @@ +ERROR diff --git a/image/test/mochitest/filter-final.svg b/image/test/mochitest/filter-final.svg new file mode 100644 index 000000000..b2b3dca00 --- /dev/null +++ b/image/test/mochitest/filter-final.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/image/test/mochitest/filter.svg b/image/test/mochitest/filter.svg new file mode 100644 index 000000000..e185f15b6 --- /dev/null +++ b/image/test/mochitest/filter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/image/test/mochitest/first-frame-padding.gif b/image/test/mochitest/first-frame-padding.gif new file mode 100644 index 000000000..e6d7c4932 Binary files /dev/null and b/image/test/mochitest/first-frame-padding.gif differ diff --git a/image/test/mochitest/green-background.html b/image/test/mochitest/green-background.html new file mode 100644 index 000000000..afc3c206e --- /dev/null +++ b/image/test/mochitest/green-background.html @@ -0,0 +1,28 @@ + + + +Background color wrapper for clear image tests + + + + + + + diff --git a/image/test/mochitest/green.png b/image/test/mochitest/green.png new file mode 100644 index 000000000..7df25f33b Binary files /dev/null and b/image/test/mochitest/green.png differ diff --git a/image/test/mochitest/grey.png b/image/test/mochitest/grey.png new file mode 100644 index 000000000..5c82cdeb1 Binary files /dev/null and b/image/test/mochitest/grey.png differ diff --git a/image/test/mochitest/ico-bmp-opaque.ico b/image/test/mochitest/ico-bmp-opaque.ico new file mode 100644 index 000000000..3cf3320ea Binary files /dev/null and b/image/test/mochitest/ico-bmp-opaque.ico differ diff --git a/image/test/mochitest/ico-bmp-transparent.ico b/image/test/mochitest/ico-bmp-transparent.ico new file mode 100644 index 000000000..151b7cb36 Binary files /dev/null and b/image/test/mochitest/ico-bmp-transparent.ico differ diff --git a/image/test/mochitest/iframe.html b/image/test/mochitest/iframe.html new file mode 100644 index 000000000..6d66557ef --- /dev/null +++ b/image/test/mochitest/iframe.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/image/test/mochitest/imgutils.js b/image/test/mochitest/imgutils.js new file mode 100644 index 000000000..ab9c478df --- /dev/null +++ b/image/test/mochitest/imgutils.js @@ -0,0 +1,138 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +// Helper file for shared image functionality +// +// Note that this is use by tests elsewhere in the source tree. When in doubt, +// check mxr before removing or changing functionality. + +// Helper function to clear both the content and chrome image caches +function clearAllImageCaches() +{ + var tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"] + .getService(SpecialPowers.Ci.imgITools); + var imageCache = tools.getImgCacheForDocument(window.document); + imageCache.clearCache(true); // true=chrome + imageCache.clearCache(false); // false=content +} + +// Helper function to clear the image cache of content images +function clearImageCache() +{ + var tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"] + .getService(SpecialPowers.Ci.imgITools); + var imageCache = tools.getImgCacheForDocument(window.document); + imageCache.clearCache(false); // true=chrome, false=content +} + +// Helper function to determine if the frame is decoded for a given image id +function isFrameDecoded(id) +{ + return (getImageStatus(id) & + SpecialPowers.Ci.imgIRequest.STATUS_FRAME_COMPLETE) + ? true : false; +} + +// Helper function to determine if the image is loaded for a given image id +function isImageLoaded(id) +{ + return (getImageStatus(id) & + SpecialPowers.Ci.imgIRequest.STATUS_LOAD_COMPLETE) + ? true : false; +} + +// Helper function to get the status flags of an image +function getImageStatus(id) +{ + // Get the image + var img = SpecialPowers.wrap(document.getElementById(id)); + + // QI the image to nsImageLoadingContent + img.QueryInterface(SpecialPowers.Ci.nsIImageLoadingContent); + + // Get the request + var request = img.getRequest(SpecialPowers.Ci + .nsIImageLoadingContent + .CURRENT_REQUEST); + + // Return the status + return request.imageStatus; +} + +// Forces a synchronous decode of an image by drawing it to a canvas. Only +// really meaningful if the image is fully loaded first +function forceDecode(id) +{ + // Get the image + var img = document.getElementById(id); + + // Make a new canvas + var canvas = document.createElement("canvas"); + + // Draw the image to the canvas. This forces a synchronous decode + var ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); +} + + +// Functions to facilitate getting/setting various image-related prefs +// +// If you change a pref in a mochitest, Don't forget to reset it to its +// original value! +// +// Null indicates no pref set + +const DISCARD_ENABLED_PREF = {name: "discardable", branch: "image.mem.", type: "bool"}; +const DECODEONDRAW_ENABLED_PREF = {name: "decodeondraw", branch: "image.mem.", type: "bool"}; +const DISCARD_TIMEOUT_PREF = {name: "min_discard_timeout_ms", branch: "image.mem.", type: "int"}; + +function setImagePref(pref, val) +{ + var prefService = SpecialPowers.Cc["@mozilla.org/preferences-service;1"] + .getService(SpecialPowers.Ci.nsIPrefService); + var branch = prefService.getBranch(pref.branch); + if (val != null) { + switch(pref.type) { + case "bool": + branch.setBoolPref(pref.name, val); + break; + case "int": + branch.setIntPref(pref.name, val); + break; + default: + throw new Error("Unknown pref type"); + } + } + else if (branch.prefHasUserValue(pref.name)) + branch.clearUserPref(pref.name); +} + +function getImagePref(pref) +{ + var prefService = SpecialPowers.Cc["@mozilla.org/preferences-service;1"] + .getService(SpecialPowers.Ci.nsIPrefService); + var branch = prefService.getBranch(pref.branch); + if (branch.prefHasUserValue(pref.name)) { + switch (pref.type) { + case "bool": + return branch.getBoolPref(pref.name); + case "int": + return branch.getIntPref(pref.name); + default: + throw new Error("Unknown pref type"); + } + } + else + return null; +} + +// JS implementation of imgIScriptedNotificationObserver with stubs for all of its methods. +function ImageDecoderObserverStub() +{ + this.sizeAvailable = function sizeAvailable(aRequest) {} + this.frameComplete = function frameComplete(aRequest) {} + this.decodeComplete = function decodeComplete(aRequest) {} + this.loadComplete = function loadComplete(aRequest) {} + this.frameUpdate = function frameUpdate(aRequest) {} + this.discard = function discard(aRequest) {} + this.isAnimated = function isAnimated(aRequest) {} + this.hasTransparency = function hasTransparency(aRequest) {} +} diff --git a/image/test/mochitest/invalid.jpg b/image/test/mochitest/invalid.jpg new file mode 100644 index 000000000..c677a81e2 --- /dev/null +++ b/image/test/mochitest/invalid.jpg @@ -0,0 +1 @@ +notajpg diff --git a/image/test/mochitest/keep.gif b/image/test/mochitest/keep.gif new file mode 100644 index 000000000..e967d6a6d Binary files /dev/null and b/image/test/mochitest/keep.gif differ diff --git a/image/test/mochitest/keep.png b/image/test/mochitest/keep.png new file mode 100644 index 000000000..aa3ff7445 Binary files /dev/null and b/image/test/mochitest/keep.png differ diff --git a/image/test/mochitest/lime-anim-100x100-2.svg b/image/test/mochitest/lime-anim-100x100-2.svg new file mode 100644 index 000000000..d19d3b0e7 --- /dev/null +++ b/image/test/mochitest/lime-anim-100x100-2.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/image/test/mochitest/lime-anim-100x100.svg b/image/test/mochitest/lime-anim-100x100.svg new file mode 100644 index 000000000..c6584047d --- /dev/null +++ b/image/test/mochitest/lime-anim-100x100.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/image/test/mochitest/lime-css-anim-100x100.svg b/image/test/mochitest/lime-css-anim-100x100.svg new file mode 100644 index 000000000..3edbd3eaa --- /dev/null +++ b/image/test/mochitest/lime-css-anim-100x100.svg @@ -0,0 +1,19 @@ + + + + + + + diff --git a/image/test/mochitest/lime100x100.svg b/image/test/mochitest/lime100x100.svg new file mode 100644 index 000000000..8bdec62c1 --- /dev/null +++ b/image/test/mochitest/lime100x100.svg @@ -0,0 +1,4 @@ + + + diff --git a/image/test/mochitest/mochitest.ini b/image/test/mochitest/mochitest.ini new file mode 100644 index 000000000..e65de9d9e --- /dev/null +++ b/image/test/mochitest/mochitest.ini @@ -0,0 +1,158 @@ +[DEFAULT] +support-files = + INT32_MIN.bmp + animated1.gif + animated2.gif + animated-gif.gif + animated-gif2.gif + animated-gif_trailing-garbage.gif + animated-gif-finalframe.gif + animation.svg + animationPolling.js + bad.jpg + big.png + blue.gif + blue.png + bug399925.gif + bug468160.sjs + bug478398_ONLY.png + bug490949-iframe.html + bug490949.sjs + bug496292-1.sjs + bug496292-2.sjs + bug496292-iframe-1.html + bug496292-iframe-2.html + bug496292-iframe-ref.html + bug497665-iframe.html + bug497665.sjs + bug552605.sjs + bug657191.sjs + bug671906-iframe.html + bug671906.sjs + bug733553-informant.sjs + bug733553.sjs + bug767779.sjs + bug89419-iframe.html + bug89419.sjs + bug900200.png + bug900200-ref.png + bug1132427.html + bug1132427.gif + bug1180105.sjs + bug1180105-waiter.sjs + bug1217571-iframe.html + bug1319025.png + bug1319025-ref.png + clear.gif + clear.png + clear2.gif + clear2-results.gif + damon.jpg + error-early.png + filter-final.svg + filter.svg + first-frame-padding.gif + green.png + green-background.html + grey.png + ico-bmp-opaque.ico + ico-bmp-transparent.ico + iframe.html + imgutils.js + invalid.jpg + keep.gif + keep.png + lime100x100.svg + lime-anim-100x100.svg + lime-anim-100x100-2.svg + lime-css-anim-100x100.svg + opaque.bmp + purple.gif + red.gif + red.png + ref-iframe.html + restore-previous.gif + restore-previous.png + rillybad.jpg + schrep.png + shaver.png + short_header.gif + source.png + transparent.gif + transparent.png + over.png + webcam-simulacrum.sjs + 6M-pixels.png + 12M-pixels-1.png + 12M-pixels-2.png + +[test_animation.html] +skip-if = os == 'android' +[test_animation_operators.html] +[test_animation2.html] +skip-if = os == 'android' +[test_animSVGImage.html] +skip-if = os == 'android' +[test_animSVGImage2.html] +skip-if = os == 'android' +[test_background_image_anim.html] +skip-if = os == 'android' +[test_bug399925.html] +[test_bug435296.html] +skip-if = true # disabled - See bug 578591 +[test_bug466586.html] +[test_bug468160.html] +[test_bug478398.html] +skip-if = true # disabled - See bug 579139 +[test_bug490949.html] +[test_bug496292.html] +[test_bug497665.html] +[test_bug552605-1.html] +[test_bug552605-2.html] +[test_bug553982.html] +[test_bug601470.html] +[test_bug614392.html] +[test_bug657191.html] +[test_bug671906.html] +[test_bug733553.html] +[test_bug767779.html] +[test_bug865919.html] +[test_bug89419-1.html] +[test_bug89419-2.html] +[test_bug1132427.html] +skip-if = os == 'android' +[test_bug1180105.html] +[test_bug1217571.html] +[test_bullet_animation.html] +skip-if = os == 'android' +[test_changeOfSource.html] +skip-if = os == 'android' +[test_changeOfSource2.html] +skip-if = os == 'android' +[test_drawDiscardedImage.html] +[test_error_events.html] +[test_image_crossorigin_data_url.html] +[test_ImageContentLoaded.html] +[test_has_transparency.html] +skip-if = os == 'android' +[test_net_failedtoprocess.html] +skip-if = os == 'android' +[test_removal_ondecode.html] +skip-if = os == 'android' +[test_removal_onload.html] +skip-if = os == 'android' +[test_short_gif_header.html] +[test_staticClone.html] +skip-if = os == 'android' +[test_svg_animatedGIF.html] +skip-if = os == 'android' +[test_svg_filter_animation.html] +skip-if = os == 'android' +[test_synchronized_animation.html] +#skip-if = os == 'android' +disabled = bug 1295501 +[test_undisplayed_iframe.html] +skip-if = os == 'android' +[test_webcam.html] +[test_xultree_animation.xhtml] +skip-if = os == 'android' diff --git a/image/test/mochitest/opaque.bmp b/image/test/mochitest/opaque.bmp new file mode 100644 index 000000000..63d3f1c05 Binary files /dev/null and b/image/test/mochitest/opaque.bmp differ diff --git a/image/test/mochitest/over.png b/image/test/mochitest/over.png new file mode 100644 index 000000000..9e957182f Binary files /dev/null and b/image/test/mochitest/over.png differ diff --git a/image/test/mochitest/purple.gif b/image/test/mochitest/purple.gif new file mode 100644 index 000000000..79826af20 Binary files /dev/null and b/image/test/mochitest/purple.gif differ diff --git a/image/test/mochitest/red.gif b/image/test/mochitest/red.gif new file mode 100644 index 000000000..d3c32bae2 Binary files /dev/null and b/image/test/mochitest/red.gif differ diff --git a/image/test/mochitest/red.png b/image/test/mochitest/red.png new file mode 100644 index 000000000..aa9ce2526 Binary files /dev/null and b/image/test/mochitest/red.png differ diff --git a/image/test/mochitest/ref-iframe.html b/image/test/mochitest/ref-iframe.html new file mode 100644 index 000000000..585772c8a --- /dev/null +++ b/image/test/mochitest/ref-iframe.html @@ -0,0 +1,6 @@ + + +
+ + diff --git a/image/test/mochitest/restore-previous.gif b/image/test/mochitest/restore-previous.gif new file mode 100644 index 000000000..15ba9ddc4 Binary files /dev/null and b/image/test/mochitest/restore-previous.gif differ diff --git a/image/test/mochitest/restore-previous.png b/image/test/mochitest/restore-previous.png new file mode 100644 index 000000000..09dee6382 Binary files /dev/null and b/image/test/mochitest/restore-previous.png differ diff --git a/image/test/mochitest/rillybad.jpg b/image/test/mochitest/rillybad.jpg new file mode 100644 index 000000000..e2fb1d303 Binary files /dev/null and b/image/test/mochitest/rillybad.jpg differ diff --git a/image/test/mochitest/schrep.png b/image/test/mochitest/schrep.png new file mode 100644 index 000000000..bcb406387 Binary files /dev/null and b/image/test/mochitest/schrep.png differ diff --git a/image/test/mochitest/shaver.png b/image/test/mochitest/shaver.png new file mode 100644 index 000000000..ab0b6c7b4 Binary files /dev/null and b/image/test/mochitest/shaver.png differ diff --git a/image/test/mochitest/short_header.gif b/image/test/mochitest/short_header.gif new file mode 100644 index 000000000..70af95ac6 Binary files /dev/null and b/image/test/mochitest/short_header.gif differ diff --git a/image/test/mochitest/source.png b/image/test/mochitest/source.png new file mode 100644 index 000000000..df1c76dae Binary files /dev/null and b/image/test/mochitest/source.png differ diff --git a/image/test/mochitest/test_ImageContentLoaded.html b/image/test/mochitest/test_ImageContentLoaded.html new file mode 100644 index 000000000..38d3238a1 --- /dev/null +++ b/image/test/mochitest/test_ImageContentLoaded.html @@ -0,0 +1,28 @@ + + + + +Test for Bug 691610 + + + + + + + diff --git a/image/test/mochitest/test_animSVGImage.html b/image/test/mochitest/test_animSVGImage.html new file mode 100644 index 000000000..9515472d5 --- /dev/null +++ b/image/test/mochitest/test_animSVGImage.html @@ -0,0 +1,122 @@ + + + + + Test for Bug 610419 + + + + + + +Mozilla Bug 610419 +

+
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animSVGImage2.html b/image/test/mochitest/test_animSVGImage2.html new file mode 100644 index 000000000..5f3bbfde8 --- /dev/null +++ b/image/test/mochitest/test_animSVGImage2.html @@ -0,0 +1,124 @@ + + + + + Test for Bug 907503 + + + + + + +Mozilla Bug 907503 +

+
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animation.html b/image/test/mochitest/test_animation.html new file mode 100644 index 000000000..e144323fd --- /dev/null +++ b/image/test/mochitest/test_animation.html @@ -0,0 +1,45 @@ + + + + + Test for Bug 666446 - General Animated GIF Test + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+ +
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animation2.html b/image/test/mochitest/test_animation2.html new file mode 100644 index 000000000..c53817a0a --- /dev/null +++ b/image/test/mochitest/test_animation2.html @@ -0,0 +1,49 @@ + + + + + Test for Bug 705580 - General Animated GIF Test 2 + + + + + + + + +Mozilla Bug 705580: Test animated GIFs that are converted to ImageLayers + +

+ +
+ +
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animation_operators.html b/image/test/mochitest/test_animation_operators.html new file mode 100644 index 000000000..a03088b12 --- /dev/null +++ b/image/test/mochitest/test_animation_operators.html @@ -0,0 +1,159 @@ + + + + + Test for Bug 936720 + + + + + +Mozilla Bug 936720 +
+
+
+ + diff --git a/image/test/mochitest/test_background_image_anim.html b/image/test/mochitest/test_background_image_anim.html new file mode 100644 index 000000000..957166e82 --- /dev/null +++ b/image/test/mochitest/test_background_image_anim.html @@ -0,0 +1,44 @@ + + + + + Test for Bug 666446 - Animated Background Images + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+
+
+ +
+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug1132427.html b/image/test/mochitest/test_bug1132427.html new file mode 100644 index 000000000..ceb01179e --- /dev/null +++ b/image/test/mochitest/test_bug1132427.html @@ -0,0 +1,96 @@ + + + + Test for scrolling selection into view + + + + + + +
+
+
+ + + diff --git a/image/test/mochitest/test_bug1180105.html b/image/test/mochitest/test_bug1180105.html new file mode 100644 index 000000000..1691b621c --- /dev/null +++ b/image/test/mochitest/test_bug1180105.html @@ -0,0 +1,46 @@ + + + + + Test for Bug 1180105 + + + + + +Mozilla Bug 1180105 +

+
+
+
+
> + +
+ + diff --git a/image/test/mochitest/test_bug1217571.html b/image/test/mochitest/test_bug1217571.html new file mode 100644 index 000000000..db24096e1 --- /dev/null +++ b/image/test/mochitest/test_bug1217571.html @@ -0,0 +1,44 @@ + + + + + Test for Bug 1217571 + + + + +Mozilla Bug 1217571 +

+ + +
+
+
+ + diff --git a/image/test/mochitest/test_bug399925.html b/image/test/mochitest/test_bug399925.html new file mode 100644 index 000000000..1d9bdb14c --- /dev/null +++ b/image/test/mochitest/test_bug399925.html @@ -0,0 +1,105 @@ + + + + + Test for Bug 399925 + + + + + +Mozilla Bug 399925 +

+ +
+
+
+ + + diff --git a/image/test/mochitest/test_bug415761.html b/image/test/mochitest/test_bug415761.html new file mode 100644 index 000000000..3799cd80c --- /dev/null +++ b/image/test/mochitest/test_bug415761.html @@ -0,0 +1,98 @@ + + + + Test for icon filenames + + + + + + +
+
+
+ + + + diff --git a/image/test/mochitest/test_bug435296.html b/image/test/mochitest/test_bug435296.html new file mode 100644 index 000000000..de24538dc --- /dev/null +++ b/image/test/mochitest/test_bug435296.html @@ -0,0 +1,81 @@ + + + + + Test for Bug 435296 + + + + + + +Mozilla Bug 435296 + +
+
+
+ + diff --git a/image/test/mochitest/test_bug466586.html b/image/test/mochitest/test_bug466586.html new file mode 100644 index 000000000..cf34bb783 --- /dev/null +++ b/image/test/mochitest/test_bug466586.html @@ -0,0 +1,58 @@ + + + + + Test for Bug 466586 + + + + + +Mozilla Bug 466586 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug468160.html b/image/test/mochitest/test_bug468160.html new file mode 100644 index 000000000..322216cb2 --- /dev/null +++ b/image/test/mochitest/test_bug468160.html @@ -0,0 +1,29 @@ + + + + + Test for Bug 468160 + + + + +Mozilla Bug 468160 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug478398.html b/image/test/mochitest/test_bug478398.html new file mode 100644 index 000000000..a583f93a8 --- /dev/null +++ b/image/test/mochitest/test_bug478398.html @@ -0,0 +1,85 @@ + + + + + Test for Bug 478398 + + + + + +Mozilla Bug 478398 +
+
+
+ + + diff --git a/image/test/mochitest/test_bug490949.html b/image/test/mochitest/test_bug490949.html new file mode 100644 index 000000000..8bf3ba0c0 --- /dev/null +++ b/image/test/mochitest/test_bug490949.html @@ -0,0 +1,112 @@ + + + + + Test for Bug 490949 + + + + + +Mozilla Bug 490949 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug496292.html b/image/test/mochitest/test_bug496292.html new file mode 100644 index 000000000..299480106 --- /dev/null +++ b/image/test/mochitest/test_bug496292.html @@ -0,0 +1,130 @@ + + + + + Test for Bug 496292 + + + + + +Mozilla Bug 496292 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug497665.html b/image/test/mochitest/test_bug497665.html new file mode 100644 index 000000000..3a72c0912 --- /dev/null +++ b/image/test/mochitest/test_bug497665.html @@ -0,0 +1,92 @@ + + + + + Test for Bug 497665 + + + + + +Mozilla Bug 497665 +

+
+
+
+
+ + +
+ + diff --git a/image/test/mochitest/test_bug552605-1.html b/image/test/mochitest/test_bug552605-1.html new file mode 100644 index 000000000..19783711c --- /dev/null +++ b/image/test/mochitest/test_bug552605-1.html @@ -0,0 +1,56 @@ + + + + + Test for Bug 552605 + + + + + + +Mozilla Bug 552605 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug552605-2.html b/image/test/mochitest/test_bug552605-2.html new file mode 100644 index 000000000..4ad1c61b2 --- /dev/null +++ b/image/test/mochitest/test_bug552605-2.html @@ -0,0 +1,53 @@ + + + + + Test for Bug 552605 + + + + + + +Mozilla Bug 552605 +

+
+
+
+
+ + +
+ + diff --git a/image/test/mochitest/test_bug553982.html b/image/test/mochitest/test_bug553982.html new file mode 100644 index 000000000..01314ba00 --- /dev/null +++ b/image/test/mochitest/test_bug553982.html @@ -0,0 +1,39 @@ + + + + + Test for Bug 553982 + + + + + +Mozilla Bug 553982 +
+
+
+ + + diff --git a/image/test/mochitest/test_bug601470.html b/image/test/mochitest/test_bug601470.html new file mode 100644 index 000000000..a9e1cc788 --- /dev/null +++ b/image/test/mochitest/test_bug601470.html @@ -0,0 +1,45 @@ + + + + + Test for Bug 601470 + + + + +Mozilla Bug 601470 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug614392.html b/image/test/mochitest/test_bug614392.html new file mode 100644 index 000000000..4cec54a05 --- /dev/null +++ b/image/test/mochitest/test_bug614392.html @@ -0,0 +1,43 @@ + + + + + Test for Bug 614392 + + + + +Mozilla Bug 614392 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug657191.html b/image/test/mochitest/test_bug657191.html new file mode 100644 index 000000000..ccc4fd7bc --- /dev/null +++ b/image/test/mochitest/test_bug657191.html @@ -0,0 +1,34 @@ + + + + + Test for Bug 657191 + + + + + +Mozilla Bug 657191 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug671906.html b/image/test/mochitest/test_bug671906.html new file mode 100644 index 000000000..e3cd8d39f --- /dev/null +++ b/image/test/mochitest/test_bug671906.html @@ -0,0 +1,71 @@ + + + + + Test for Bug 671906 + + + + + + +Mozilla Bug 671906 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug733553.html b/image/test/mochitest/test_bug733553.html new file mode 100644 index 000000000..cd2982593 --- /dev/null +++ b/image/test/mochitest/test_bug733553.html @@ -0,0 +1,92 @@ + + + + + Test for Bug 733553 + + + + + +Mozilla Bug 733553 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug767779.html b/image/test/mochitest/test_bug767779.html new file mode 100644 index 000000000..ba9c93d56 --- /dev/null +++ b/image/test/mochitest/test_bug767779.html @@ -0,0 +1,44 @@ + + + + + Test for Bug 767779 + + + + + + + + +Mozilla Bug 767779 +

+
+
+
+
+
+
+ +
+
+ +
+ + diff --git a/image/test/mochitest/test_bug865919.html b/image/test/mochitest/test_bug865919.html new file mode 100644 index 000000000..6854c609a --- /dev/null +++ b/image/test/mochitest/test_bug865919.html @@ -0,0 +1,53 @@ + + + + + + Test for Bug 865919 + + + + + + + +
+ +
+ + + + diff --git a/image/test/mochitest/test_bug89419-1.html b/image/test/mochitest/test_bug89419-1.html new file mode 100644 index 000000000..96140e66d --- /dev/null +++ b/image/test/mochitest/test_bug89419-1.html @@ -0,0 +1,68 @@ + + + + + Test for Bug 89419 + + + + + + +Mozilla Bug 89419 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug89419-2.html b/image/test/mochitest/test_bug89419-2.html new file mode 100644 index 000000000..9251c0253 --- /dev/null +++ b/image/test/mochitest/test_bug89419-2.html @@ -0,0 +1,68 @@ + + + + + Test for Bug 89419 + + + + + + +Mozilla Bug 89419 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bullet_animation.html b/image/test/mochitest/test_bullet_animation.html new file mode 100644 index 000000000..bbc97cc85 --- /dev/null +++ b/image/test/mochitest/test_bullet_animation.html @@ -0,0 +1,56 @@ + + + + + Test for Bug 666446 - Animated Bullets + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+ +
+ + + +
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_changeOfSource.html b/image/test/mochitest/test_changeOfSource.html new file mode 100644 index 000000000..be0993e56 --- /dev/null +++ b/image/test/mochitest/test_changeOfSource.html @@ -0,0 +1,62 @@ + + + + + Test for Bug 666446 - Change of Source (1st Version) + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+ +
+
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_changeOfSource2.html b/image/test/mochitest/test_changeOfSource2.html new file mode 100644 index 000000000..7f61b0f57 --- /dev/null +++ b/image/test/mochitest/test_changeOfSource2.html @@ -0,0 +1,47 @@ + + + + + Test for Bug 691792 - Change of Source (2nd Version) + + + + + + + + +Mozilla Bug 691792: Change of src attribute for animated gifs no longer works as expected + +

+ +
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_drawDiscardedImage.html b/image/test/mochitest/test_drawDiscardedImage.html new file mode 100644 index 000000000..7c99ba504 --- /dev/null +++ b/image/test/mochitest/test_drawDiscardedImage.html @@ -0,0 +1,85 @@ + + + + + Test for Bug 731419 - Draw an ostensibly discarded image to a canvas + + + + + + + + + + + + + + + + + diff --git a/image/test/mochitest/test_error_events.html b/image/test/mochitest/test_error_events.html new file mode 100644 index 000000000..ac1e0353b --- /dev/null +++ b/image/test/mochitest/test_error_events.html @@ -0,0 +1,67 @@ + + + + + Test for Bug 715308 comment 93 + + + + + + + + + +
+ + +
+ + + + + diff --git a/image/test/mochitest/test_has_transparency.html b/image/test/mochitest/test_has_transparency.html new file mode 100644 index 000000000..ee42e655f --- /dev/null +++ b/image/test/mochitest/test_has_transparency.html @@ -0,0 +1,168 @@ + + + + + Test for Bug 1089880 + + + + + + +Mozilla Bug 1089880 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_image_crossorigin_data_url.html b/image/test/mochitest/test_image_crossorigin_data_url.html new file mode 100644 index 000000000..9facc00d4 --- /dev/null +++ b/image/test/mochitest/test_image_crossorigin_data_url.html @@ -0,0 +1,27 @@ + + +Test for handling of 'crossorigin' attribute on CSS link with data: URL + + +
+
+ + diff --git a/image/test/mochitest/test_net_failedtoprocess.html b/image/test/mochitest/test_net_failedtoprocess.html new file mode 100644 index 000000000..37d179c78 --- /dev/null +++ b/image/test/mochitest/test_net_failedtoprocess.html @@ -0,0 +1,51 @@ + + + + + Test for image net:failed-to-process-uri-content + + + + +

+
+
+ + + diff --git a/image/test/mochitest/test_removal_ondecode.html b/image/test/mochitest/test_removal_ondecode.html new file mode 100644 index 000000000..fd594acf6 --- /dev/null +++ b/image/test/mochitest/test_removal_ondecode.html @@ -0,0 +1,128 @@ + + + + + Test for Bug 841579 + + + + + + +Mozilla Bug 841579 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_removal_onload.html b/image/test/mochitest/test_removal_onload.html new file mode 100644 index 000000000..fbfe62905 --- /dev/null +++ b/image/test/mochitest/test_removal_onload.html @@ -0,0 +1,128 @@ + + + + + Test for Bug 841579 + + + + + + +Mozilla Bug 841579 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_short_gif_header.html b/image/test/mochitest/test_short_gif_header.html new file mode 100644 index 000000000..13276fb54 --- /dev/null +++ b/image/test/mochitest/test_short_gif_header.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 844684 + + + + + +Mozilla Bug 844684 +
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_staticClone.html b/image/test/mochitest/test_staticClone.html new file mode 100644 index 000000000..0ceb0c0af --- /dev/null +++ b/image/test/mochitest/test_staticClone.html @@ -0,0 +1,41 @@ + + + + + Test for Bug 878037 + + + + +Mozilla Bug 878037 +

+
+ + +
+
+
+
+ + diff --git a/image/test/mochitest/test_svg_animatedGIF.html b/image/test/mochitest/test_svg_animatedGIF.html new file mode 100644 index 000000000..aa9445e00 --- /dev/null +++ b/image/test/mochitest/test_svg_animatedGIF.html @@ -0,0 +1,53 @@ + + + + + Test for Bug 666446 - Animated Raster Images inside of SVG Frames + + + + + + + + + + +

+
+
+ + +
+ +
+
+
+ + diff --git a/image/test/mochitest/test_svg_filter_animation.html b/image/test/mochitest/test_svg_filter_animation.html new file mode 100644 index 000000000..62e579068 --- /dev/null +++ b/image/test/mochitest/test_svg_filter_animation.html @@ -0,0 +1,42 @@ + + + + + Test for Bug 666446 - Animated Images within SVG Filters + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+
+ + +
+ +
+
+
+ + diff --git a/image/test/mochitest/test_synchronized_animation.html b/image/test/mochitest/test_synchronized_animation.html new file mode 100644 index 000000000..01ddd481e --- /dev/null +++ b/image/test/mochitest/test_synchronized_animation.html @@ -0,0 +1,128 @@ + + + + + Test for Bug 867758 + + + + + + +Mozilla Bug 867758 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_undisplayed_iframe.html b/image/test/mochitest/test_undisplayed_iframe.html new file mode 100644 index 000000000..adcdbb92d --- /dev/null +++ b/image/test/mochitest/test_undisplayed_iframe.html @@ -0,0 +1,47 @@ + + + + +Test for Bug 666446 - Test for Animated Gif within IFRAME + + + + + + + + + Mozilla Bug 666446: lots of animated gifs swamp us with paint events +

+ +
+ +
+ +
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_webcam.html b/image/test/mochitest/test_webcam.html new file mode 100644 index 000000000..9f9764c24 --- /dev/null +++ b/image/test/mochitest/test_webcam.html @@ -0,0 +1,68 @@ + + + + + Test for Bug 641748 - WebCam Simulacrum + + + + + + + + +Mozilla Bug 641748: GIF decoder doesn't support multipart/x-mixed-replace + +

+ +
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_xultree_animation.xhtml b/image/test/mochitest/test_xultree_animation.xhtml new file mode 100644 index 000000000..ad8ee3f4f --- /dev/null +++ b/image/test/mochitest/test_xultree_animation.xhtml @@ -0,0 +1,67 @@ + + + + + Test for Bug 666446 - Animated Images within SVG Filters + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+
+ + +
+ + + + + + + + + + + + +
+ +
+
+
+ + diff --git a/image/test/mochitest/transparent.gif b/image/test/mochitest/transparent.gif new file mode 100644 index 000000000..48f5c7caf Binary files /dev/null and b/image/test/mochitest/transparent.gif differ diff --git a/image/test/mochitest/transparent.png b/image/test/mochitest/transparent.png new file mode 100644 index 000000000..fc8002053 Binary files /dev/null and b/image/test/mochitest/transparent.png differ diff --git a/image/test/mochitest/webcam-simulacrum.sjs b/image/test/mochitest/webcam-simulacrum.sjs new file mode 100644 index 000000000..23872e675 --- /dev/null +++ b/image/test/mochitest/webcam-simulacrum.sjs @@ -0,0 +1,51 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var counter = 2; +var frames = ['red.gif', 'blue.gif']; +var timer = Components.classes["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Components.interfaces.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) +{ + response.setHeader("Content-Type", + "multipart/x-mixed-replace;boundary=BOUNDARYOMG", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + response.processAsync(); + response.write("--BOUNDARYOMG\r\n"); + while (frames.length > 0) { + sendNextPart(response); + } + response.write("--BOUNDARYOMG--\r\n"); + response.finish(); +} + +function sendNextPart(response) { + var nextPartHead = "Content-Type: image/gif\r\n\r\n"; + var inputStream = getFileAsInputStream(frames.shift()); + response.bodyOutputStream.write(nextPartHead, nextPartHead.length); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + // Toss in the boundary, so the browser can know this part is complete + response.write("--BOUNDARYOMG\r\n"); +} + diff --git a/image/test/reftest/ImageDocument.css b/image/test/reftest/ImageDocument.css new file mode 100644 index 000000000..b44981098 --- /dev/null +++ b/image/test/reftest/ImageDocument.css @@ -0,0 +1,16 @@ +body { + background-image: url("chrome://global/skin/media/imagedoc-darknoise.png"); + margin: 0; +} + +body > :first-child { + 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/apng/bug411852-1-ref.png b/image/test/reftest/apng/bug411852-1-ref.png new file mode 100644 index 000000000..04b862a1d Binary files /dev/null and b/image/test/reftest/apng/bug411852-1-ref.png differ diff --git a/image/test/reftest/apng/bug411852-1.png b/image/test/reftest/apng/bug411852-1.png new file mode 100644 index 000000000..643f87e17 Binary files /dev/null and b/image/test/reftest/apng/bug411852-1.png differ diff --git a/image/test/reftest/apng/bug546272-ref.png b/image/test/reftest/apng/bug546272-ref.png new file mode 100644 index 000000000..85dfd8ccf Binary files /dev/null and b/image/test/reftest/apng/bug546272-ref.png differ diff --git a/image/test/reftest/apng/bug546272.png b/image/test/reftest/apng/bug546272.png new file mode 100644 index 000000000..5232d7f8f Binary files /dev/null and b/image/test/reftest/apng/bug546272.png differ diff --git a/image/test/reftest/apng/delaytest.html b/image/test/reftest/apng/delaytest.html new file mode 100644 index 000000000..af3937a57 --- /dev/null +++ b/image/test/reftest/apng/delaytest.html @@ -0,0 +1,41 @@ + + + +Delayed image reftest wrapper + + + + + + diff --git a/image/test/reftest/apng/reftest-stylo.list b/image/test/reftest/apng/reftest-stylo.list new file mode 100644 index 000000000..229de2161 --- /dev/null +++ b/image/test/reftest/apng/reftest-stylo.list @@ -0,0 +1,7 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# APNG tests +# +# delaytest.html delays the reftest snapshot to allow time for the +# animation to complete. +random == delaytest.html?bug411852-1.png delaytest.html?bug411852-1.png +random == delaytest.html?bug546272.png delaytest.html?bug546272.png diff --git a/image/test/reftest/apng/reftest.list b/image/test/reftest/apng/reftest.list new file mode 100644 index 000000000..eb1c02462 --- /dev/null +++ b/image/test/reftest/apng/reftest.list @@ -0,0 +1,6 @@ +# APNG tests +# +# delaytest.html delays the reftest snapshot to allow time for the +# animation to complete. +random == delaytest.html?bug411852-1.png bug411852-1-ref.png +random == delaytest.html?bug546272.png bug546272-ref.png diff --git a/image/test/reftest/blob/blob-uri-with-ref-param-notref.html b/image/test/reftest/blob/blob-uri-with-ref-param-notref.html new file mode 100644 index 000000000..3b62a3c13 --- /dev/null +++ b/image/test/reftest/blob/blob-uri-with-ref-param-notref.html @@ -0,0 +1,41 @@ + + + + + + + + + + + diff --git a/image/test/reftest/blob/blob-uri-with-ref-param.html b/image/test/reftest/blob/blob-uri-with-ref-param.html new file mode 100644 index 000000000..8f2e4e7cf --- /dev/null +++ b/image/test/reftest/blob/blob-uri-with-ref-param.html @@ -0,0 +1,40 @@ + + + + + + + + + + + diff --git a/image/test/reftest/blob/image.png b/image/test/reftest/blob/image.png new file mode 100644 index 000000000..d7d87adce Binary files /dev/null and b/image/test/reftest/blob/image.png differ diff --git a/image/test/reftest/blob/reftest-stylo.list b/image/test/reftest/blob/reftest-stylo.list new file mode 100644 index 000000000..06f01ef7f --- /dev/null +++ b/image/test/reftest/blob/reftest-stylo.list @@ -0,0 +1,8 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# Blob URI tests + +# Test that blob URIs don't get merged if they have different ref params. +# (We run the test twice to check both cached and non-cached cases.) +default-preferences pref(image.mozsamplesize.enabled,true) +== blob-uri-with-ref-param.html blob-uri-with-ref-param.html +== blob-uri-with-ref-param.html blob-uri-with-ref-param.html diff --git a/image/test/reftest/blob/reftest.list b/image/test/reftest/blob/reftest.list new file mode 100644 index 000000000..e795ba9d3 --- /dev/null +++ b/image/test/reftest/blob/reftest.list @@ -0,0 +1,7 @@ +# Blob URI tests + +# Test that blob URIs don't get merged if they have different ref params. +# (We run the test twice to check both cached and non-cached cases.) +default-preferences pref(image.mozsamplesize.enabled,true) +!= blob-uri-with-ref-param.html blob-uri-with-ref-param-notref.html +!= blob-uri-with-ref-param.html blob-uri-with-ref-param-notref.html diff --git a/image/test/reftest/bmp/1240629-1.bmp b/image/test/reftest/bmp/1240629-1.bmp new file mode 100644 index 000000000..604d248e7 Binary files /dev/null and b/image/test/reftest/bmp/1240629-1.bmp differ diff --git a/image/test/reftest/bmp/1240629-2.bmp b/image/test/reftest/bmp/1240629-2.bmp new file mode 100644 index 000000000..e4fe80d59 Binary files /dev/null and b/image/test/reftest/bmp/1240629-2.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp new file mode 100644 index 000000000..302e0c712 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png new file mode 100644 index 000000000..f9318693d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp new file mode 100644 index 000000000..e769ff864 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png new file mode 100644 index 000000000..956c78ece Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp new file mode 100644 index 000000000..ff012d98c Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png new file mode 100644 index 000000000..90088351f Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp new file mode 100644 index 000000000..86f56476e Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png new file mode 100644 index 000000000..9a294696c Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp new file mode 100644 index 000000000..0f98654d8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico new file mode 100644 index 000000000..5af8bef61 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png new file mode 100644 index 000000000..7a07a124e Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp new file mode 100644 index 000000000..5544c6437 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png new file mode 100644 index 000000000..3b09f8076 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp new file mode 100644 index 000000000..8afcc56cc Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png new file mode 100644 index 000000000..d1fe6ddee Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp new file mode 100644 index 000000000..255e5526c Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png new file mode 100644 index 000000000..078d3dc5d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp new file mode 100644 index 000000000..6d752a2e1 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png new file mode 100644 index 000000000..e64e12b2a Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp new file mode 100644 index 000000000..d4f885687 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png new file mode 100644 index 000000000..b8519a874 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp new file mode 100644 index 000000000..c0b9128fe Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png new file mode 100644 index 000000000..3977b5454 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp new file mode 100644 index 000000000..c02b2288d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png new file mode 100644 index 000000000..caa9246b6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp new file mode 100644 index 000000000..64415c6ec Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png new file mode 100644 index 000000000..30e1b0249 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp new file mode 100644 index 000000000..d8e867a0d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png new file mode 100644 index 000000000..9dbaae84c Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp new file mode 100644 index 000000000..207e84f80 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png new file mode 100644 index 000000000..220138840 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp new file mode 100644 index 000000000..871eb7c0f Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png new file mode 100644 index 000000000..7fe1b548b Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp new file mode 100644 index 000000000..32bfc5e8f Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/reftest-stylo.list b/image/test/reftest/bmp/bmp-1bpp/reftest-stylo.list new file mode 100644 index 000000000..ff10dd811 --- /dev/null +++ b/image/test/reftest/bmp/bmp-1bpp/reftest-stylo.list @@ -0,0 +1,22 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# BMP 1BPP tests + +# Images of various sizes +fails == bmp-size-1x1-1bpp.bmp bmp-size-1x1-1bpp.bmp +fails == bmp-size-2x2-1bpp.bmp bmp-size-2x2-1bpp.bmp +fails == bmp-size-3x3-1bpp.bmp bmp-size-3x3-1bpp.bmp +fails == bmp-size-4x4-1bpp.bmp bmp-size-4x4-1bpp.bmp +fails == bmp-size-5x5-1bpp.bmp bmp-size-5x5-1bpp.bmp +fails == bmp-size-6x6-1bpp.bmp bmp-size-6x6-1bpp.bmp +fails == bmp-size-7x7-1bpp.bmp bmp-size-7x7-1bpp.bmp +fails == bmp-size-8x8-1bpp.bmp bmp-size-8x8-1bpp.bmp +fails == bmp-size-9x9-1bpp.bmp bmp-size-9x9-1bpp.bmp +fails == bmp-size-15x15-1bpp.bmp bmp-size-15x15-1bpp.bmp +fails == bmp-size-16x16-1bpp.bmp bmp-size-16x16-1bpp.bmp +fails == bmp-size-17x17-1bpp.bmp bmp-size-17x17-1bpp.bmp +fails == bmp-size-31x31-1bpp.bmp bmp-size-31x31-1bpp.bmp +fails == bmp-size-32x32-1bpp.bmp bmp-size-32x32-1bpp.bmp +fails == bmp-size-33x33-1bpp.bmp bmp-size-33x33-1bpp.bmp +fails == bmp-not-square-1bpp.bmp bmp-not-square-1bpp.bmp +fails == os2bmp-size-32x32-1bpp.bmp os2bmp-size-32x32-1bpp.bmp +fails == top-to-bottom-16x16-1bpp.bmp top-to-bottom-16x16-1bpp.bmp diff --git a/image/test/reftest/bmp/bmp-1bpp/reftest.list b/image/test/reftest/bmp/bmp-1bpp/reftest.list new file mode 100644 index 000000000..15274c2bc --- /dev/null +++ b/image/test/reftest/bmp/bmp-1bpp/reftest.list @@ -0,0 +1,21 @@ +# BMP 1BPP tests + +# Images of various sizes +== bmp-size-1x1-1bpp.bmp bmp-size-1x1-1bpp.png +== bmp-size-2x2-1bpp.bmp bmp-size-2x2-1bpp.png +== bmp-size-3x3-1bpp.bmp bmp-size-3x3-1bpp.png +== bmp-size-4x4-1bpp.bmp bmp-size-4x4-1bpp.png +== bmp-size-5x5-1bpp.bmp bmp-size-5x5-1bpp.png +== bmp-size-6x6-1bpp.bmp bmp-size-6x6-1bpp.png +== bmp-size-7x7-1bpp.bmp bmp-size-7x7-1bpp.png +== bmp-size-8x8-1bpp.bmp bmp-size-8x8-1bpp.png +== bmp-size-9x9-1bpp.bmp bmp-size-9x9-1bpp.png +== bmp-size-15x15-1bpp.bmp bmp-size-15x15-1bpp.png +== bmp-size-16x16-1bpp.bmp bmp-size-16x16-1bpp.png +== bmp-size-17x17-1bpp.bmp bmp-size-17x17-1bpp.png +== bmp-size-31x31-1bpp.bmp bmp-size-31x31-1bpp.png +== bmp-size-32x32-1bpp.bmp bmp-size-32x32-1bpp.png +== bmp-size-33x33-1bpp.bmp bmp-size-33x33-1bpp.png +== bmp-not-square-1bpp.bmp bmp-not-square-1bpp.png +== os2bmp-size-32x32-1bpp.bmp bmp-size-32x32-1bpp.png +== top-to-bottom-16x16-1bpp.bmp bmp-size-16x16-1bpp.png diff --git a/image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp new file mode 100644 index 000000000..8633ef2aa Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp new file mode 100644 index 000000000..9d1f4de2c Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png new file mode 100644 index 000000000..9b0d16081 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp new file mode 100644 index 000000000..ba029510b Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png new file mode 100644 index 000000000..e1287430d Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp new file mode 100644 index 000000000..f35d70669 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp new file mode 100644 index 000000000..fc576c498 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png new file mode 100644 index 000000000..00fb8e4f3 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp new file mode 100644 index 000000000..db790d50c Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png new file mode 100644 index 000000000..c05f5fef8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp new file mode 100644 index 000000000..19bff3d01 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png new file mode 100644 index 000000000..e512d3f9b Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp new file mode 100644 index 000000000..da11048cb Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png new file mode 100644 index 000000000..e4a864251 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp new file mode 100644 index 000000000..e1631e5fd Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png new file mode 100644 index 000000000..3a6fbe8ee Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp new file mode 100644 index 000000000..d228cf063 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png new file mode 100644 index 000000000..72ef7eb63 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp new file mode 100644 index 000000000..f353f9b6d Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png new file mode 100644 index 000000000..cb42ec4f8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp new file mode 100644 index 000000000..2373435f4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png new file mode 100644 index 000000000..e6afafd89 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp new file mode 100644 index 000000000..a3016fc1a Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png new file mode 100644 index 000000000..a844aff76 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp new file mode 100644 index 000000000..cba1d62cc Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp new file mode 100644 index 000000000..87cd419b4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png new file mode 100644 index 000000000..ab2f89274 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp new file mode 100644 index 000000000..b6f108a04 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png new file mode 100644 index 000000000..fe2ff40a1 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp new file mode 100644 index 000000000..8140b1905 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png new file mode 100644 index 000000000..18ab4b25d Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp new file mode 100644 index 000000000..b75ae62ca Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/reftest-stylo.list b/image/test/reftest/bmp/bmp-24bpp/reftest-stylo.list new file mode 100644 index 000000000..29040bfc5 --- /dev/null +++ b/image/test/reftest/bmp/bmp-24bpp/reftest-stylo.list @@ -0,0 +1,22 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# BMP 24BPP tests + +# Images of various sizes +fails == bmp-size-1x1-24bpp.bmp bmp-size-1x1-24bpp.bmp +fails == bmp-size-2x2-24bpp.bmp bmp-size-2x2-24bpp.bmp +fails == bmp-size-3x3-24bpp.bmp bmp-size-3x3-24bpp.bmp +fails == bmp-size-4x4-24bpp.bmp bmp-size-4x4-24bpp.bmp +fails == bmp-size-5x5-24bpp.bmp bmp-size-5x5-24bpp.bmp +fails == bmp-size-6x6-24bpp.bmp bmp-size-6x6-24bpp.bmp +fails == bmp-size-7x7-24bpp.bmp bmp-size-7x7-24bpp.bmp +fails == bmp-size-8x8-24bpp.bmp bmp-size-8x8-24bpp.bmp +fails == bmp-size-9x9-24bpp.bmp bmp-size-9x9-24bpp.bmp +fails == bmp-size-15x15-24bpp.bmp bmp-size-15x15-24bpp.bmp +fails == bmp-size-16x16-24bpp.bmp bmp-size-16x16-24bpp.bmp +fails == bmp-size-17x17-24bpp.bmp bmp-size-17x17-24bpp.bmp +fails == bmp-size-31x31-24bpp.bmp bmp-size-31x31-24bpp.bmp +fails == bmp-size-32x32-24bpp.bmp bmp-size-32x32-24bpp.bmp +fails == bmp-size-33x33-24bpp.bmp bmp-size-33x33-24bpp.bmp +fails == bmp-not-square-24bpp.bmp bmp-not-square-24bpp.bmp +fails == os2bmp-size-32x32-24bpp.bmp os2bmp-size-32x32-24bpp.bmp +fails == top-to-bottom-16x16-24bpp.bmp top-to-bottom-16x16-24bpp.bmp diff --git a/image/test/reftest/bmp/bmp-24bpp/reftest.list b/image/test/reftest/bmp/bmp-24bpp/reftest.list new file mode 100644 index 000000000..83ec17563 --- /dev/null +++ b/image/test/reftest/bmp/bmp-24bpp/reftest.list @@ -0,0 +1,21 @@ +# BMP 24BPP tests + +# Images of various sizes +== bmp-size-1x1-24bpp.bmp bmp-size-1x1-24bpp.png +== bmp-size-2x2-24bpp.bmp bmp-size-2x2-24bpp.png +== bmp-size-3x3-24bpp.bmp bmp-size-3x3-24bpp.png +== bmp-size-4x4-24bpp.bmp bmp-size-4x4-24bpp.png +== bmp-size-5x5-24bpp.bmp bmp-size-5x5-24bpp.png +== bmp-size-6x6-24bpp.bmp bmp-size-6x6-24bpp.png +== bmp-size-7x7-24bpp.bmp bmp-size-7x7-24bpp.png +== bmp-size-8x8-24bpp.bmp bmp-size-8x8-24bpp.png +== bmp-size-9x9-24bpp.bmp bmp-size-9x9-24bpp.png +== bmp-size-15x15-24bpp.bmp bmp-size-15x15-24bpp.png +== bmp-size-16x16-24bpp.bmp bmp-size-16x16-24bpp.png +== bmp-size-17x17-24bpp.bmp bmp-size-17x17-24bpp.png +== bmp-size-31x31-24bpp.bmp bmp-size-31x31-24bpp.png +== bmp-size-32x32-24bpp.bmp bmp-size-32x32-24bpp.png +== bmp-size-33x33-24bpp.bmp bmp-size-33x33-24bpp.png +== bmp-not-square-24bpp.bmp bmp-not-square-24bpp.png +== os2bmp-size-32x32-24bpp.bmp bmp-size-32x32-24bpp.png +== top-to-bottom-16x16-24bpp.bmp bmp-size-16x16-24bpp.png diff --git a/image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp new file mode 100644 index 000000000..bd18f85d4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp new file mode 100644 index 000000000..f63dd81bd Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png new file mode 100644 index 000000000..7c713c557 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp new file mode 100644 index 000000000..8b586dbfd Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png new file mode 100644 index 000000000..5d4a3f953 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp new file mode 100644 index 000000000..eae432e65 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png new file mode 100644 index 000000000..d45d63f53 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp new file mode 100644 index 000000000..5880c6111 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png new file mode 100644 index 000000000..bf4890329 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp new file mode 100644 index 000000000..2ba68a391 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png new file mode 100644 index 000000000..d41dd645b Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp new file mode 100644 index 000000000..6c6383aa8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png new file mode 100644 index 000000000..b2d605041 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp new file mode 100644 index 000000000..ac440a6d8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png new file mode 100644 index 000000000..cb12a3448 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp new file mode 100644 index 000000000..e4383c473 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png new file mode 100644 index 000000000..58d867d12 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp new file mode 100644 index 000000000..04b2c1d1f Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png new file mode 100644 index 000000000..064fde198 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp new file mode 100644 index 000000000..179dbcfa5 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png new file mode 100644 index 000000000..e34114d5c Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp new file mode 100644 index 000000000..0f57e102e Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png new file mode 100644 index 000000000..3efa55562 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp new file mode 100644 index 000000000..a4efe6660 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png new file mode 100644 index 000000000..02ebf57a5 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp new file mode 100644 index 000000000..f4e1a2918 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png new file mode 100644 index 000000000..1f5769d09 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp new file mode 100644 index 000000000..e7ee1cf20 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png new file mode 100644 index 000000000..59a1b98b5 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp new file mode 100644 index 000000000..aa6959baf Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png new file mode 100644 index 000000000..cf44f5967 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp new file mode 100644 index 000000000..65ec12a37 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png new file mode 100644 index 000000000..2e0736413 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp new file mode 100644 index 000000000..08fc30d5f Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/reftest-stylo.list b/image/test/reftest/bmp/bmp-4bpp/reftest-stylo.list new file mode 100644 index 000000000..229f1c0d6 --- /dev/null +++ b/image/test/reftest/bmp/bmp-4bpp/reftest-stylo.list @@ -0,0 +1,25 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# BMP 4BPP tests + +# Images of various sizes +fails == bmp-size-1x1-4bpp.bmp bmp-size-1x1-4bpp.bmp +fails == bmp-size-2x2-4bpp.bmp bmp-size-2x2-4bpp.bmp +fails == bmp-size-3x3-4bpp.bmp bmp-size-3x3-4bpp.bmp +fails == bmp-size-4x4-4bpp.bmp bmp-size-4x4-4bpp.bmp +fails == bmp-size-5x5-4bpp.bmp bmp-size-5x5-4bpp.bmp +fails == bmp-size-6x6-4bpp.bmp bmp-size-6x6-4bpp.bmp +fails == bmp-size-7x7-4bpp.bmp bmp-size-7x7-4bpp.bmp +fails == bmp-size-8x8-4bpp.bmp bmp-size-8x8-4bpp.bmp +fails == bmp-size-9x9-4bpp.bmp bmp-size-9x9-4bpp.bmp +fails == bmp-size-15x15-4bpp.bmp bmp-size-15x15-4bpp.bmp +skip == bmp-size-16x16-4bpp.bmp bmp-size-16x16-4bpp.bmp +fails == bmp-size-17x17-4bpp.bmp bmp-size-17x17-4bpp.bmp +fails == bmp-size-31x31-4bpp.bmp bmp-size-31x31-4bpp.bmp +fails == bmp-size-32x32-4bpp.bmp bmp-size-32x32-4bpp.bmp +fails == bmp-size-33x33-4bpp.bmp bmp-size-33x33-4bpp.bmp +fails == bmp-not-square-4bpp.bmp bmp-not-square-4bpp.bmp +fails == os2bmp-size-32x32-4bpp.bmp os2bmp-size-32x32-4bpp.bmp +fails == top-to-bottom-16x16-4bpp.bmp top-to-bottom-16x16-4bpp.bmp +# test that delta skips are drawn as transparent +# taken from http://bmptestsuite.sourceforge.net/ +== rle4-delta-320x240.bmp rle4-delta-320x240.bmp diff --git a/image/test/reftest/bmp/bmp-4bpp/reftest.list b/image/test/reftest/bmp/bmp-4bpp/reftest.list new file mode 100644 index 000000000..4a1785e86 --- /dev/null +++ b/image/test/reftest/bmp/bmp-4bpp/reftest.list @@ -0,0 +1,24 @@ +# BMP 4BPP tests + +# Images of various sizes +== bmp-size-1x1-4bpp.bmp bmp-size-1x1-4bpp.png +== bmp-size-2x2-4bpp.bmp bmp-size-2x2-4bpp.png +== bmp-size-3x3-4bpp.bmp bmp-size-3x3-4bpp.png +== bmp-size-4x4-4bpp.bmp bmp-size-4x4-4bpp.png +== bmp-size-5x5-4bpp.bmp bmp-size-5x5-4bpp.png +== bmp-size-6x6-4bpp.bmp bmp-size-6x6-4bpp.png +== bmp-size-7x7-4bpp.bmp bmp-size-7x7-4bpp.png +== bmp-size-8x8-4bpp.bmp bmp-size-8x8-4bpp.png +== bmp-size-9x9-4bpp.bmp bmp-size-9x9-4bpp.png +== bmp-size-15x15-4bpp.bmp bmp-size-15x15-4bpp.png +== bmp-size-16x16-4bpp.bmp bmp-size-16x16-4bpp.png +== bmp-size-17x17-4bpp.bmp bmp-size-17x17-4bpp.png +== bmp-size-31x31-4bpp.bmp bmp-size-31x31-4bpp.png +== bmp-size-32x32-4bpp.bmp bmp-size-32x32-4bpp.png +== bmp-size-33x33-4bpp.bmp bmp-size-33x33-4bpp.png +== bmp-not-square-4bpp.bmp bmp-not-square-4bpp.png +== os2bmp-size-32x32-4bpp.bmp bmp-size-32x32-4bpp.png +== top-to-bottom-16x16-4bpp.bmp bmp-size-16x16-4bpp.png +# test that delta skips are drawn as transparent +# taken from http://bmptestsuite.sourceforge.net/ +== rle4-delta-320x240.bmp rle4-delta-320x240.png diff --git a/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp new file mode 100644 index 000000000..78a092787 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png new file mode 100644 index 000000000..f9a3ceae2 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp new file mode 100644 index 000000000..c77696b32 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp new file mode 100644 index 000000000..d7a99164c Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png new file mode 100644 index 000000000..be45f19d5 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp new file mode 100644 index 000000000..8dac8ec86 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png new file mode 100644 index 000000000..ce0055305 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp new file mode 100644 index 000000000..bb60249ac Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png new file mode 100644 index 000000000..6a2394618 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp new file mode 100644 index 000000000..b81788851 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png new file mode 100644 index 000000000..494cd96cd Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp new file mode 100644 index 000000000..9f3ef5136 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png new file mode 100644 index 000000000..a7553a73f Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp new file mode 100644 index 000000000..63d3f1c05 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png new file mode 100644 index 000000000..17257e992 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp new file mode 100644 index 000000000..e4fd01fe0 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png new file mode 100644 index 000000000..d43ac8390 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp new file mode 100644 index 000000000..d2f800d67 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png new file mode 100644 index 000000000..03642849a Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp new file mode 100644 index 000000000..19b0744db Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png new file mode 100644 index 000000000..078b56df0 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp new file mode 100644 index 000000000..9f15f3583 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png new file mode 100644 index 000000000..ba34b2601 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp new file mode 100644 index 000000000..1ad7a8de1 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png new file mode 100644 index 000000000..ecf9e5e79 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp new file mode 100644 index 000000000..6eb759d06 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png new file mode 100644 index 000000000..1a440a16b Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp new file mode 100644 index 000000000..a1e0e2415 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png new file mode 100644 index 000000000..e0ac1a8f6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp new file mode 100644 index 000000000..25c59d735 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png new file mode 100644 index 000000000..51c764265 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp new file mode 100644 index 000000000..ff5b7681c Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png new file mode 100644 index 000000000..77dc7782e Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp new file mode 100644 index 000000000..006961628 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png new file mode 100644 index 000000000..93914c3e1 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp new file mode 100644 index 000000000..b6df221e1 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/reftest-stylo.list b/image/test/reftest/bmp/bmp-8bpp/reftest-stylo.list new file mode 100644 index 000000000..237517976 --- /dev/null +++ b/image/test/reftest/bmp/bmp-8bpp/reftest-stylo.list @@ -0,0 +1,25 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# BMP 8BPP tests + +# Images of various sizes +fails == bmp-size-1x1-8bpp.bmp bmp-size-1x1-8bpp.bmp +fails == bmp-size-2x2-8bpp.bmp bmp-size-2x2-8bpp.bmp +fails == bmp-size-3x3-8bpp.bmp bmp-size-3x3-8bpp.bmp +fails == bmp-size-4x4-8bpp.bmp bmp-size-4x4-8bpp.bmp +fails == bmp-size-5x5-8bpp.bmp bmp-size-5x5-8bpp.bmp +fails == bmp-size-6x6-8bpp.bmp bmp-size-6x6-8bpp.bmp +fails == bmp-size-7x7-8bpp.bmp bmp-size-7x7-8bpp.bmp +fails == bmp-size-8x8-8bpp.bmp bmp-size-8x8-8bpp.bmp +fails == bmp-size-9x9-8bpp.bmp bmp-size-9x9-8bpp.bmp +fails == bmp-size-15x15-8bpp.bmp bmp-size-15x15-8bpp.bmp +fails == bmp-size-16x16-8bpp.bmp bmp-size-16x16-8bpp.bmp +fails == bmp-size-17x17-8bpp.bmp bmp-size-17x17-8bpp.bmp +fails == bmp-size-31x31-8bpp.bmp bmp-size-31x31-8bpp.bmp +fails == bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.bmp +fails == bmp-size-33x33-8bpp.bmp bmp-size-33x33-8bpp.bmp +fails == bmp-not-square-8bpp.bmp bmp-not-square-8bpp.bmp +random == rle-bmp-not-square-8bpp.bmp rle-bmp-not-square-8bpp.bmp +fails == os2-bmp-size-32x32-8bpp.bmp os2-bmp-size-32x32-8bpp.bmp +random == rle-bmp-size-32x32-8bpp.bmp rle-bmp-size-32x32-8bpp.bmp +== top-to-bottom-rle-bmp-size-32x32-8bpp.bmp top-to-bottom-rle-bmp-size-32x32-8bpp.bmp +fails == top-to-bottom-16x16-8bpp.bmp top-to-bottom-16x16-8bpp.bmp diff --git a/image/test/reftest/bmp/bmp-8bpp/reftest.list b/image/test/reftest/bmp/bmp-8bpp/reftest.list new file mode 100644 index 000000000..c1f264143 --- /dev/null +++ b/image/test/reftest/bmp/bmp-8bpp/reftest.list @@ -0,0 +1,24 @@ +# BMP 8BPP tests + +# Images of various sizes +== bmp-size-1x1-8bpp.bmp bmp-size-1x1-8bpp.png +== bmp-size-2x2-8bpp.bmp bmp-size-2x2-8bpp.png +== bmp-size-3x3-8bpp.bmp bmp-size-3x3-8bpp.png +== bmp-size-4x4-8bpp.bmp bmp-size-4x4-8bpp.png +== bmp-size-5x5-8bpp.bmp bmp-size-5x5-8bpp.png +== bmp-size-6x6-8bpp.bmp bmp-size-6x6-8bpp.png +== bmp-size-7x7-8bpp.bmp bmp-size-7x7-8bpp.png +== bmp-size-8x8-8bpp.bmp bmp-size-8x8-8bpp.png +== bmp-size-9x9-8bpp.bmp bmp-size-9x9-8bpp.png +== bmp-size-15x15-8bpp.bmp bmp-size-15x15-8bpp.png +== bmp-size-16x16-8bpp.bmp bmp-size-16x16-8bpp.png +== bmp-size-17x17-8bpp.bmp bmp-size-17x17-8bpp.png +== bmp-size-31x31-8bpp.bmp bmp-size-31x31-8bpp.png +== bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== bmp-size-33x33-8bpp.bmp bmp-size-33x33-8bpp.png +== bmp-not-square-8bpp.bmp bmp-not-square-8bpp.png +== rle-bmp-not-square-8bpp.bmp bmp-not-square-8bpp.png +== os2-bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== rle-bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== top-to-bottom-rle-bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== top-to-bottom-16x16-8bpp.bmp bmp-size-16x16-8bpp.png diff --git a/image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp new file mode 100644 index 000000000..8687aab6c Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp new file mode 100644 index 000000000..bd793b6b6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp new file mode 100644 index 000000000..bb60249ac Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp new file mode 100644 index 000000000..396672ea1 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp new file mode 100644 index 000000000..c00dd3fa4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp new file mode 100644 index 000000000..92a722526 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp new file mode 100644 index 000000000..d73c89411 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp new file mode 100644 index 000000000..5a8806454 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp new file mode 100644 index 000000000..aa3134e56 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp new file mode 100644 index 000000000..6eebb5718 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp new file mode 100644 index 000000000..228c5c999 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp b/image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp new file mode 100644 index 000000000..af4678a28 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/reftest-stylo.list b/image/test/reftest/bmp/bmp-corrupted/reftest-stylo.list new file mode 100644 index 000000000..bb776a7af --- /dev/null +++ b/image/test/reftest/bmp/bmp-corrupted/reftest-stylo.list @@ -0,0 +1,19 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# Corrupted BMP tests + +skip == wrapper.html?invalid-signature.bmp wrapper.html?invalid-signature.bmp +skip == wrapper.html?invalid-bpp.bmp wrapper.html?invalid-bpp.bmp +skip == wrapper.html?os2-invalid-bpp.bmp wrapper.html?os2-invalid-bpp.bmp +# Tests for an unsupported compression value +skip == wrapper.html?invalid-compression.bmp wrapper.html?invalid-compression.bmp +# Tests for RLE4 with an invalid BPP +skip == wrapper.html?invalid-compression-RLE4.bmp wrapper.html?invalid-compression-RLE4.bmp +# Tests for RLE8 with an invalid BPP +skip == wrapper.html?invalid-compression-RLE8.bmp wrapper.html?invalid-compression-RLE8.bmp + +# Test for BITFIELDS with an invalid BIH size. (This is the obscure +# BITMAPV3INFOHEADER variant mentioned in +# https://en.wikipedia.org/wiki/BMP_file_format which we don't accept.) +skip == wrapper.html?invalid-compression-BITFIELDS.bmp wrapper.html?invalid-compression-BITFIELDS.bmp + +skip == wrapper.html?invalid-truncated-metadata.bmp wrapper.html?invalid-truncated-metadata.bmp diff --git a/image/test/reftest/bmp/bmp-corrupted/reftest.list b/image/test/reftest/bmp/bmp-corrupted/reftest.list new file mode 100644 index 000000000..be73e2cf3 --- /dev/null +++ b/image/test/reftest/bmp/bmp-corrupted/reftest.list @@ -0,0 +1,18 @@ +# Corrupted BMP tests + +== wrapper.html?invalid-signature.bmp about:blank +== wrapper.html?invalid-bpp.bmp about:blank +== wrapper.html?os2-invalid-bpp.bmp about:blank +# Tests for an unsupported compression value +== wrapper.html?invalid-compression.bmp about:blank +# Tests for RLE4 with an invalid BPP +== wrapper.html?invalid-compression-RLE4.bmp about:blank +# Tests for RLE8 with an invalid BPP +== wrapper.html?invalid-compression-RLE8.bmp about:blank + +# Test for BITFIELDS with an invalid BIH size. (This is the obscure +# BITMAPV3INFOHEADER variant mentioned in +# https://en.wikipedia.org/wiki/BMP_file_format which we don't accept.) +== wrapper.html?invalid-compression-BITFIELDS.bmp about:blank + +== wrapper.html?invalid-truncated-metadata.bmp about:blank diff --git a/image/test/reftest/bmp/bmp-corrupted/wrapper.html b/image/test/reftest/bmp/bmp-corrupted/wrapper.html new file mode 100644 index 000000000..47e68959f --- /dev/null +++ b/image/test/reftest/bmp/bmp-corrupted/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/bmp/bmpsuite/COPYING.txt b/image/test/reftest/bmp/bmpsuite/COPYING.txt new file mode 100644 index 000000000..10926e87f --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/COPYING.txt @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/image/test/reftest/bmp/bmpsuite/README.mozilla b/image/test/reftest/bmp/bmpsuite/README.mozilla new file mode 100644 index 000000000..87d185e89 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/README.mozilla @@ -0,0 +1,39 @@ +bmpsuite, by Jason Summers, is an excellent BMP test suite that covers many +obscure corners of the BMP format. All the test images can be seen here: + + http://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html + +The code used to generate the test images is available here: + + https://github.com/jsummers/bmpsuite/ + +The readme.txt file states that the code is GPLv3 and the generated image files +are in the public domain. We have not included the code, but we have included: +(a) some quotes from the documentation and (b) some of the reference PNG +images. However, (a) and (b) are for testing purposes only and are not included +in Firefox releases. + +The BMP files within this directory were generated with bmpsuite v2.3 (git +revision 3adcc9e20c0b6d2d665966b7e047b6f9474cef12). + +There are three sub-directories. +- g/: for "good" images. +- q/: for "questionable" images. +- b/: for "bad" images. + +Each file listed in a reftest.list file is annotated with the following lines. + +- The first line starts with "BMP:" and is the output of the MOZ_LOG call in + nsBMPDecoder.cpp. It has basic image info. + +- Next is a quote from the bmpsuite docs, which describes the particulars of + the file. + +- Some files also have additional notes in square brackets. These explain + anything non-obvious about the file, such as how we handle things that are + ambiguous, any shortcomings in our decoding, and how Chromium handles the + image. + +Some of the reference PNGs need a small amount of fuzziness to match the BMPs. +This might be due to PNG color correction. + diff --git a/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp b/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp new file mode 100644 index 000000000..d4fa4e8b8 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp b/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp new file mode 100644 index 000000000..0a99a605a Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp b/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp new file mode 100644 index 000000000..a6150a6fe Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp b/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp new file mode 100644 index 000000000..f2c1dfb66 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp b/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp new file mode 100644 index 000000000..da52cb51d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp b/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp new file mode 100644 index 000000000..2a4083a6f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp b/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp new file mode 100644 index 000000000..7d9d1b745 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp b/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp new file mode 100644 index 000000000..92d2855b6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle.bmp new file mode 100644 index 000000000..cbf8fdc2e Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle.png b/image/test/reftest/bmp/bmpsuite/b/badrle.png new file mode 100644 index 000000000..1764ef9f9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp b/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp new file mode 100644 index 000000000..9fca005dc Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal1.png b/image/test/reftest/bmp/bmpsuite/b/pal1.png new file mode 100644 index 000000000..89a433ed7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal1.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8.png b/image/test/reftest/bmp/bmpsuite/b/pal8.png new file mode 100644 index 000000000..2bfd3e650 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal8.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp new file mode 100644 index 000000000..efe16c05c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png new file mode 100644 index 000000000..0efb392b9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp b/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp new file mode 100644 index 000000000..101e0b494 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/reftest-stylo.list b/image/test/reftest/bmp/bmpsuite/b/reftest-stylo.list new file mode 100644 index 000000000..244d80cb4 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/reftest-stylo.list @@ -0,0 +1,85 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# bmpsuite "bad" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=30000, compression=0, colors=2 +# "Header indicates an absurdly large number of bits/pixel." +# [We reject it. So does Chromium.] +skip == wrapper.html?badbitcount.bmp wrapper.html?badbitcount.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Header incorrectly indicates that the bitmap is several GB in size." +# [We accept it. So does Chromium.] +fails == badbitssize.bmp badbitssize.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Density (pixels per meter) suggests the image is much larger in one +# dimension than the other." +# [We accept them. So does Chromium.] +fails == baddens1.bmp baddens1.bmp +fails == baddens2.bmp baddens2.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Header incorrectly indicates that the file is several GB in size." +# [We accept it. So does Chromium.] +fails == badfilesize.bmp badfilesize.bmp + +# BMP: +# "Header size is 66 bytes, which is not a valid size for any known BMP +# version." +# [We reject it. So does Chromium.] +skip == wrapper.html?badheadersize.bmp wrapper.html?badheadersize.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=305402420 +# "Header incorrectly indicates that the palette contains an absurdly large +# number of colors." +# [We reject it. Chromium accepts it but draws nothing. Rejecting seems +# preferable give that the data is clearly untrustworthy.] +skip == wrapper.html?badpalettesize.bmp wrapper.html?badpalettesize.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "The 'planes' setting, which is required to be 1, is not 1." +# [We accept it. So does Chromium.] +fails == badplanes.bmp badplanes.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "An invalid RLE-compressed image that tries to cause buffer overruns." +# [We accept it, drawing the valid first part and leaving the rest black. +# Chromium accepts it, drawing the valid first part and leaving the rest +# transparent. Using black for the invalid part is arguably better because it +# makes the image edges more obvious.] +== badrle.bmp badrle.bmp + +# BMP: bihsize=40, -127 x 64, bpp=1, compression=0, colors=2 +# "The image claims to be a negative number of pixels in width." +# [We reject it. So does Chromium.] +skip == wrapper.html?badwidth.bmp wrapper.html?badwidth.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=101 +# "Many of the palette indices used in the image are not present in the +# palette." +# [We accept it and use black for the missing colors. So does Chromium.] +fails == pal8badindex.bmp pal8badindex.bmp + +# BMP: bihsize=40, 3000000 x 2000000, bpp=24, compression=0, colors=0 +# "An image with a very large reported width and height." +# [We reject it. So does Chromium.] +skip == wrapper.html?reallybig.bmp wrapper.html?reallybig.bmp + +# BMP: bihsize=40, 127 x -64, bpp=8, compression=1, colors=252 +# "An RLE-compressed image that tries to use top-down orientation, which isn’t +# allowed." +# [We accept it. Chromium rejects it. Accepting seems better given that we can +# decode it perfectly well.] +== rletopdown.bmp rletopdown.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "A file that has been truncated in the middle of the bitmap." +# [We accept it, drawing the part that is present and leaving the rest black. +# Chromium draws the part that is present and leaves the rest transparent. +# Using black for the invalid part is arguably better because it makes the +# image edges more obvious.] +fails == shortfile.bmp shortfile.bmp + diff --git a/image/test/reftest/bmp/bmpsuite/b/reftest.list b/image/test/reftest/bmp/bmpsuite/b/reftest.list new file mode 100644 index 000000000..2d8ef5c75 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/reftest.list @@ -0,0 +1,84 @@ +# bmpsuite "bad" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=30000, compression=0, colors=2 +# "Header indicates an absurdly large number of bits/pixel." +# [We reject it. So does Chromium.] +== wrapper.html?badbitcount.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Header incorrectly indicates that the bitmap is several GB in size." +# [We accept it. So does Chromium.] +== badbitssize.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Density (pixels per meter) suggests the image is much larger in one +# dimension than the other." +# [We accept them. So does Chromium.] +== baddens1.bmp pal1.png +== baddens2.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Header incorrectly indicates that the file is several GB in size." +# [We accept it. So does Chromium.] +== badfilesize.bmp pal1.png + +# BMP: +# "Header size is 66 bytes, which is not a valid size for any known BMP +# version." +# [We reject it. So does Chromium.] +== wrapper.html?badheadersize.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=305402420 +# "Header incorrectly indicates that the palette contains an absurdly large +# number of colors." +# [We reject it. Chromium accepts it but draws nothing. Rejecting seems +# preferable give that the data is clearly untrustworthy.] +== wrapper.html?badpalettesize.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "The 'planes' setting, which is required to be 1, is not 1." +# [We accept it. So does Chromium.] +== badplanes.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "An invalid RLE-compressed image that tries to cause buffer overruns." +# [We accept it, drawing the valid first part and leaving the rest black. +# Chromium accepts it, drawing the valid first part and leaving the rest +# transparent. Using black for the invalid part is arguably better because it +# makes the image edges more obvious.] +== badrle.bmp badrle.png + +# BMP: bihsize=40, -127 x 64, bpp=1, compression=0, colors=2 +# "The image claims to be a negative number of pixels in width." +# [We reject it. So does Chromium.] +== wrapper.html?badwidth.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=101 +# "Many of the palette indices used in the image are not present in the +# palette." +# [We accept it and use black for the missing colors. So does Chromium.] +== pal8badindex.bmp pal8badindex.png + +# BMP: bihsize=40, 3000000 x 2000000, bpp=24, compression=0, colors=0 +# "An image with a very large reported width and height." +# [We reject it. So does Chromium.] +== wrapper.html?reallybig.bmp about:blank + +# BMP: bihsize=40, 127 x -64, bpp=8, compression=1, colors=252 +# "An RLE-compressed image that tries to use top-down orientation, which isn’t +# allowed." +# [We accept it. Chromium rejects it. Accepting seems better given that we can +# decode it perfectly well.] +fuzzy(1,899) == rletopdown.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "A file that has been truncated in the middle of the bitmap." +# [We accept it, drawing the part that is present and leaving the rest black. +# Chromium draws the part that is present and leaves the rest transparent. +# Using black for the invalid part is arguably better because it makes the +# image edges more obvious.] +== shortfile.bmp shortfile.png + diff --git a/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp b/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp new file mode 100644 index 000000000..21a909fda Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp b/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp new file mode 100644 index 000000000..73960797b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/shortfile.png b/image/test/reftest/bmp/bmpsuite/b/shortfile.png new file mode 100644 index 000000000..0ec21d929 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/shortfile.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/wrapper.html b/image/test/reftest/bmp/bmpsuite/b/wrapper.html new file mode 100644 index 000000000..47e68959f --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1.bmp b/image/test/reftest/bmp/bmpsuite/g/pal1.bmp new file mode 100644 index 000000000..4776f8277 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1.png b/image/test/reftest/bmp/bmpsuite/g/pal1.png new file mode 100644 index 000000000..89a433ed7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp b/image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp new file mode 100644 index 000000000..466d0ba72 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1bg.png b/image/test/reftest/bmp/bmpsuite/g/pal1bg.png new file mode 100644 index 000000000..20c4bb838 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1bg.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp b/image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp new file mode 100644 index 000000000..56cb93203 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4.bmp b/image/test/reftest/bmp/bmpsuite/g/pal4.bmp new file mode 100644 index 000000000..7fd36303c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4.png b/image/test/reftest/bmp/bmpsuite/g/pal4.png new file mode 100644 index 000000000..188bb0499 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp b/image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp new file mode 100644 index 000000000..a5672aebd Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp new file mode 100644 index 000000000..ab8815a36 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8.bmp new file mode 100644 index 000000000..96b2f8668 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8.png b/image/test/reftest/bmp/bmpsuite/g/pal8.png new file mode 100644 index 000000000..2bfd3e650 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png new file mode 100644 index 000000000..646665f2d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp new file mode 100644 index 000000000..0aa8de04c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png new file mode 100644 index 000000000..9648cb682 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp new file mode 100644 index 000000000..14901b388 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp new file mode 100644 index 000000000..d43101490 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp new file mode 100644 index 000000000..4b2f8e019 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp new file mode 100644 index 000000000..7064be315 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp new file mode 100644 index 000000000..c54647a31 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp new file mode 100644 index 000000000..b7cc2d8bf Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w124.png b/image/test/reftest/bmp/bmpsuite/g/pal8w124.png new file mode 100644 index 000000000..f80236df6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w124.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp new file mode 100644 index 000000000..06efed744 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w125.png b/image/test/reftest/bmp/bmpsuite/g/pal8w125.png new file mode 100644 index 000000000..2a45116b9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w125.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp new file mode 100644 index 000000000..112aa9fe6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w126.png b/image/test/reftest/bmp/bmpsuite/g/pal8w126.png new file mode 100644 index 000000000..a41eab93d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w126.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/reftest-stylo.list b/image/test/reftest/bmp/bmpsuite/g/reftest-stylo.list new file mode 100644 index 000000000..ba8a53b4f --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/g/reftest-stylo.list @@ -0,0 +1,113 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# bmpsuite "good" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, in which black is the first color in the +# palette." +fails == pal1.bmp pal1.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, in which white is the first color in the +# palette." +fails == pal1wb.bmp pal1wb.bmp + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, with colors other than black and white." +fails == pal1bg.bmp pal1bg.bmp + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=0, colors=12 +# "Paletted image with 12 palette colors, and 4 bits/pixel." +fails == pal4.bmp pal4.bmp + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=12 +# "4-bit image that uses RLE compression." +== pal4rle.bmp pal4rle.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "Our standard paletted image, with 252 palette colors, and 8 bits/pixel." +fails == pal8.bmp pal8.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=0 +# "Every field that can be set to 0 is set to 0: pixels/meter=0; colors used=0 +# (meaning the default 256); size-of-image=0." +fails == pal8-0.bmp pal8-0.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=252 +# "8-bit image that uses RLE compression." +== pal8rle.bmp pal8rle.bmp + +# BMP: bihsize=40, 126 x 63, bpp=8, compression=0, colors=252 +# BMP: bihsize=40, 125 x 62, bpp=8, compression=0, colors=252 +# BMP: bihsize=40, 124 x 61, bpp=8, compression=0, colors=252 +# "Images with different widths and heights. In BMP format, rows are padded to +# a multiple of four bytes, so we test all four possibilities." +fails == pal8w126.bmp pal8w126.bmp +fails == pal8w125.bmp pal8w125.bmp +fails == pal8w124.bmp pal8w124.bmp + +# BMP: bihsize=40, 127 x -64, bpp=8, compression=0, colors=252 +# "BMP images are normally stored from the bottom up, but there is a way to +# store them from the top down." +fails == pal8topdown.bmp pal8topdown.bmp + +# BMP: bihsize=40, 127 x 32, bpp=8, compression=0, colors=252 +# "An image with non-square pixels: the X pixels/meter is twice the Y +# pixels/meter. Image editors can be expected to leave the image 'squashed'; +# image viewers should consider stretching it to its correct proportions." +# [We leave it squashed, as does Chromium.] +fails == pal8nonsquare.bmp pal8nonsquare.bmp + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2-style bitmap." +fails == pal8os2.bmp pal8os2.bmp + +# BMP: bihsize=108, 127 x 64, bpp=8, compression=0, colors=252 +# "A v4 bitmap. I’m not sure that the gamma and chromaticity values in this +# file are sensible, because I can’t find any detailed documentation of them." +fails == pal8v4.bmp pal8v4.bmp + +# BMP: bihsize=124, 127 x 64, bpp=8, compression=0, colors=252 +# "A v5 bitmap. Version 5 has additional colorspace options over v4, so it is +# easier to create, and ought to be more portable." +fails == pal8v5.bmp pal8v5.bmp + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=0, colors=0 +# "A 16-bit image with the default color format: 5 bits each for red, green, and +# blue, and 1 unused bit. The whitest colors should (I assume) be displayed as +# pure white: (255,255,255), not (248,248,248)." +fails == rgb16.bmp rgb16.bmp + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with a BITFIELDS segment indicating 5 red, 6 green, and 5 blue +# bits. This is a standard 16-bit format, even supported by old versions of +# Windows that don’t support any other non-default 16-bit formats. The whitest +# colors should be displayed as pure white: (255,255,255), not (248,252,248)." +== rgb16.bmp rgb16.bmp + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=256 +# "A 16-bit image with both a BITFIELDS segment and a palette." +== rgb16.bmp rgb16.bmp + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=0 +# "A perfectly ordinary 24-bit (truecolor) image." +fails == rgb24.bmp rgb24.bmp + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=256 +# "A 24-bit image, with a palette containing 256 colors. There is little if any +# reason for a truecolor image to contain a palette, but it is legal." +fails == rgb24pal.bmp rgb24pal.bmp + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0 +# "A 32-bit image using the default color format for 32-bit images (no +# BITFIELDS segment). There are 8 bits per color channel, and 8 unused bits. +# The unused bits are set to 0." +skip == rgb32.bmp rgb32.bmp + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32-bit image with a BITFIELDS segment. As usual, there are 8 bits per color +# channel, and 8 unused bits. But the color channels are in an unusual order, +# so the viewer must read the BITFIELDS, and not just guess." +fails == rgb32bf.bmp rgb32bf.bmp + diff --git a/image/test/reftest/bmp/bmpsuite/g/reftest.list b/image/test/reftest/bmp/bmpsuite/g/reftest.list new file mode 100644 index 000000000..9715b1ac8 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/g/reftest.list @@ -0,0 +1,112 @@ +# bmpsuite "good" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, in which black is the first color in the +# palette." +== pal1.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, in which white is the first color in the +# palette." +== pal1wb.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, with colors other than black and white." +== pal1bg.bmp pal1bg.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=0, colors=12 +# "Paletted image with 12 palette colors, and 4 bits/pixel." +== pal4.bmp pal4.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=12 +# "4-bit image that uses RLE compression." +== pal4rle.bmp pal4.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "Our standard paletted image, with 252 palette colors, and 8 bits/pixel." +fuzzy(1,899) == pal8.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=0 +# "Every field that can be set to 0 is set to 0: pixels/meter=0; colors used=0 +# (meaning the default 256); size-of-image=0." +fuzzy(1,899) == pal8-0.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=252 +# "8-bit image that uses RLE compression." +fuzzy(1,899) == pal8rle.bmp pal8.png + +# BMP: bihsize=40, 126 x 63, bpp=8, compression=0, colors=252 +# BMP: bihsize=40, 125 x 62, bpp=8, compression=0, colors=252 +# BMP: bihsize=40, 124 x 61, bpp=8, compression=0, colors=252 +# "Images with different widths and heights. In BMP format, rows are padded to +# a multiple of four bytes, so we test all four possibilities." +fuzzy(1,889) == pal8w126.bmp pal8w126.png +fuzzy(1,879) == pal8w125.bmp pal8w125.png +fuzzy(1,869) == pal8w124.bmp pal8w124.png + +# BMP: bihsize=40, 127 x -64, bpp=8, compression=0, colors=252 +# "BMP images are normally stored from the bottom up, but there is a way to +# store them from the top down." +fuzzy(1,899) == pal8topdown.bmp pal8.png + +# BMP: bihsize=40, 127 x 32, bpp=8, compression=0, colors=252 +# "An image with non-square pixels: the X pixels/meter is twice the Y +# pixels/meter. Image editors can be expected to leave the image 'squashed'; +# image viewers should consider stretching it to its correct proportions." +# [We leave it squashed, as does Chromium.] +fuzzy(1,473) == pal8nonsquare.bmp pal8nonsquare-e.png + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2-style bitmap." +fuzzy(1,899) == pal8os2.bmp pal8.png + +# BMP: bihsize=108, 127 x 64, bpp=8, compression=0, colors=252 +# "A v4 bitmap. I’m not sure that the gamma and chromaticity values in this +# file are sensible, because I can’t find any detailed documentation of them." +fuzzy(1,899) == pal8v4.bmp pal8.png + +# BMP: bihsize=124, 127 x 64, bpp=8, compression=0, colors=252 +# "A v5 bitmap. Version 5 has additional colorspace options over v4, so it is +# easier to create, and ought to be more portable." +fuzzy(1,899) == pal8v5.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=0, colors=0 +# "A 16-bit image with the default color format: 5 bits each for red, green, and +# blue, and 1 unused bit. The whitest colors should (I assume) be displayed as +# pure white: (255,255,255), not (248,248,248)." +fuzzy(1,1296) == rgb16.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with a BITFIELDS segment indicating 5 red, 6 green, and 5 blue +# bits. This is a standard 16-bit format, even supported by old versions of +# Windows that don’t support any other non-default 16-bit formats. The whitest +# colors should be displayed as pure white: (255,255,255), not (248,252,248)." +fuzzy(1,1296) == rgb16.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=256 +# "A 16-bit image with both a BITFIELDS segment and a palette." +fuzzy(1,1516) == rgb16.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=0 +# "A perfectly ordinary 24-bit (truecolor) image." +== rgb24.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=256 +# "A 24-bit image, with a palette containing 256 colors. There is little if any +# reason for a truecolor image to contain a palette, but it is legal." +== rgb24pal.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0 +# "A 32-bit image using the default color format for 32-bit images (no +# BITFIELDS segment). There are 8 bits per color channel, and 8 unused bits. +# The unused bits are set to 0." +== rgb32.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32-bit image with a BITFIELDS segment. As usual, there are 8 bits per color +# channel, and 8 unused bits. But the color channels are in an unusual order, +# so the viewer must read the BITFIELDS, and not just guess." +== rgb32bf.bmp rgb24.png + diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp new file mode 100644 index 000000000..c03a27975 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16-565.png b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.png new file mode 100644 index 000000000..04a3121d2 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp new file mode 100644 index 000000000..e7632e344 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16.bmp new file mode 100644 index 000000000..6bfe47af4 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16.png b/image/test/reftest/bmp/bmpsuite/g/rgb16.png new file mode 100644 index 000000000..d9545840a Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb24.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb24.bmp new file mode 100644 index 000000000..40f8bb094 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb24.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb24.png b/image/test/reftest/bmp/bmpsuite/g/rgb24.png new file mode 100644 index 000000000..86a9c945b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb24.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp new file mode 100644 index 000000000..102e971dd Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb32.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb32.bmp new file mode 100644 index 000000000..5d57eaaea Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb32.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp new file mode 100644 index 000000000..20fa9a132 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp b/image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp new file mode 100644 index 000000000..b68321c4c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal1p1.png b/image/test/reftest/bmp/bmpsuite/q/pal1p1.png new file mode 100644 index 000000000..92fc0f945 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal1p1.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal2.bmp b/image/test/reftest/bmp/bmpsuite/q/pal2.bmp new file mode 100644 index 000000000..983e9fa92 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp new file mode 100644 index 000000000..58994e92b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png new file mode 100644 index 000000000..9b0c04436 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8.png b/image/test/reftest/bmp/bmpsuite/q/pal8.png new file mode 100644 index 000000000..2bfd3e650 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp new file mode 100644 index 000000000..8673e9740 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp new file mode 100644 index 000000000..e532c8986 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp new file mode 100644 index 000000000..95a1d2345 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp new file mode 100644 index 000000000..1324a40d0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp new file mode 100644 index 000000000..93b8187ca Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp new file mode 100644 index 000000000..a2af88d87 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png new file mode 100644 index 000000000..2d8e957f1 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/reftest-stylo.list b/image/test/reftest/bmp/bmpsuite/q/reftest-stylo.list new file mode 100644 index 000000000..63c55b671 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/q/reftest-stylo.list @@ -0,0 +1,131 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# bmpsuite "questionable" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=1 +# "1 bit/pixel paletted image, with only one color in the palette. The +# documentation says that 1-bpp images have a palette size of 2 (not 'up to +# 2'), but it would be silly for a viewer not to support a size of 1." +# [We accept it. So does Chromium.] +fails == pal1p1.bmp pal1p1.bmp + +# BMP: bihsize=40, 127 x 64, bpp=2, compression=0, colors=4 +# "A paletted image with 2 bits/pixel. Usually only 1, 4, and 8 are allowed, +# but 2 is legal on Windows CE." +# [We reject it. So does Chromium.] +skip == wrapper.html?pal2.bmp wrapper.html?pal2.bmp + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "An RLE-compressed image that used 'delta' codes to skip over some pixels, +# leaving them undefined. Some viewers make undefined pixels transparent, +# others make them black, and others assign them palette color 0 (purple, in +# this case)." +# [We make the undefined pixels transparent. So does Chromium.] +== pal4rletrns.bmp pal4rletrns.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "8-bit version of q/pal4rletrns.bmp." +# [Ditto.] +== pal8rletrns.bmp pal8rletrns.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "A file with some unused bytes between the palette and the image. This is +# probably valid, but I’m not 100% sure." +# [We accept it. So does Chromium.] +fails == pal8offs.bmp pal8offs.bmp + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=300 +# "An 8-bit image with 300 palette colors. This may be invalid, because the +# documentation could be interpreted to imply that 8-bit images aren’t allowed +# to have more than 256 colors." +# [We accept it. So does Chromium.] +fails == pal8oversizepal.bmp pal8oversizepal.bmp + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2v1 with a less-than-full-sized palette. Probably not valid, but such +# files have been seen in the wild." +# [We reject it. Chromium accepts it but draws nothing. Rejecting seems +# preferable given that the color and pixel data must overlap, which can only +# lead to rubbish results.] +skip == wrapper.html?pal8os2sp.bmp wrapper.html?pal8os2sp.bmp + +# BMP: bihsize=64, 127 x 64, bpp=8, compression=0, colors=252 +# "My attempt to make an OS/2v2 bitmap." +# [We accept it. So does Chromium.] +fails == pal8os2v2.bmp pal8os2v2.bmp + +# BMP: bihsize=16, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2v2 bitmap whose header has only 16 bytes, instead of the full 64." +# [We accept it. So does Chromium.] +fails == pal8os2v2-16.bmp pal8os2v2-16.bmp + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "An unusual and silly 16-bit image, with 2 red bits, 3 green bits, and 1 blue +# bit. Most viewers do support this image, but the colors may be darkened with +# a yellow-green shadow. That’s because they’re doing simple bit-shifting +# (possibly including one round of bit replication), instead of proper +# scaling." +fails == rgb16-231.bmp rgb16-231.bmp + +# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with an alpha channel. There are 4 bits for each color +# channel, and 4 bits for the alpha channel. It’s not clear if this is valid, +# but I can’t find anything that suggests it isn’t." +== rgba16-4444.bmp rgba16-4444.bmp + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=300 +# "A 24-bit image, with a palette containing 300 colors. The fact that the +# palette has more than 256 colors may cause some viewers to complain, but the +# documentation does not mention a size limit." +# [We accept it. So does Chromium.] +fails == rgb24largepal.bmp rgb24largepal.bmp + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "My attempt to make a BMP file with an embedded color profile." +# [We support it, though we don't do anything with the color profile. Chromium +# also handles it.] +fails == rgb24prof.bmp rgb24prof.bmp + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "My attempt to make a BMP file with a linked color profile." +# [We accept it, though we don't do anything with the color profile. Chromium +# also handles it.] +fails == rgb24lprof.bmp rgb24lprof.bmp + +# BMP: bihsize=124, 127 x 64, bpp=0, compression=4, colors=0 +# BMP: bihsize=124, 127 x 64, bpp=0, compression=5, colors=0 +# "My attempt to make BMP files with embedded JPEG and PNG images. These are +# not likely to be supported by much of anything (they’re intended for +# printers)." +# [We reject them. So does Chromium.] +skip == wrapper.html?rgb24jpeg.bmp wrapper.html?rgb24jpeg.bmp +skip == wrapper.html?rgb24png.bmp wrapper.html?rgb24png.bmp + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0 +# "Same as g/rgb32.bmp, except that the unused bits are set to something other +# than 0. If the image becomes transparent toward the bottom, it probably means +# the viewer uses heuristics to guess whether the undefined data represents +# transparency." +# [We don't apply transparency here. Chromium does the same.] +fails == rgb32fakealpha.bmp rgb32fakealpha.bmp + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with all 32 bits used: 11 each for red and green, and +# 10 for blue. As far as I know, this is perfectly valid, but it is unusual." +fails == rgb32-111110.bmp rgb32-111110.bmp + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "A BMP with an alpha channel. Transparency is barely documented, so it’s +# possible that this file is not correctly formed. The color channels are in an +# unusual order, to prevent viewers from passing this test by making a lucky +# guess." +== rgba32.bmp rgba32.bmp + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=6, colors=0 +# "An image of type BI_ALPHABITFIELDS. Supposedly, this was used on Windows CE. +# I don’t know whether it is constructed correctly." +# [We reject it. So does Chromium.] +skip == wrapper.html?rgba32abf.bmp wrapper.html?rgba32abf.bmp + + diff --git a/image/test/reftest/bmp/bmpsuite/q/reftest.list b/image/test/reftest/bmp/bmpsuite/q/reftest.list new file mode 100644 index 000000000..80da580cc --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/q/reftest.list @@ -0,0 +1,130 @@ +# bmpsuite "questionable" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=1 +# "1 bit/pixel paletted image, with only one color in the palette. The +# documentation says that 1-bpp images have a palette size of 2 (not 'up to +# 2'), but it would be silly for a viewer not to support a size of 1." +# [We accept it. So does Chromium.] +== pal1p1.bmp pal1p1.png + +# BMP: bihsize=40, 127 x 64, bpp=2, compression=0, colors=4 +# "A paletted image with 2 bits/pixel. Usually only 1, 4, and 8 are allowed, +# but 2 is legal on Windows CE." +# [We reject it. So does Chromium.] +== wrapper.html?pal2.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "An RLE-compressed image that used 'delta' codes to skip over some pixels, +# leaving them undefined. Some viewers make undefined pixels transparent, +# others make them black, and others assign them palette color 0 (purple, in +# this case)." +# [We make the undefined pixels transparent. So does Chromium.] +== pal4rletrns.bmp pal4rletrns.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "8-bit version of q/pal4rletrns.bmp." +# [Ditto.] +== pal8rletrns.bmp pal8rletrns.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "A file with some unused bytes between the palette and the image. This is +# probably valid, but I’m not 100% sure." +# [We accept it. So does Chromium.] +fuzzy(1,899) == pal8offs.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=300 +# "An 8-bit image with 300 palette colors. This may be invalid, because the +# documentation could be interpreted to imply that 8-bit images aren’t allowed +# to have more than 256 colors." +# [We accept it. So does Chromium.] +fuzzy(1,899) == pal8oversizepal.bmp pal8.png + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2v1 with a less-than-full-sized palette. Probably not valid, but such +# files have been seen in the wild." +# [We reject it. Chromium accepts it but draws nothing. Rejecting seems +# preferable given that the color and pixel data must overlap, which can only +# lead to rubbish results.] +== wrapper.html?pal8os2sp.bmp about:blank + +# BMP: bihsize=64, 127 x 64, bpp=8, compression=0, colors=252 +# "My attempt to make an OS/2v2 bitmap." +# [We accept it. So does Chromium.] +fuzzy(1,899) == pal8os2v2.bmp pal8.png + +# BMP: bihsize=16, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2v2 bitmap whose header has only 16 bytes, instead of the full 64." +# [We accept it. So does Chromium.] +fuzzy(1,899) == pal8os2v2-16.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "An unusual and silly 16-bit image, with 2 red bits, 3 green bits, and 1 blue +# bit. Most viewers do support this image, but the colors may be darkened with +# a yellow-green shadow. That’s because they’re doing simple bit-shifting +# (possibly including one round of bit replication), instead of proper +# scaling." +== rgb16-231.bmp rgb16-231.png + +# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with an alpha channel. There are 4 bits for each color +# channel, and 4 bits for the alpha channel. It’s not clear if this is valid, +# but I can’t find anything that suggests it isn’t." +== rgba16-4444.bmp rgba16-4444.png + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=300 +# "A 24-bit image, with a palette containing 300 colors. The fact that the +# palette has more than 256 colors may cause some viewers to complain, but the +# documentation does not mention a size limit." +# [We accept it. So does Chromium.] +== rgb24largepal.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "My attempt to make a BMP file with an embedded color profile." +# [We support it, though we don't do anything with the color profile. Chromium +# also handles it.] +== rgb24prof.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "My attempt to make a BMP file with a linked color profile." +# [We accept it, though we don't do anything with the color profile. Chromium +# also handles it.] +== rgb24lprof.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=0, compression=4, colors=0 +# BMP: bihsize=124, 127 x 64, bpp=0, compression=5, colors=0 +# "My attempt to make BMP files with embedded JPEG and PNG images. These are +# not likely to be supported by much of anything (they’re intended for +# printers)." +# [We reject them. So does Chromium.] +== wrapper.html?rgb24jpeg.bmp about:blank +== wrapper.html?rgb24png.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0 +# "Same as g/rgb32.bmp, except that the unused bits are set to something other +# than 0. If the image becomes transparent toward the bottom, it probably means +# the viewer uses heuristics to guess whether the undefined data represents +# transparency." +# [We don't apply transparency here. Chromium does the same.] +== rgb32fakealpha.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with all 32 bits used: 11 each for red and green, and +# 10 for blue. As far as I know, this is perfectly valid, but it is unusual." +fuzzy(1,1408) == rgb32-111110.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "A BMP with an alpha channel. Transparency is barely documented, so it’s +# possible that this file is not correctly formed. The color channels are in an +# unusual order, to prevent viewers from passing this test by making a lucky +# guess." +== rgba32.bmp rgba32.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=6, colors=0 +# "An image of type BI_ALPHABITFIELDS. Supposedly, this was used on Windows CE. +# I don’t know whether it is constructed correctly." +# [We reject it. So does Chromium.] +== wrapper.html?rgba32abf.bmp about:blank + + diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp new file mode 100644 index 000000000..6300f69f0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16-231.png b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.png new file mode 100644 index 000000000..76efe526e Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24.png b/image/test/reftest/bmp/bmpsuite/q/rgb24.png new file mode 100644 index 000000000..86a9c945b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp new file mode 100644 index 000000000..87d73d75b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp new file mode 100644 index 000000000..d5e418c2d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp new file mode 100644 index 000000000..b868b88f2 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp new file mode 100644 index 000000000..e87ec7add Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp new file mode 100644 index 000000000..627e676ea Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp new file mode 100644 index 000000000..ec07d89b5 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp new file mode 100644 index 000000000..cb544da5b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp new file mode 100644 index 000000000..051ff2358 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png new file mode 100644 index 000000000..bfeda6fae Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32.bmp new file mode 100644 index 000000000..829c7c7e3 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32.png b/image/test/reftest/bmp/bmpsuite/q/rgba32.png new file mode 100644 index 000000000..25e542a65 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp new file mode 100644 index 000000000..d9bb0189c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/wrapper.html b/image/test/reftest/bmp/bmpsuite/q/wrapper.html new file mode 100644 index 000000000..47e68959f --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/q/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/bmp/bmpsuite/reftest-stylo.list b/image/test/reftest/bmp/bmpsuite/reftest-stylo.list new file mode 100644 index 000000000..5ec496272 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/reftest-stylo.list @@ -0,0 +1,8 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# bmpsuite tests + +# See README.mozilla for details about these tests. + +include g/reftest-stylo.list +include q/reftest-stylo.list +include b/reftest-stylo.list diff --git a/image/test/reftest/bmp/bmpsuite/reftest.list b/image/test/reftest/bmp/bmpsuite/reftest.list new file mode 100644 index 000000000..8f48430f9 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/reftest.list @@ -0,0 +1,7 @@ +# bmpsuite tests + +# See README.mozilla for details about these tests. + +include g/reftest.list +include q/reftest.list +include b/reftest.list diff --git a/image/test/reftest/bmp/reftest-stylo.list b/image/test/reftest/bmp/reftest-stylo.list new file mode 100644 index 000000000..80aa0ab32 --- /dev/null +++ b/image/test/reftest/bmp/reftest-stylo.list @@ -0,0 +1,17 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# BMP tests + +include bmp-1bpp/reftest-stylo.list +include bmp-4bpp/reftest-stylo.list +include bmp-8bpp/reftest-stylo.list +include bmp-24bpp/reftest-stylo.list +include bmp-corrupted/reftest-stylo.list +include bmpsuite/reftest-stylo.list + +# Two bmp files where the offset to the start of the image data in the file +# is past the end of the file. In 1240629-1.bmp the offset us uint32_max, +# so we are testing that we don't try to allocate a buffer that size (and +# fail on 32 bit platforms) and declare the image in error state. If in the +# future we decide that such bmps (offset past the end of the file) are +# invalid the test will still pass, but won't be testing much. +fails == 1240629-1.bmp 1240629-1.bmp diff --git a/image/test/reftest/bmp/reftest.list b/image/test/reftest/bmp/reftest.list new file mode 100644 index 000000000..87183e6b2 --- /dev/null +++ b/image/test/reftest/bmp/reftest.list @@ -0,0 +1,16 @@ +# BMP tests + +include bmp-1bpp/reftest.list +include bmp-4bpp/reftest.list +include bmp-8bpp/reftest.list +include bmp-24bpp/reftest.list +include bmp-corrupted/reftest.list +include bmpsuite/reftest.list + +# Two bmp files where the offset to the start of the image data in the file +# is past the end of the file. In 1240629-1.bmp the offset us uint32_max, +# so we are testing that we don't try to allocate a buffer that size (and +# fail on 32 bit platforms) and declare the image in error state. If in the +# future we decide that such bmps (offset past the end of the file) are +# invalid the test will still pass, but won't be testing much. +== 1240629-1.bmp 1240629-2.bmp diff --git a/image/test/reftest/color-management/color-curv.png b/image/test/reftest/color-management/color-curv.png new file mode 100644 index 000000000..994e3a38a Binary files /dev/null and b/image/test/reftest/color-management/color-curv.png differ diff --git a/image/test/reftest/color-management/color-lin.png b/image/test/reftest/color-management/color-lin.png new file mode 100644 index 000000000..0ee276fca Binary files /dev/null and b/image/test/reftest/color-management/color-lin.png differ diff --git a/image/test/reftest/color-management/color-table.png b/image/test/reftest/color-management/color-table.png new file mode 100644 index 000000000..355b3a2ba Binary files /dev/null and b/image/test/reftest/color-management/color-table.png differ diff --git a/image/test/reftest/color-management/invalid-chrm-ref.png b/image/test/reftest/color-management/invalid-chrm-ref.png new file mode 100644 index 000000000..85f83f783 Binary files /dev/null and b/image/test/reftest/color-management/invalid-chrm-ref.png differ diff --git a/image/test/reftest/color-management/invalid-chrm.png b/image/test/reftest/color-management/invalid-chrm.png new file mode 100644 index 000000000..33dc9e9ce Binary files /dev/null and b/image/test/reftest/color-management/invalid-chrm.png differ diff --git a/image/test/reftest/color-management/invalid-whitepoint.png b/image/test/reftest/color-management/invalid-whitepoint.png new file mode 100644 index 000000000..383a0a035 Binary files /dev/null and b/image/test/reftest/color-management/invalid-whitepoint.png differ diff --git a/image/test/reftest/color-management/reftest-stylo.list b/image/test/reftest/color-management/reftest-stylo.list new file mode 100644 index 000000000..64f503fe6 --- /dev/null +++ b/image/test/reftest/color-management/reftest-stylo.list @@ -0,0 +1,8 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# Colormangement + +# test for bug 489133, test for bug 460520 +fails == invalid-chrm.png invalid-chrm.png +fails == invalid-whitepoint.png invalid-whitepoint.png +# test for bug 488955 +== trc-type.html trc-type.html diff --git a/image/test/reftest/color-management/reftest.list b/image/test/reftest/color-management/reftest.list new file mode 100644 index 000000000..ee6e16adb --- /dev/null +++ b/image/test/reftest/color-management/reftest.list @@ -0,0 +1,7 @@ +# Colormangement + +# test for bug 489133, test for bug 460520 +== invalid-chrm.png invalid-chrm-ref.png +== invalid-whitepoint.png invalid-chrm-ref.png +# test for bug 488955 +== trc-type.html trc-type-ref.html diff --git a/image/test/reftest/color-management/trc-type-ref.html b/image/test/reftest/color-management/trc-type-ref.html new file mode 100644 index 000000000..5140e6e6a --- /dev/null +++ b/image/test/reftest/color-management/trc-type-ref.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/image/test/reftest/color-management/trc-type.html b/image/test/reftest/color-management/trc-type.html new file mode 100644 index 000000000..f13052bbf --- /dev/null +++ b/image/test/reftest/color-management/trc-type.html @@ -0,0 +1,53 @@ + + + + + + + + + diff --git a/image/test/reftest/colordepth.html b/image/test/reftest/colordepth.html new file mode 100644 index 000000000..15d2c9f95 --- /dev/null +++ b/image/test/reftest/colordepth.html @@ -0,0 +1,16 @@ + diff --git a/image/test/reftest/downscaling/black-border-bottom.png b/image/test/reftest/downscaling/black-border-bottom.png new file mode 100644 index 000000000..efa7ce2dc Binary files /dev/null and b/image/test/reftest/downscaling/black-border-bottom.png differ diff --git a/image/test/reftest/downscaling/black-border-left.png b/image/test/reftest/downscaling/black-border-left.png new file mode 100644 index 000000000..11bc67e98 Binary files /dev/null and b/image/test/reftest/downscaling/black-border-left.png differ diff --git a/image/test/reftest/downscaling/black-border-rect.svg b/image/test/reftest/downscaling/black-border-rect.svg new file mode 100644 index 000000000..0fa01a0a6 --- /dev/null +++ b/image/test/reftest/downscaling/black-border-rect.svg @@ -0,0 +1,3 @@ + + + diff --git a/image/test/reftest/downscaling/black-border-right.png b/image/test/reftest/downscaling/black-border-right.png new file mode 100644 index 000000000..081c52d5b Binary files /dev/null and b/image/test/reftest/downscaling/black-border-right.png differ diff --git a/image/test/reftest/downscaling/black-border-top.png b/image/test/reftest/downscaling/black-border-top.png new file mode 100644 index 000000000..fc6e69e02 Binary files /dev/null and b/image/test/reftest/downscaling/black-border-top.png differ diff --git a/image/test/reftest/downscaling/bmp-size-16x16-24bpp.png b/image/test/reftest/downscaling/bmp-size-16x16-24bpp.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/downscaling/bmp-size-16x16-24bpp.png differ diff --git a/image/test/reftest/downscaling/downscale-1-bigimage.png b/image/test/reftest/downscaling/downscale-1-bigimage.png new file mode 100644 index 000000000..5e018590c Binary files /dev/null and b/image/test/reftest/downscaling/downscale-1-bigimage.png differ diff --git a/image/test/reftest/downscaling/downscale-1-ref.html b/image/test/reftest/downscaling/downscale-1-ref.html new file mode 100644 index 000000000..63ec56ef7 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-1-ref.html @@ -0,0 +1,8 @@ + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-1-smallimage.png b/image/test/reftest/downscaling/downscale-1-smallimage.png new file mode 100644 index 000000000..588e6b78d Binary files /dev/null and b/image/test/reftest/downscaling/downscale-1-smallimage.png differ diff --git a/image/test/reftest/downscaling/downscale-1.html b/image/test/reftest/downscaling/downscale-1.html new file mode 100644 index 000000000..a9629ef85 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-1.html @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-16px.html b/image/test/reftest/downscaling/downscale-16px.html new file mode 100644 index 000000000..b34adb93d --- /dev/null +++ b/image/test/reftest/downscaling/downscale-16px.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2a.html b/image/test/reftest/downscaling/downscale-2a.html new file mode 100644 index 000000000..fac11ccee --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2a.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2b.html b/image/test/reftest/downscaling/downscale-2b.html new file mode 100644 index 000000000..af7ecbff3 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2b.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2c.html b/image/test/reftest/downscaling/downscale-2c.html new file mode 100644 index 000000000..18f70456b --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2c.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2d.html b/image/test/reftest/downscaling/downscale-2d.html new file mode 100644 index 000000000..8d9547b73 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2d.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2e.html b/image/test/reftest/downscaling/downscale-2e.html new file mode 100644 index 000000000..c3d0d771f --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2e.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2f.html b/image/test/reftest/downscaling/downscale-2f.html new file mode 100644 index 000000000..42cfad1f5 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2f.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-32px-ref.html b/image/test/reftest/downscaling/downscale-32px-ref.html new file mode 100644 index 000000000..1caf3c73b --- /dev/null +++ b/image/test/reftest/downscaling/downscale-32px-ref.html @@ -0,0 +1,8 @@ + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-32px.html b/image/test/reftest/downscaling/downscale-32px.html new file mode 100644 index 000000000..f5fce324d --- /dev/null +++ b/image/test/reftest/downscaling/downscale-32px.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-8px.html b/image/test/reftest/downscaling/downscale-8px.html new file mode 100644 index 000000000..32cb1b211 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-8px.html @@ -0,0 +1,27 @@ + + + +Image reftest wrapper + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-moz-icon-1-ref.html b/image/test/reftest/downscaling/downscale-moz-icon-1-ref.html new file mode 100644 index 000000000..ade5e2192 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-moz-icon-1-ref.html @@ -0,0 +1,37 @@ + + + + + + Reference for downscaling moz-icon images (bug 1261964) + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-moz-icon-1.html b/image/test/reftest/downscaling/downscale-moz-icon-1.html new file mode 100644 index 000000000..ba3795127 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-moz-icon-1.html @@ -0,0 +1,19 @@ + + + + + + Testcase for downscaling moz-icon images (bug 1261964) + + + + + + diff --git a/image/test/reftest/downscaling/downscale-png.html b/image/test/reftest/downscaling/downscale-png.html new file mode 100644 index 000000000..4752b2155 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-png.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-svg-1-ref.html b/image/test/reftest/downscaling/downscale-svg-1-ref.html new file mode 100644 index 000000000..8935619eb --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1-ref.html @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-svg-1a.html b/image/test/reftest/downscaling/downscale-svg-1a.html new file mode 100644 index 000000000..2263cc998 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1a.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1b.html b/image/test/reftest/downscaling/downscale-svg-1b.html new file mode 100644 index 000000000..9db239c7c --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1b.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1c.html b/image/test/reftest/downscaling/downscale-svg-1c.html new file mode 100644 index 000000000..f8babf026 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1c.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1d.html b/image/test/reftest/downscaling/downscale-svg-1d.html new file mode 100644 index 000000000..9a56a51de --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1d.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1e.html b/image/test/reftest/downscaling/downscale-svg-1e.html new file mode 100644 index 000000000..732ac22c9 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1e.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1f.html b/image/test/reftest/downscaling/downscale-svg-1f.html new file mode 100644 index 000000000..0124682c7 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1f.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/ff-0RGB.ico b/image/test/reftest/downscaling/ff-0RGB.ico new file mode 100644 index 000000000..56116b9f6 Binary files /dev/null and b/image/test/reftest/downscaling/ff-0RGB.ico differ diff --git a/image/test/reftest/downscaling/ff-0RGB.png b/image/test/reftest/downscaling/ff-0RGB.png new file mode 100644 index 000000000..749ffcdfb Binary files /dev/null and b/image/test/reftest/downscaling/ff-0RGB.png differ diff --git a/image/test/reftest/downscaling/ff-ARGB.ico b/image/test/reftest/downscaling/ff-ARGB.ico new file mode 100644 index 000000000..4681dc649 Binary files /dev/null and b/image/test/reftest/downscaling/ff-ARGB.ico differ diff --git a/image/test/reftest/downscaling/ff-ARGB.png b/image/test/reftest/downscaling/ff-ARGB.png new file mode 100644 index 000000000..74ea0e2f3 Binary files /dev/null and b/image/test/reftest/downscaling/ff-ARGB.png differ diff --git a/image/test/reftest/downscaling/lime-red-256px-bmp-in.ico b/image/test/reftest/downscaling/lime-red-256px-bmp-in.ico new file mode 100644 index 000000000..b372cba4a Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px-bmp-in.ico differ diff --git a/image/test/reftest/downscaling/lime-red-256px-png-in.ico b/image/test/reftest/downscaling/lime-red-256px-png-in.ico new file mode 100644 index 000000000..e8578d293 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px-png-in.ico differ diff --git a/image/test/reftest/downscaling/lime-red-256px.bmp b/image/test/reftest/downscaling/lime-red-256px.bmp new file mode 100644 index 000000000..3dc808970 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.bmp differ diff --git a/image/test/reftest/downscaling/lime-red-256px.gif b/image/test/reftest/downscaling/lime-red-256px.gif new file mode 100644 index 000000000..f9f669aa4 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.gif differ diff --git a/image/test/reftest/downscaling/lime-red-256px.jpg b/image/test/reftest/downscaling/lime-red-256px.jpg new file mode 100644 index 000000000..ac8efdf36 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.jpg differ diff --git a/image/test/reftest/downscaling/lime-red-256px.png b/image/test/reftest/downscaling/lime-red-256px.png new file mode 100644 index 000000000..2be2e05a5 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.png differ diff --git a/image/test/reftest/downscaling/lime-red-256px.svg b/image/test/reftest/downscaling/lime-red-256px.svg new file mode 100644 index 000000000..530ae6d6d --- /dev/null +++ b/image/test/reftest/downscaling/lime-red-256px.svg @@ -0,0 +1,5 @@ + + + + diff --git a/image/test/reftest/downscaling/lime-red-32px.png b/image/test/reftest/downscaling/lime-red-32px.png new file mode 100644 index 000000000..bfa2e7b73 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-32px.png differ diff --git a/image/test/reftest/downscaling/png-interlaced.png b/image/test/reftest/downscaling/png-interlaced.png new file mode 100644 index 000000000..a938d0bd6 Binary files /dev/null and b/image/test/reftest/downscaling/png-interlaced.png differ diff --git a/image/test/reftest/downscaling/png-normal.png b/image/test/reftest/downscaling/png-normal.png new file mode 100644 index 000000000..c2780fdd9 Binary files /dev/null and b/image/test/reftest/downscaling/png-normal.png differ diff --git a/image/test/reftest/downscaling/reftest-stylo.list b/image/test/reftest/downscaling/reftest-stylo.list new file mode 100644 index 000000000..6feb9080b --- /dev/null +++ b/image/test/reftest/downscaling/reftest-stylo.list @@ -0,0 +1,195 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# Reftests for downscaling +# +# Downscaling can be a lossy process, so a bit of mismatch is acceptable here, +# as long as it's barely noticable visually. When necessary, this can be +# explicitly allowed via 'fuzzy'/'fuzzy-if' annotations. +# +# Many of these tests check primarily that we don't lose rows or columns of +# pixels when downscaling by making sure that the result isn't too similar to +# about:blank. A small amount of fuzziness is used to ensure that the tests +# don't pass because of very slight deviations; passing tests should be +# substantially different from about:blank. This fuzziness should *not* be +# removed as doing so would make the tests pass in situations where they +# shouldn't. +# +# IMPORTANT: For robustness, each test should be listed *twice* in this +# manifest -- once with the high quality downscaling pref disabled, and once +# with this pref enabled. The pref is set via "default-preferences", so +# simply appending a new test to the lists below each of those lines should be +# sufficient. +# +# Also note that Mac OS X has its own system-level downscaling algorithm, so +# tests here may need Mac-specific "fuzzy-if(cocoaWidget,...)" annotations. +# Similarly, modern versions of Windows have slightly different downscaling +# behavior than other platforms, and may require "fuzzy-if(winWidget,...)". + + +# RUN TESTS NOT AFFECTED BY DOWNSCALE-DURING-DECODE: +# # +fails fuzzy-if(skiaContent,14,416) == downscale-svg-1a.html downscale-svg-1a.html +== downscale-svg-1b.html downscale-svg-1b.html +fails fuzzy-if(skiaContent,8,292) == downscale-svg-1c.html downscale-svg-1c.html +fuzzy-if(B2G,255,207) == downscale-svg-1d.html downscale-svg-1d.html +# right side is 1 pixel off for B2G, probably regression from 974242 +fails fuzzy-if(skiaContent,110,181) == downscale-svg-1e.html downscale-svg-1e.html +fails fuzzy-if(skiaContent,142,77) == downscale-svg-1f.html downscale-svg-1f.html + +# RUN TESTS WITH DOWNSCALE-DURING-DECODE DISABLED: +# # +default-preferences pref(image.downscale-during-decode.enabled,false) + +fuzzy-if(winWidget,16,20) fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1.html + +== downscale-2a.html?203,52,left downscale-2a.html?203,52,left +== downscale-2b.html?203,52,left downscale-2b.html?203,52,left +skip == downscale-2c.html?203,52,left downscale-2c.html?203,52,left +== downscale-2d.html?203,52,left downscale-2d.html?203,52,left +== downscale-2e.html?203,52,left downscale-2e.html?203,52,left + +== downscale-2a.html?205,53,left downscale-2a.html?205,53,left +== downscale-2b.html?205,53,left downscale-2b.html?205,53,left +== downscale-2c.html?205,53,left downscale-2c.html?205,53,left +skip == downscale-2d.html?205,53,left downscale-2d.html?205,53,left +== downscale-2e.html?205,53,left downscale-2e.html?205,53,left + +== downscale-2a.html?203,52,right downscale-2a.html?203,52,right +== downscale-2b.html?203,52,right downscale-2b.html?203,52,right +== downscale-2c.html?203,52,right downscale-2c.html?203,52,right +== downscale-2d.html?203,52,right downscale-2d.html?203,52,right +== downscale-2e.html?203,52,right downscale-2e.html?203,52,right + +== downscale-2a.html?205,53,right downscale-2a.html?205,53,right +== downscale-2b.html?205,53,right downscale-2b.html?205,53,right +== downscale-2c.html?205,53,right downscale-2c.html?205,53,right +== downscale-2d.html?205,53,right downscale-2d.html?205,53,right +== downscale-2e.html?205,53,right downscale-2e.html?205,53,right + +== downscale-2a.html?203,52,top downscale-2a.html?203,52,top +== downscale-2b.html?203,52,top downscale-2b.html?203,52,top +== downscale-2c.html?203,52,top downscale-2c.html?203,52,top +skip == downscale-2d.html?203,52,top downscale-2d.html?203,52,top +== downscale-2e.html?203,52,top downscale-2e.html?203,52,top + +== downscale-2a.html?205,53,top downscale-2a.html?205,53,top +== downscale-2b.html?205,53,top downscale-2b.html?205,53,top +== downscale-2c.html?205,53,top downscale-2c.html?205,53,top +== downscale-2d.html?205,53,top downscale-2d.html?205,53,top +== downscale-2e.html?205,53,top downscale-2e.html?205,53,top + +== downscale-2a.html?203,52,bottom downscale-2a.html?203,52,bottom +== downscale-2b.html?203,52,bottom downscale-2b.html?203,52,bottom +== downscale-2c.html?203,52,bottom downscale-2c.html?203,52,bottom +== downscale-2d.html?203,52,bottom downscale-2d.html?203,52,bottom +skip == downscale-2e.html?203,52,bottom downscale-2e.html?203,52,bottom + +== downscale-2a.html?205,53,bottom downscale-2a.html?205,53,bottom +== downscale-2b.html?205,53,bottom downscale-2b.html?205,53,bottom +== downscale-2c.html?205,53,bottom downscale-2c.html?205,53,bottom +== downscale-2d.html?205,53,bottom downscale-2d.html?205,53,bottom +fails-if(OSX>=1008&&!skiaContent) == downscale-2e.html?205,53,bottom downscale-2e.html?205,53,bottom + +== downscale-moz-icon-1.html downscale-moz-icon-1.html + +== downscale-png.html?16,16,interlaced downscale-png.html?16,16,interlaced +== downscale-png.html?24,24,interlaced downscale-png.html?24,24,interlaced + +# Non-transparent and transparent ICO images +random == downscale-16px.html?ff-0RGB.ico downscale-16px.html?ff-0RGB.ico +random == downscale-16px.html?ff-ARGB.ico downscale-16px.html?ff-ARGB.ico + +# Upside-down (negative height) BMP +random == downscale-8px.html?top-to-bottom-16x16-24bpp.bmp downscale-8px.html?top-to-bottom-16x16-24bpp.bmp + +# Test downscaling from all supported formats from 256 to 32. +== downscale-32px.html?.bmp downscale-32px.html?.bmp +== downscale-32px.html?.gif downscale-32px.html?.gif +== downscale-32px.html?.jpg downscale-32px.html?.jpg +== downscale-32px.html?.png downscale-32px.html?.png +== downscale-32px.html?.svg downscale-32px.html?.svg +== downscale-32px.html?-bmp-in.ico downscale-32px.html?-bmp-in.ico +== downscale-32px.html?-png-in.ico downscale-32px.html?-png-in.ico + +# RUN TESTS WITH DOWNSCALE-DURING-DECODE ENABLED: +# # +default-preferences pref(image.downscale-during-decode.enabled,true) + +fuzzy-if(d2d,31,147) == downscale-1.html downscale-1.html +# intermittently 147 pixels on win7 accelerated only (not win8) + +== downscale-2a.html?203,52,left downscale-2a.html?203,52,left +== downscale-2b.html?203,52,left downscale-2b.html?203,52,left +skip == downscale-2c.html?203,52,left downscale-2c.html?203,52,left +== downscale-2d.html?203,52,left downscale-2d.html?203,52,left +== downscale-2e.html?203,52,left downscale-2e.html?203,52,left +== downscale-2f.html?203,52,left downscale-2f.html?203,52,left + +== downscale-2a.html?205,53,left downscale-2a.html?205,53,left +== downscale-2b.html?205,53,left downscale-2b.html?205,53,left +== downscale-2c.html?205,53,left downscale-2c.html?205,53,left +skip == downscale-2d.html?205,53,left downscale-2d.html?205,53,left +== downscale-2e.html?205,53,left downscale-2e.html?205,53,left +== downscale-2f.html?205,53,left downscale-2f.html?205,53,left + +== downscale-2a.html?203,52,right downscale-2a.html?203,52,right +== downscale-2b.html?203,52,right downscale-2b.html?203,52,right +== downscale-2c.html?203,52,right downscale-2c.html?203,52,right +== downscale-2d.html?203,52,right downscale-2d.html?203,52,right +== downscale-2e.html?203,52,right downscale-2e.html?203,52,right +== downscale-2f.html?203,52,right downscale-2f.html?203,52,right + +== downscale-2a.html?205,53,right downscale-2a.html?205,53,right +== downscale-2b.html?205,53,right downscale-2b.html?205,53,right +== downscale-2c.html?205,53,right downscale-2c.html?205,53,right +== downscale-2d.html?205,53,right downscale-2d.html?205,53,right +== downscale-2e.html?205,53,right downscale-2e.html?205,53,right +== downscale-2f.html?205,53,right downscale-2f.html?205,53,right + +== downscale-2a.html?203,52,top downscale-2a.html?203,52,top +== downscale-2b.html?203,52,top downscale-2b.html?203,52,top +== downscale-2c.html?203,52,top downscale-2c.html?203,52,top +skip == downscale-2d.html?203,52,top downscale-2d.html?203,52,top +== downscale-2e.html?203,52,top downscale-2e.html?203,52,top +== downscale-2f.html?203,52,top downscale-2f.html?203,52,top + +== downscale-2a.html?205,53,top downscale-2a.html?205,53,top +== downscale-2b.html?205,53,top downscale-2b.html?205,53,top +== downscale-2c.html?205,53,top downscale-2c.html?205,53,top +== downscale-2d.html?205,53,top downscale-2d.html?205,53,top +== downscale-2e.html?205,53,top downscale-2e.html?205,53,top +== downscale-2f.html?205,53,top downscale-2f.html?205,53,top + +== downscale-2a.html?203,52,bottom downscale-2a.html?203,52,bottom +== downscale-2b.html?203,52,bottom downscale-2b.html?203,52,bottom +== downscale-2c.html?203,52,bottom downscale-2c.html?203,52,bottom +== downscale-2d.html?203,52,bottom downscale-2d.html?203,52,bottom +skip == downscale-2e.html?203,52,bottom downscale-2e.html?203,52,bottom +== downscale-2f.html?203,52,bottom downscale-2f.html?203,52,bottom + +== downscale-2a.html?205,53,bottom downscale-2a.html?205,53,bottom +== downscale-2b.html?205,53,bottom downscale-2b.html?205,53,bottom +== downscale-2c.html?205,53,bottom downscale-2c.html?205,53,bottom +== downscale-2d.html?205,53,bottom downscale-2d.html?205,53,bottom +== downscale-2e.html?205,53,bottom downscale-2e.html?205,53,bottom +== downscale-2f.html?205,53,bottom downscale-2f.html?205,53,bottom + +== downscale-moz-icon-1.html downscale-moz-icon-1.html + +== downscale-png.html?16,16,interlaced downscale-png.html?16,16,interlaced +== downscale-png.html?24,24,interlaced downscale-png.html?24,24,interlaced + +# Non-transparent and transparent ICO images +random == downscale-16px.html?ff-0RGB.ico downscale-16px.html?ff-0RGB.ico +random == downscale-16px.html?ff-ARGB.ico downscale-16px.html?ff-ARGB.ico + +# Upside-down (negative height) BMP +random == downscale-8px.html?top-to-bottom-16x16-24bpp.bmp downscale-8px.html?top-to-bottom-16x16-24bpp.bmp + +# Test downscaling from all supported formats from 256 to 32. +== downscale-32px.html?.bmp downscale-32px.html?.bmp +== downscale-32px.html?.gif downscale-32px.html?.gif +== downscale-32px.html?.jpg downscale-32px.html?.jpg +== downscale-32px.html?.png downscale-32px.html?.png +== downscale-32px.html?.svg downscale-32px.html?.svg +== downscale-32px.html?-bmp-in.ico downscale-32px.html?-bmp-in.ico +== downscale-32px.html?-png-in.ico downscale-32px.html?-png-in.ico diff --git a/image/test/reftest/downscaling/reftest.list b/image/test/reftest/downscaling/reftest.list new file mode 100644 index 000000000..300edd81b --- /dev/null +++ b/image/test/reftest/downscaling/reftest.list @@ -0,0 +1,193 @@ +# Reftests for downscaling +# +# Downscaling can be a lossy process, so a bit of mismatch is acceptable here, +# as long as it's barely noticable visually. When necessary, this can be +# explicitly allowed via 'fuzzy'/'fuzzy-if' annotations. +# +# Many of these tests check primarily that we don't lose rows or columns of +# pixels when downscaling by making sure that the result isn't too similar to +# about:blank. A small amount of fuzziness is used to ensure that the tests +# don't pass because of very slight deviations; passing tests should be +# substantially different from about:blank. This fuzziness should *not* be +# removed as doing so would make the tests pass in situations where they +# shouldn't. +# +# IMPORTANT: For robustness, each test should be listed *twice* in this +# manifest -- once with the high quality downscaling pref disabled, and once +# with this pref enabled. The pref is set via "default-preferences", so +# simply appending a new test to the lists below each of those lines should be +# sufficient. +# +# Also note that Mac OS X has its own system-level downscaling algorithm, so +# tests here may need Mac-specific "fuzzy-if(cocoaWidget,...)" annotations. +# Similarly, modern versions of Windows have slightly different downscaling +# behavior than other platforms, and may require "fuzzy-if(winWidget,...)". + + +# RUN TESTS NOT AFFECTED BY DOWNSCALE-DURING-DECODE: +# ================================================== +fuzzy-if(skiaContent,14,416) == downscale-svg-1a.html downscale-svg-1-ref.html?80 +fuzzy(80,468) == downscale-svg-1b.html downscale-svg-1-ref.html?72 +fuzzy-if(skiaContent,8,292) == downscale-svg-1c.html downscale-svg-1-ref.html?64 +fuzzy(17,208) == downscale-svg-1d.html downscale-svg-1-ref.html?53 +fuzzy(78,216) fuzzy-if(skiaContent,110,181) == downscale-svg-1e.html downscale-svg-1-ref.html?40 +fuzzy(51,90) fuzzy-if(skiaContent,142,77) == downscale-svg-1f.html downscale-svg-1-ref.html?24 + +# RUN TESTS WITH DOWNSCALE-DURING-DECODE DISABLED: +# ================================================ +default-preferences pref(image.downscale-during-decode.enabled,false) + +fuzzy-if(winWidget,16,20) fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1-ref.html + +fuzzy(20,999) != downscale-2a.html?203,52,left about:blank +fuzzy(20,999) != downscale-2b.html?203,52,left about:blank +fuzzy(20,999) != downscale-2c.html?203,52,left about:blank +fuzzy(20,999) != downscale-2d.html?203,52,left about:blank +fuzzy(20,999) != downscale-2e.html?203,52,left about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,left about:blank +fuzzy(20,999) != downscale-2b.html?205,53,left about:blank +fuzzy(20,999) != downscale-2c.html?205,53,left about:blank +fuzzy(20,999) != downscale-2d.html?205,53,left about:blank +fuzzy(20,999) != downscale-2e.html?205,53,left about:blank + +fuzzy(20,999) != downscale-2a.html?203,52,right about:blank +fuzzy(20,999) != downscale-2b.html?203,52,right about:blank +fuzzy(20,999) != downscale-2c.html?203,52,right about:blank +fuzzy(20,999) != downscale-2d.html?203,52,right about:blank +fuzzy(20,999) != downscale-2e.html?203,52,right about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,right about:blank +fuzzy(20,999) != downscale-2b.html?205,53,right about:blank +fuzzy(20,999) != downscale-2c.html?205,53,right about:blank +fuzzy(20,999) != downscale-2d.html?205,53,right about:blank +fuzzy(20,999) != downscale-2e.html?205,53,right about:blank + +fuzzy(20,999) != downscale-2a.html?203,52,top about:blank +fuzzy(20,999) != downscale-2b.html?203,52,top about:blank +fuzzy(20,999) != downscale-2c.html?203,52,top about:blank +fuzzy(20,999) != downscale-2d.html?203,52,top about:blank +fuzzy(20,999) != downscale-2e.html?203,52,top about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,top about:blank +fuzzy(20,999) != downscale-2b.html?205,53,top about:blank +fuzzy(20,999) != downscale-2c.html?205,53,top about:blank +fuzzy(20,999) != downscale-2d.html?205,53,top about:blank +fuzzy(20,999) != downscale-2e.html?205,53,top about:blank + +fuzzy(20,999) != downscale-2a.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2b.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2c.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2d.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2e.html?203,52,bottom about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2b.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2c.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2d.html?205,53,bottom about:blank +fuzzy(20,999) fails-if(OSX>=1008&&!skiaContent) != downscale-2e.html?205,53,bottom about:blank + +fuzzy(63,3391) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html + +== downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal +== downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal + +# Non-transparent and transparent ICO images +== downscale-16px.html?ff-0RGB.ico downscale-16px.html?ff-0RGB.png +fuzzy(1,1) == downscale-16px.html?ff-ARGB.ico downscale-16px.html?ff-ARGB.png + +# Upside-down (negative height) BMP +== downscale-8px.html?top-to-bottom-16x16-24bpp.bmp downscale-8px.html?bmp-size-16x16-24bpp.png + +# Test downscaling from all supported formats from 256 to 32. +== downscale-32px.html?.bmp downscale-32px-ref.html +== downscale-32px.html?.gif downscale-32px-ref.html +fuzzy(1,1024) == downscale-32px.html?.jpg downscale-32px-ref.html +== downscale-32px.html?.png downscale-32px-ref.html +== downscale-32px.html?.svg downscale-32px-ref.html +== downscale-32px.html?-bmp-in.ico downscale-32px-ref.html +== downscale-32px.html?-png-in.ico downscale-32px-ref.html + +# RUN TESTS WITH DOWNSCALE-DURING-DECODE ENABLED: +# =============================================== +default-preferences pref(image.downscale-during-decode.enabled,true) + +fuzzy(31,127) fuzzy-if(d2d,31,147) == downscale-1.html downscale-1-ref.html # intermittently 147 pixels on win7 accelerated only (not win8) + +fuzzy(20,999) != downscale-2a.html?203,52,left about:blank +fuzzy(20,999) != downscale-2b.html?203,52,left about:blank +fuzzy(20,999) != downscale-2c.html?203,52,left about:blank +fuzzy(20,999) != downscale-2d.html?203,52,left about:blank +fuzzy(20,999) != downscale-2e.html?203,52,left about:blank +fuzzy(20,999) != downscale-2f.html?203,52,left about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,left about:blank +fuzzy(20,999) != downscale-2b.html?205,53,left about:blank +fuzzy(20,999) != downscale-2c.html?205,53,left about:blank +fuzzy(20,999) != downscale-2d.html?205,53,left about:blank +fuzzy(20,999) != downscale-2e.html?205,53,left about:blank +fuzzy(20,999) != downscale-2f.html?205,53,left about:blank + +fuzzy(20,999) != downscale-2a.html?203,52,right about:blank +fuzzy(20,999) != downscale-2b.html?203,52,right about:blank +fuzzy(20,999) != downscale-2c.html?203,52,right about:blank +fuzzy(20,999) != downscale-2d.html?203,52,right about:blank +fuzzy(20,999) != downscale-2e.html?203,52,right about:blank +fuzzy(20,999) != downscale-2f.html?203,52,right about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,right about:blank +fuzzy(20,999) != downscale-2b.html?205,53,right about:blank +fuzzy(20,999) != downscale-2c.html?205,53,right about:blank +fuzzy(20,999) != downscale-2d.html?205,53,right about:blank +fuzzy(20,999) != downscale-2e.html?205,53,right about:blank +fuzzy(20,999) != downscale-2f.html?205,53,right about:blank + +fuzzy(20,999) != downscale-2a.html?203,52,top about:blank +fuzzy(20,999) != downscale-2b.html?203,52,top about:blank +fuzzy(20,999) != downscale-2c.html?203,52,top about:blank +fuzzy(20,999) != downscale-2d.html?203,52,top about:blank +fuzzy(20,999) != downscale-2e.html?203,52,top about:blank +fuzzy(20,999) != downscale-2f.html?203,52,top about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,top about:blank +fuzzy(20,999) != downscale-2b.html?205,53,top about:blank +fuzzy(20,999) != downscale-2c.html?205,53,top about:blank +fuzzy(20,999) != downscale-2d.html?205,53,top about:blank +fuzzy(20,999) != downscale-2e.html?205,53,top about:blank +fuzzy(20,999) != downscale-2f.html?205,53,top about:blank + +fuzzy(20,999) != downscale-2a.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2b.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2c.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2d.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2e.html?203,52,bottom about:blank +fuzzy(20,999) != downscale-2f.html?203,52,bottom about:blank + +fuzzy(20,999) != downscale-2a.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2b.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2c.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2d.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2e.html?205,53,bottom about:blank +fuzzy(20,999) != downscale-2f.html?205,53,bottom about:blank + +# Skip on WinXP with skia content +fuzzy(71,4439) fails-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html + +== downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal +== downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal + +# Non-transparent and transparent ICO images +fuzzy(1,3) == downscale-16px.html?ff-0RGB.ico downscale-16px.html?ff-0RGB.png +fuzzy(3,32) == downscale-16px.html?ff-ARGB.ico downscale-16px.html?ff-ARGB.png + +# Upside-down (negative height) BMP +== downscale-8px.html?top-to-bottom-16x16-24bpp.bmp downscale-8px.html?bmp-size-16x16-24bpp.png + +# Test downscaling from all supported formats from 256 to 32. +fuzzy(18,128) == downscale-32px.html?.bmp downscale-32px-ref.html +fuzzy(18,128) == downscale-32px.html?.gif downscale-32px-ref.html +fuzzy(19,992) == downscale-32px.html?.jpg downscale-32px-ref.html +fuzzy(18,128) == downscale-32px.html?.png downscale-32px-ref.html +== downscale-32px.html?.svg downscale-32px-ref.html +fuzzy(18,128) == downscale-32px.html?-bmp-in.ico downscale-32px-ref.html +fuzzy(18,128) == downscale-32px.html?-png-in.ico downscale-32px-ref.html diff --git a/image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp b/image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp new file mode 100644 index 000000000..bd18f85d4 Binary files /dev/null and b/image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp differ 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 @@ + + + Image reftest wrapper + + + + + + + + + + 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= +# - 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 +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= +# - 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 +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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-15x15.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-16x16.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-17x17.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-1x1.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-256x256.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-2x2.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-31x31.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-32x32.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-33x33.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-3x3.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-4x4.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-5x5.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-6x6.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-7x7.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-8x8.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-9x9.png 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 Binary files /dev/null and b/image/test/reftest/encoders-lossless/test.png differ diff --git a/image/test/reftest/generic/accept-image-catchall-ref.html b/image/test/reftest/generic/accept-image-catchall-ref.html new file mode 100644 index 000000000..32daa9f5d --- /dev/null +++ b/image/test/reftest/generic/accept-image-catchall-ref.html @@ -0,0 +1,12 @@ + + + + + Accept: header should include image/* catchall + + + + + diff --git a/image/test/reftest/generic/accept-image-catchall.html b/image/test/reftest/generic/accept-image-catchall.html new file mode 100644 index 000000000..bcacd9fd8 --- /dev/null +++ b/image/test/reftest/generic/accept-image-catchall.html @@ -0,0 +1,13 @@ + + + + + Accept: header should include */* catchall + + + + + diff --git a/image/test/reftest/generic/check-header.sjs b/image/test/reftest/generic/check-header.sjs new file mode 100644 index 000000000..9e905bc1c --- /dev/null +++ b/image/test/reftest/generic/check-header.sjs @@ -0,0 +1,72 @@ +const BinaryOutputStream = Components.Constructor("@mozilla.org/binaryoutputstream;1", "nsIBinaryOutputStream", "setOutputStream"); + +function isCatchall(v) +{ + // "*/*" exactly + return /^\*\/\*$/.test(v); +} + +/* +# Python used to generate the following byte array +def toHex(n): + if n < 16: return "0x" + hex(n)[2:].upper() + return "0x" + hex(n)[2:].upper() + +def hexFile(name): + f = open(name, "rb") + try: + while True: + print toHex(ord(f.read(1))) + ", ", + except: + pass + +hexFile("image/test/reftest/generic/green.png") +*/ + +const IMAGE_DATA = + [ + 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, + 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, + 0x00, 0x64, 0x08, 0x02, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x02, 0x03, + 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, + 0x1C, 0xE9, 0x00, 0x00, 0x00, 0x9E, 0x49, 0x44, 0x41, 0x54, 0x78, + 0xDA, 0xED, 0xD0, 0x31, 0x01, 0x00, 0x00, 0x08, 0x03, 0xA0, 0x69, + 0xFF, 0xCE, 0x5A, 0xC1, 0xCF, 0x07, 0x22, 0x50, 0x99, 0x70, 0xD4, + 0x0A, 0x64, 0xC9, 0x92, 0x25, 0x4B, 0x96, 0x2C, 0x05, 0xB2, 0x64, + 0xC9, 0x92, 0x25, 0x4B, 0x96, 0x02, 0x59, 0xB2, 0x64, 0xC9, 0x92, + 0x25, 0x4B, 0x81, 0x2C, 0x59, 0xB2, 0x64, 0xC9, 0x92, 0xA5, 0x40, + 0x96, 0x2C, 0x59, 0xB2, 0x64, 0xC9, 0x52, 0x20, 0x4B, 0x96, 0x2C, + 0x59, 0xB2, 0x64, 0x29, 0x90, 0x25, 0x4B, 0x96, 0x2C, 0x59, 0xB2, + 0x14, 0xC8, 0x92, 0x25, 0x4B, 0x96, 0x2C, 0x59, 0x0A, 0x64, 0xC9, + 0x92, 0x25, 0x4B, 0x96, 0x2C, 0x05, 0xB2, 0x64, 0xC9, 0x92, 0x25, + 0x4B, 0x96, 0x02, 0x59, 0xB2, 0x64, 0xC9, 0x92, 0x25, 0x4B, 0x81, + 0x2C, 0x59, 0xB2, 0x64, 0xC9, 0x92, 0xA5, 0x40, 0x96, 0x2C, 0x59, + 0xB2, 0x64, 0xC9, 0x52, 0x20, 0x4B, 0x96, 0x2C, 0x59, 0xB2, 0x64, + 0x29, 0x90, 0x25, 0x4B, 0x96, 0x2C, 0x59, 0xB2, 0x14, 0xC8, 0x92, + 0x25, 0x4B, 0x96, 0x2C, 0x59, 0x0A, 0x64, 0xC9, 0xFA, 0xB6, 0x89, + 0x5F, 0x01, 0xC7, 0x24, 0x83, 0xB2, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82, + ]; + +function handleRequest(request, response) +{ + response.setHeader("Content-Type", "text/plain", false); + response.setHeader("Cache-Control", "no-cache", false); + + var accept = request.hasHeader("Accept") + ? request.getHeader("Accept") + : ""; + + if (accept.split(",").some(isCatchall)) + { + response.setHeader("Content-Type", "image/png", false); + + var stream = new BinaryOutputStream(response.bodyOutputStream); + stream.writeByteArray(IMAGE_DATA, IMAGE_DATA.length); + } + else + { + response.setStatusLine(request.httpVersion, 404, "Not found"); + response.write("Accept header contained: " + accept); + } +} diff --git a/image/test/reftest/generic/green.png b/image/test/reftest/generic/green.png new file mode 100644 index 000000000..4718c00e6 Binary files /dev/null and b/image/test/reftest/generic/green.png differ diff --git a/image/test/reftest/generic/reftest-stylo.list b/image/test/reftest/generic/reftest-stylo.list new file mode 100644 index 000000000..1c0cbd6d9 --- /dev/null +++ b/image/test/reftest/generic/reftest-stylo.list @@ -0,0 +1,2 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +HTTP == accept-image-catchall.html accept-image-catchall.html diff --git a/image/test/reftest/generic/reftest.list b/image/test/reftest/generic/reftest.list new file mode 100644 index 000000000..c8d850ccb --- /dev/null +++ b/image/test/reftest/generic/reftest.list @@ -0,0 +1 @@ +HTTP == accept-image-catchall.html accept-image-catchall-ref.html diff --git a/image/test/reftest/gif/1bit-255-trans.gif b/image/test/reftest/gif/1bit-255-trans.gif new file mode 100644 index 000000000..60273ba81 Binary files /dev/null and b/image/test/reftest/gif/1bit-255-trans.gif differ diff --git a/image/test/reftest/gif/1bit-255-trans.png b/image/test/reftest/gif/1bit-255-trans.png new file mode 100644 index 000000000..611480ac4 Binary files /dev/null and b/image/test/reftest/gif/1bit-255-trans.png differ diff --git a/image/test/reftest/gif/ImageDocument.css b/image/test/reftest/gif/ImageDocument.css new file mode 100644 index 000000000..b44981098 --- /dev/null +++ b/image/test/reftest/gif/ImageDocument.css @@ -0,0 +1,16 @@ +body { + background-image: url("chrome://global/skin/media/imagedoc-darknoise.png"); + margin: 0; +} + +body > :first-child { + 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/gif/animation1a.gif b/image/test/reftest/gif/animation1a.gif new file mode 100644 index 000000000..d32827654 Binary files /dev/null and b/image/test/reftest/gif/animation1a.gif differ diff --git a/image/test/reftest/gif/animation2a-finalframe.gif b/image/test/reftest/gif/animation2a-finalframe.gif new file mode 100644 index 000000000..8d9c4aaf7 Binary files /dev/null and b/image/test/reftest/gif/animation2a-finalframe.gif differ diff --git a/image/test/reftest/gif/animation2a.gif b/image/test/reftest/gif/animation2a.gif new file mode 100644 index 000000000..07abf8d98 Binary files /dev/null and b/image/test/reftest/gif/animation2a.gif differ diff --git a/image/test/reftest/gif/blue.gif b/image/test/reftest/gif/blue.gif new file mode 100644 index 000000000..f9dbeeea8 Binary files /dev/null and b/image/test/reftest/gif/blue.gif differ diff --git a/image/test/reftest/gif/comment.gif b/image/test/reftest/gif/comment.gif new file mode 100644 index 000000000..255cceb41 Binary files /dev/null and b/image/test/reftest/gif/comment.gif differ diff --git a/image/test/reftest/gif/comment.png b/image/test/reftest/gif/comment.png new file mode 100644 index 000000000..89394ba18 Binary files /dev/null and b/image/test/reftest/gif/comment.png differ diff --git a/image/test/reftest/gif/delaytest.html b/image/test/reftest/gif/delaytest.html new file mode 100644 index 000000000..58fb080f9 --- /dev/null +++ b/image/test/reftest/gif/delaytest.html @@ -0,0 +1,41 @@ + + + +Delayed image reftest wrapper + + + + + + diff --git a/image/test/reftest/gif/in-colormap-trans.gif b/image/test/reftest/gif/in-colormap-trans.gif new file mode 100644 index 000000000..48f5c7caf Binary files /dev/null and b/image/test/reftest/gif/in-colormap-trans.gif differ diff --git a/image/test/reftest/gif/in-colormap-trans.png b/image/test/reftest/gif/in-colormap-trans.png new file mode 100644 index 000000000..08761dfe4 Binary files /dev/null and b/image/test/reftest/gif/in-colormap-trans.png differ diff --git a/image/test/reftest/gif/one-color-offset-ref.gif b/image/test/reftest/gif/one-color-offset-ref.gif new file mode 100644 index 000000000..14a59ff47 Binary files /dev/null and b/image/test/reftest/gif/one-color-offset-ref.gif differ diff --git a/image/test/reftest/gif/one-color-offset.gif b/image/test/reftest/gif/one-color-offset.gif new file mode 100644 index 000000000..e6d7c4932 Binary files /dev/null and b/image/test/reftest/gif/one-color-offset.gif differ diff --git a/image/test/reftest/gif/out-of-colormap-trans.gif b/image/test/reftest/gif/out-of-colormap-trans.gif new file mode 100644 index 000000000..17e747c9b Binary files /dev/null and b/image/test/reftest/gif/out-of-colormap-trans.gif differ diff --git a/image/test/reftest/gif/out-of-colormap-trans.png b/image/test/reftest/gif/out-of-colormap-trans.png new file mode 100644 index 000000000..8d3eb581a Binary files /dev/null and b/image/test/reftest/gif/out-of-colormap-trans.png differ diff --git a/image/test/reftest/gif/red.gif b/image/test/reftest/gif/red.gif new file mode 100644 index 000000000..d3c32bae2 Binary files /dev/null and b/image/test/reftest/gif/red.gif differ diff --git a/image/test/reftest/gif/reftest-stylo.list b/image/test/reftest/gif/reftest-stylo.list new file mode 100644 index 000000000..5567ca61d --- /dev/null +++ b/image/test/reftest/gif/reftest-stylo.list @@ -0,0 +1,57 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# GIF tests + +# tests for bug 519589 +== 1bit-255-trans.gif 1bit-255-trans.gif +== in-colormap-trans.gif in-colormap-trans.gif +== out-of-colormap-trans.gif out-of-colormap-trans.gif + +# a GIF file that uses the comment extension +fails == comment.gif comment.gif + +# a GIF file with a background smaller than the size of the canvas +== small-background-size.gif small-background-size.gif +== small-background-size-2.gif small-background-size-2.gif + +# a transparent gif that disposes previous frames with clear; we must properly +# clear each frame to pass. +random == delaytest.html?transparent-animation.gif delaytest.html?transparent-animation.gif +# incorrect timing dependence (bug 558678) + +# test for bug 641198 +skip == test_bug641198.html test_bug641198.html +# Disabled; see bug 1120144. + +# Bug 1062886: a gif with a single color and an offset +== one-color-offset.gif one-color-offset.gif + +# Bug 1068230 +== tile-transform.html tile-transform.html + +# Bug 1234077 +== truncated-framerect.html truncated-framerect.html + +# webcam-simulacrum.mgif is a hand-edited file containing red.gif and blue.gif, +# concatenated together with the relevant headers for +# multipart/x-mixed-replace. Specifically, with the headers in +# webcam-simulacrum.mjpg^headers^, the web browser will get the following: +# +# HTTP 200 OK +# Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +# +# --BOUNDARYOMG\r\n +# Content-Type: image/gif\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG\r\n +# Content-Type: image/gif\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG--\r\n +# +# (The boundary is arbitrary, and just has to be defined as something that +# won't be in the text of the contents themselves. --$(boundary)\r\n means +# "Here is the beginning of a boundary," and --$(boundary)-- means "All done +# sending you parts.") +skip-if(B2G) HTTP == webcam.html webcam.html +# bug 773482 diff --git a/image/test/reftest/gif/reftest.list b/image/test/reftest/gif/reftest.list new file mode 100644 index 000000000..75a0252b6 --- /dev/null +++ b/image/test/reftest/gif/reftest.list @@ -0,0 +1,29 @@ +# GIF tests + +# tests for bug 519589 +== 1bit-255-trans.gif 1bit-255-trans.png +== in-colormap-trans.gif in-colormap-trans.png +== out-of-colormap-trans.gif out-of-colormap-trans.png + +# a GIF file that uses the comment extension +== comment.gif comment.png + +# a GIF file with a background smaller than the size of the canvas +== small-background-size.gif small-background-size-ref.gif +== small-background-size-2.gif small-background-size-2-ref.gif + +# a transparent gif that disposes previous frames with clear; we must properly +# clear each frame to pass. +random == delaytest.html?transparent-animation.gif transparent-animation-finalframe.gif # incorrect timing dependence (bug 558678) + +# test for bug 641198 +skip == test_bug641198.html animation2a-finalframe.gif # Disabled; see bug 1120144. + +# Bug 1062886: a gif with a single color and an offset +== one-color-offset.gif one-color-offset-ref.gif + +# Bug 1068230 +== tile-transform.html tile-transform-ref.html + +# Bug 1234077 +== truncated-framerect.html truncated-framerect-ref.html diff --git a/image/test/reftest/gif/small-background-size-2-ref.gif b/image/test/reftest/gif/small-background-size-2-ref.gif new file mode 100644 index 000000000..b513c41aa Binary files /dev/null and b/image/test/reftest/gif/small-background-size-2-ref.gif differ diff --git a/image/test/reftest/gif/small-background-size-2.gif b/image/test/reftest/gif/small-background-size-2.gif new file mode 100644 index 000000000..a5e214767 Binary files /dev/null and b/image/test/reftest/gif/small-background-size-2.gif differ diff --git a/image/test/reftest/gif/small-background-size-ref.gif b/image/test/reftest/gif/small-background-size-ref.gif new file mode 100644 index 000000000..1b656ce43 Binary files /dev/null and b/image/test/reftest/gif/small-background-size-ref.gif differ diff --git a/image/test/reftest/gif/small-background-size.gif b/image/test/reftest/gif/small-background-size.gif new file mode 100644 index 000000000..8185eb71e Binary files /dev/null and b/image/test/reftest/gif/small-background-size.gif differ diff --git a/image/test/reftest/gif/test_bug641198.html b/image/test/reftest/gif/test_bug641198.html new file mode 100644 index 000000000..46bdb0d47 --- /dev/null +++ b/image/test/reftest/gif/test_bug641198.html @@ -0,0 +1,53 @@ + + + +Test for bug 641198 + + + + + +Animated + + + + + diff --git a/image/test/reftest/gif/tile-transform-ref.html b/image/test/reftest/gif/tile-transform-ref.html new file mode 100644 index 000000000..5dac1a5bd --- /dev/null +++ b/image/test/reftest/gif/tile-transform-ref.html @@ -0,0 +1,12 @@ + + + + + Intermediate surface should be transformed correctly when tiling an image + + + + + diff --git a/image/test/reftest/gif/tile-transform.html b/image/test/reftest/gif/tile-transform.html new file mode 100644 index 000000000..541ae6bbc --- /dev/null +++ b/image/test/reftest/gif/tile-transform.html @@ -0,0 +1,12 @@ + + + + + Intermediate surface should be transformed correctly when tiling an image + + + + + diff --git a/image/test/reftest/gif/tiletest-ref.png b/image/test/reftest/gif/tiletest-ref.png new file mode 100644 index 000000000..b493899cc Binary files /dev/null and b/image/test/reftest/gif/tiletest-ref.png differ diff --git a/image/test/reftest/gif/tiletest.gif b/image/test/reftest/gif/tiletest.gif new file mode 100644 index 000000000..7a04c9654 Binary files /dev/null and b/image/test/reftest/gif/tiletest.gif differ diff --git a/image/test/reftest/gif/transparent-animation-finalframe.gif b/image/test/reftest/gif/transparent-animation-finalframe.gif new file mode 100644 index 000000000..a55f92a81 Binary files /dev/null and b/image/test/reftest/gif/transparent-animation-finalframe.gif differ diff --git a/image/test/reftest/gif/transparent-animation.gif b/image/test/reftest/gif/transparent-animation.gif new file mode 100644 index 000000000..b2895487b Binary files /dev/null and b/image/test/reftest/gif/transparent-animation.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif b/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif new file mode 100644 index 000000000..ca9bf2fa7 Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-interlaced.gif b/image/test/reftest/gif/truncated-framerect-interlaced.gif new file mode 100644 index 000000000..59709898b Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect-interlaced.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-ref.gif b/image/test/reftest/gif/truncated-framerect-ref.gif new file mode 100644 index 000000000..ab79a455b Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect-ref.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-ref.html b/image/test/reftest/gif/truncated-framerect-ref.html new file mode 100644 index 000000000..ef48b8a19 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect-ref.html @@ -0,0 +1,33 @@ + + + + + Bug 1234077 - Make sure GIFs still render correctly with a truncated frameRect + + + + + +
+ +
+ +
+ +
+ + diff --git a/image/test/reftest/gif/truncated-framerect.gif b/image/test/reftest/gif/truncated-framerect.gif new file mode 100644 index 000000000..8febb2a74 Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect.gif differ diff --git a/image/test/reftest/gif/truncated-framerect.html b/image/test/reftest/gif/truncated-framerect.html new file mode 100644 index 000000000..c1c5df653 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect.html @@ -0,0 +1,28 @@ + + + + + Bug 1234077 - Make sure GIFs still render correctly with a truncated frameRect + + + + + +
+ +
+ +
+ +
+ + diff --git a/image/test/reftest/ico/cur/pointer.cur b/image/test/reftest/ico/cur/pointer.cur new file mode 100644 index 000000000..025ebaed1 Binary files /dev/null and b/image/test/reftest/ico/cur/pointer.cur differ diff --git a/image/test/reftest/ico/cur/pointer.png b/image/test/reftest/ico/cur/pointer.png new file mode 100644 index 000000000..84ad8f3fb Binary files /dev/null and b/image/test/reftest/ico/cur/pointer.png differ diff --git a/image/test/reftest/ico/cur/reftest-stylo.list b/image/test/reftest/ico/cur/reftest-stylo.list new file mode 100644 index 000000000..b59c26dc5 --- /dev/null +++ b/image/test/reftest/ico/cur/reftest-stylo.list @@ -0,0 +1,5 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP and PNG mixed tests + +skip == wrapper.html?pointer.cur wrapper.html?pointer.cur + diff --git a/image/test/reftest/ico/cur/reftest.list b/image/test/reftest/ico/cur/reftest.list new file mode 100644 index 000000000..635136506 --- /dev/null +++ b/image/test/reftest/ico/cur/reftest.list @@ -0,0 +1,4 @@ +# ICO BMP and PNG mixed tests + +== wrapper.html?pointer.cur wrapper.html?pointer.png + diff --git a/image/test/reftest/ico/cur/wrapper.html b/image/test/reftest/ico/cur/wrapper.html new file mode 100644 index 000000000..5bbe75e01 --- /dev/null +++ b/image/test/reftest/ico/cur/wrapper.html @@ -0,0 +1,27 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico new file mode 100644 index 000000000..0f51d504a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png new file mode 100644 index 000000000..152b30d71 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico new file mode 100644 index 000000000..def2a4ece Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png new file mode 100644 index 000000000..064a68bb2 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico new file mode 100644 index 000000000..b68cf0ef0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png new file mode 100644 index 000000000..956c78ece Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico new file mode 100644 index 000000000..d96a4a0e1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png new file mode 100644 index 000000000..90088351f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico new file mode 100644 index 000000000..4f10ad13c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png new file mode 100644 index 000000000..9a294696c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico new file mode 100644 index 000000000..5af8bef61 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png new file mode 100644 index 000000000..7a07a124e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico new file mode 100644 index 000000000..63d95e3b7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png new file mode 100644 index 000000000..0a23d8c8e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico new file mode 100644 index 000000000..09c140f1b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png new file mode 100644 index 000000000..3b09f8076 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico new file mode 100644 index 000000000..bbfc3165a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png new file mode 100644 index 000000000..d1fe6ddee Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico new file mode 100644 index 000000000..279ecb835 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png new file mode 100644 index 000000000..078d3dc5d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico new file mode 100644 index 000000000..fa1862c1c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png new file mode 100644 index 000000000..e64e12b2a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico new file mode 100644 index 000000000..733b1f12b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png new file mode 100644 index 000000000..b8519a874 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico new file mode 100644 index 000000000..ba3097cec Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png new file mode 100644 index 000000000..3977b5454 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico new file mode 100644 index 000000000..52e32df27 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png new file mode 100644 index 000000000..caa9246b6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico new file mode 100644 index 000000000..c29651400 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png new file mode 100644 index 000000000..30e1b0249 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico new file mode 100644 index 000000000..8ce9915c4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png new file mode 100644 index 000000000..9dbaae84c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico new file mode 100644 index 000000000..485dff028 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png new file mode 100644 index 000000000..220138840 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico new file mode 100644 index 000000000..38f34ec50 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png new file mode 100644 index 000000000..7fe1b548b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico new file mode 100644 index 000000000..8e361306c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png new file mode 100644 index 000000000..062152e3b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-1bpp/reftest-stylo.list new file mode 100644 index 000000000..43a597e78 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-1bpp/reftest-stylo.list @@ -0,0 +1,25 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP 1BPP tests + +# Images of various sizes +== ico-size-1x1-1bpp.ico ico-size-1x1-1bpp.ico +== ico-size-2x2-1bpp.ico ico-size-2x2-1bpp.ico +== ico-size-3x3-1bpp.ico ico-size-3x3-1bpp.ico +== ico-size-4x4-1bpp.ico ico-size-4x4-1bpp.ico +== ico-size-5x5-1bpp.ico ico-size-5x5-1bpp.ico +== ico-size-6x6-1bpp.ico ico-size-6x6-1bpp.ico +== ico-size-7x7-1bpp.ico ico-size-7x7-1bpp.ico +== ico-size-8x8-1bpp.ico ico-size-8x8-1bpp.ico +== ico-size-9x9-1bpp.ico ico-size-9x9-1bpp.ico +== ico-size-15x15-1bpp.ico ico-size-15x15-1bpp.ico +== ico-size-16x16-1bpp.ico ico-size-16x16-1bpp.ico +== ico-size-17x17-1bpp.ico ico-size-17x17-1bpp.ico +== ico-size-31x31-1bpp.ico ico-size-31x31-1bpp.ico +== ico-size-32x32-1bpp.ico ico-size-32x32-1bpp.ico +== ico-size-33x33-1bpp.ico ico-size-33x33-1bpp.ico +skip-if(B2G) == ico-size-256x256-1bpp.ico ico-size-256x256-1bpp.ico +# bug 773482 +== ico-partial-transparent-1bpp.ico ico-partial-transparent-1bpp.ico +== ico-transparent-1bpp.ico ico-transparent-1bpp.ico +== ico-not-square-transparent-1bpp.ico ico-not-square-transparent-1bpp.ico + diff --git a/image/test/reftest/ico/ico-bmp-1bpp/reftest.list b/image/test/reftest/ico/ico-bmp-1bpp/reftest.list new file mode 100644 index 000000000..1b9ca1348 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-1bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 1BPP tests + +# Images of various sizes +== ico-size-1x1-1bpp.ico ico-size-1x1-1bpp.png +== ico-size-2x2-1bpp.ico ico-size-2x2-1bpp.png +== ico-size-3x3-1bpp.ico ico-size-3x3-1bpp.png +== ico-size-4x4-1bpp.ico ico-size-4x4-1bpp.png +== ico-size-5x5-1bpp.ico ico-size-5x5-1bpp.png +== ico-size-6x6-1bpp.ico ico-size-6x6-1bpp.png +== ico-size-7x7-1bpp.ico ico-size-7x7-1bpp.png +== ico-size-8x8-1bpp.ico ico-size-8x8-1bpp.png +== ico-size-9x9-1bpp.ico ico-size-9x9-1bpp.png +== ico-size-15x15-1bpp.ico ico-size-15x15-1bpp.png +== ico-size-16x16-1bpp.ico ico-size-16x16-1bpp.png +== ico-size-17x17-1bpp.ico ico-size-17x17-1bpp.png +== ico-size-31x31-1bpp.ico ico-size-31x31-1bpp.png +== ico-size-32x32-1bpp.ico ico-size-32x32-1bpp.png +== ico-size-33x33-1bpp.ico ico-size-33x33-1bpp.png +== ico-size-256x256-1bpp.ico ico-size-256x256-1bpp.png +== ico-partial-transparent-1bpp.ico ico-partial-transparent-1bpp.png +== ico-transparent-1bpp.ico ico-transparent-1bpp.png +== ico-not-square-transparent-1bpp.ico ico-not-square-transparent-1bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico new file mode 100644 index 000000000..16d6584ef Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png new file mode 100644 index 000000000..a881048b9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico new file mode 100644 index 000000000..ab0dc4bce Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png new file mode 100644 index 000000000..0363210c7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico new file mode 100644 index 000000000..8721b0d16 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png new file mode 100644 index 000000000..e1287430d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico new file mode 100644 index 000000000..04e473618 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico new file mode 100644 index 000000000..308ccb7a6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png new file mode 100644 index 000000000..00fb8e4f3 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico new file mode 100644 index 000000000..e2bf90c09 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png new file mode 100644 index 000000000..c05f5fef8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico new file mode 100644 index 000000000..c3977400a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png new file mode 100644 index 000000000..84bfada76 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico new file mode 100644 index 000000000..dba180a07 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png new file mode 100644 index 000000000..e512d3f9b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico new file mode 100644 index 000000000..aa67502f6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png new file mode 100644 index 000000000..e4a864251 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico new file mode 100644 index 000000000..a85b871c5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png new file mode 100644 index 000000000..3a6fbe8ee Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico new file mode 100644 index 000000000..a5c49374d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png new file mode 100644 index 000000000..72ef7eb63 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico new file mode 100644 index 000000000..8a0b9433f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png new file mode 100644 index 000000000..cb42ec4f8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico new file mode 100644 index 000000000..feb3f11e1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png new file mode 100644 index 000000000..e6afafd89 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico new file mode 100644 index 000000000..d607ca572 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png new file mode 100644 index 000000000..a844aff76 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico new file mode 100644 index 000000000..62a231602 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico new file mode 100644 index 000000000..d884ecfd7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png new file mode 100644 index 000000000..ab2f89274 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico new file mode 100644 index 000000000..782ae220d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png new file mode 100644 index 000000000..fe2ff40a1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico new file mode 100644 index 000000000..97992643b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png new file mode 100644 index 000000000..18ab4b25d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico new file mode 100644 index 000000000..8e361306c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png new file mode 100644 index 000000000..062152e3b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-24bpp/reftest-stylo.list new file mode 100644 index 000000000..54d8521dc --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-24bpp/reftest-stylo.list @@ -0,0 +1,24 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP 24BPP tests + +# Images of various sizes +== ico-size-1x1-24bpp.ico ico-size-1x1-24bpp.ico +== ico-size-2x2-24bpp.ico ico-size-2x2-24bpp.ico +== ico-size-3x3-24bpp.ico ico-size-3x3-24bpp.ico +== ico-size-4x4-24bpp.ico ico-size-4x4-24bpp.ico +skip == ico-size-5x5-24bpp.ico ico-size-5x5-24bpp.ico +== ico-size-6x6-24bpp.ico ico-size-6x6-24bpp.ico +== ico-size-7x7-24bpp.ico ico-size-7x7-24bpp.ico +== ico-size-8x8-24bpp.ico ico-size-8x8-24bpp.ico +== ico-size-9x9-24bpp.ico ico-size-9x9-24bpp.ico +== ico-size-15x15-24bpp.ico ico-size-15x15-24bpp.ico +== ico-size-16x16-24bpp.ico ico-size-16x16-24bpp.ico +== ico-size-17x17-24bpp.ico ico-size-17x17-24bpp.ico +== ico-size-31x31-24bpp.ico ico-size-31x31-24bpp.ico +fails == ico-size-32x32-24bpp.ico ico-size-32x32-24bpp.ico +== ico-size-33x33-24bpp.ico ico-size-33x33-24bpp.ico +== ico-size-256x256-24bpp.ico ico-size-256x256-24bpp.ico +== ico-partial-transparent-24bpp.ico ico-partial-transparent-24bpp.ico +== ico-transparent-24bpp.ico ico-transparent-24bpp.ico +== ico-not-square-transparent-24bpp.ico ico-not-square-transparent-24bpp.ico + diff --git a/image/test/reftest/ico/ico-bmp-24bpp/reftest.list b/image/test/reftest/ico/ico-bmp-24bpp/reftest.list new file mode 100644 index 000000000..877293660 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-24bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 24BPP tests + +# Images of various sizes +== ico-size-1x1-24bpp.ico ico-size-1x1-24bpp.png +== ico-size-2x2-24bpp.ico ico-size-2x2-24bpp.png +== ico-size-3x3-24bpp.ico ico-size-3x3-24bpp.png +== ico-size-4x4-24bpp.ico ico-size-4x4-24bpp.png +== ico-size-5x5-24bpp.ico ico-size-5x5-24bpp.png +== ico-size-6x6-24bpp.ico ico-size-6x6-24bpp.png +== ico-size-7x7-24bpp.ico ico-size-7x7-24bpp.png +== ico-size-8x8-24bpp.ico ico-size-8x8-24bpp.png +== ico-size-9x9-24bpp.ico ico-size-9x9-24bpp.png +== ico-size-15x15-24bpp.ico ico-size-15x15-24bpp.png +== ico-size-16x16-24bpp.ico ico-size-16x16-24bpp.png +== ico-size-17x17-24bpp.ico ico-size-17x17-24bpp.png +== ico-size-31x31-24bpp.ico ico-size-31x31-24bpp.png +== ico-size-32x32-24bpp.ico ico-size-32x32-24bpp.png +== ico-size-33x33-24bpp.ico ico-size-33x33-24bpp.png +== ico-size-256x256-24bpp.ico ico-size-256x256-24bpp.png +== ico-partial-transparent-24bpp.ico ico-partial-transparent-24bpp.png +== ico-transparent-24bpp.ico ico-transparent-24bpp.png +== ico-not-square-transparent-24bpp.ico ico-not-square-transparent-24bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico new file mode 100644 index 000000000..dd0299c41 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png new file mode 100644 index 000000000..befc66555 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico new file mode 100644 index 000000000..8ad62f7d0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png new file mode 100644 index 000000000..226ad6494 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico new file mode 100644 index 000000000..1f1b6b51c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png new file mode 100644 index 000000000..e1287430d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico new file mode 100644 index 000000000..7a8f01529 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico new file mode 100644 index 000000000..b92860be4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png new file mode 100644 index 000000000..00fb8e4f3 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico new file mode 100644 index 000000000..5ad60c575 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png new file mode 100644 index 000000000..c05f5fef8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico new file mode 100644 index 000000000..f8b530ef0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png new file mode 100644 index 000000000..84bfada76 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico new file mode 100644 index 000000000..e5b2bf7e7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png new file mode 100644 index 000000000..e512d3f9b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico new file mode 100644 index 000000000..ddcbde85f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png new file mode 100644 index 000000000..e4a864251 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico new file mode 100644 index 000000000..a89c01648 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png new file mode 100644 index 000000000..3a6fbe8ee Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico new file mode 100644 index 000000000..cda9133f8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png new file mode 100644 index 000000000..72ef7eb63 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico new file mode 100644 index 000000000..3894ccf21 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png new file mode 100644 index 000000000..cb42ec4f8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico new file mode 100644 index 000000000..828494c66 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png new file mode 100644 index 000000000..e6afafd89 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico new file mode 100644 index 000000000..4f0a2bcc7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png new file mode 100644 index 000000000..a844aff76 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico new file mode 100644 index 000000000..5524769e6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico new file mode 100644 index 000000000..6aeebb898 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png new file mode 100644 index 000000000..ab2f89274 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico new file mode 100644 index 000000000..824c744a2 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png new file mode 100644 index 000000000..fe2ff40a1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico new file mode 100644 index 000000000..cf1f6e9c8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png new file mode 100644 index 000000000..18ab4b25d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico new file mode 100644 index 000000000..151b7cb36 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png new file mode 100644 index 000000000..062152e3b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-32bpp/reftest-stylo.list new file mode 100644 index 000000000..3ee7e7b00 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-32bpp/reftest-stylo.list @@ -0,0 +1,23 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP 32BPP tests + +# Images of various sizes +== ico-size-1x1-32bpp.ico ico-size-1x1-32bpp.ico +== ico-size-2x2-32bpp.ico ico-size-2x2-32bpp.ico +== ico-size-3x3-32bpp.ico ico-size-3x3-32bpp.ico +== ico-size-4x4-32bpp.ico ico-size-4x4-32bpp.ico +== ico-size-5x5-32bpp.ico ico-size-5x5-32bpp.ico +== ico-size-6x6-32bpp.ico ico-size-6x6-32bpp.ico +== ico-size-7x7-32bpp.ico ico-size-7x7-32bpp.ico +== ico-size-8x8-32bpp.ico ico-size-8x8-32bpp.ico +== ico-size-9x9-32bpp.ico ico-size-9x9-32bpp.ico +== ico-size-15x15-32bpp.ico ico-size-15x15-32bpp.ico +== ico-size-16x16-32bpp.ico ico-size-16x16-32bpp.ico +== ico-size-17x17-32bpp.ico ico-size-17x17-32bpp.ico +== ico-size-31x31-32bpp.ico ico-size-31x31-32bpp.ico +== ico-size-32x32-32bpp.ico ico-size-32x32-32bpp.ico +== ico-size-33x33-32bpp.ico ico-size-33x33-32bpp.ico +== ico-size-256x256-32bpp.ico ico-size-256x256-32bpp.ico +== ico-partial-transparent-32bpp.ico ico-partial-transparent-32bpp.ico +== ico-transparent-32bpp.ico ico-transparent-32bpp.ico +== ico-not-square-transparent-32bpp.ico ico-not-square-transparent-32bpp.ico diff --git a/image/test/reftest/ico/ico-bmp-32bpp/reftest.list b/image/test/reftest/ico/ico-bmp-32bpp/reftest.list new file mode 100644 index 000000000..e05355a2b --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-32bpp/reftest.list @@ -0,0 +1,22 @@ +# ICO BMP 32BPP tests + +# Images of various sizes +== ico-size-1x1-32bpp.ico ico-size-1x1-32bpp.png +== ico-size-2x2-32bpp.ico ico-size-2x2-32bpp.png +== ico-size-3x3-32bpp.ico ico-size-3x3-32bpp.png +== ico-size-4x4-32bpp.ico ico-size-4x4-32bpp.png +== ico-size-5x5-32bpp.ico ico-size-5x5-32bpp.png +== ico-size-6x6-32bpp.ico ico-size-6x6-32bpp.png +== ico-size-7x7-32bpp.ico ico-size-7x7-32bpp.png +== ico-size-8x8-32bpp.ico ico-size-8x8-32bpp.png +== ico-size-9x9-32bpp.ico ico-size-9x9-32bpp.png +== ico-size-15x15-32bpp.ico ico-size-15x15-32bpp.png +== ico-size-16x16-32bpp.ico ico-size-16x16-32bpp.png +== ico-size-17x17-32bpp.ico ico-size-17x17-32bpp.png +== ico-size-31x31-32bpp.ico ico-size-31x31-32bpp.png +== ico-size-32x32-32bpp.ico ico-size-32x32-32bpp.png +== ico-size-33x33-32bpp.ico ico-size-33x33-32bpp.png +== ico-size-256x256-32bpp.ico ico-size-256x256-32bpp.png +== ico-partial-transparent-32bpp.ico ico-partial-transparent-32bpp.png +== ico-transparent-32bpp.ico ico-transparent-32bpp.png +== ico-not-square-transparent-32bpp.ico ico-not-square-transparent-32bpp.png diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico new file mode 100644 index 000000000..d502d2ef6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png new file mode 100644 index 000000000..3e556ad29 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico new file mode 100644 index 000000000..7bd3b8a69 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png new file mode 100644 index 000000000..9ff0ce41f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico new file mode 100644 index 000000000..de5c49e2a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png new file mode 100644 index 000000000..5d4a3f953 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico new file mode 100644 index 000000000..b856b3f37 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png new file mode 100644 index 000000000..d45d63f53 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico new file mode 100644 index 000000000..44e055d2f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png new file mode 100644 index 000000000..bf4890329 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico new file mode 100644 index 000000000..fd46c328d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png new file mode 100644 index 000000000..d41dd645b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico new file mode 100644 index 000000000..6d28edaa8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png new file mode 100644 index 000000000..3acdef830 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico new file mode 100644 index 000000000..7dc4afde6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png new file mode 100644 index 000000000..b2d605041 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico new file mode 100644 index 000000000..0471332d6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png new file mode 100644 index 000000000..cb12a3448 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico new file mode 100644 index 000000000..ef005dc5b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png new file mode 100644 index 000000000..58d867d12 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico new file mode 100644 index 000000000..4c71963a4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png new file mode 100644 index 000000000..064fde198 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico new file mode 100644 index 000000000..aaa6350e9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png new file mode 100644 index 000000000..e34114d5c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico new file mode 100644 index 000000000..767bebed4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png new file mode 100644 index 000000000..3efa55562 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico new file mode 100644 index 000000000..309b6fe5b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png new file mode 100644 index 000000000..02ebf57a5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico new file mode 100644 index 000000000..255fda6a8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png new file mode 100644 index 000000000..1f5769d09 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico new file mode 100644 index 000000000..1a3963452 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png new file mode 100644 index 000000000..59a1b98b5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico new file mode 100644 index 000000000..40bc9f893 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png new file mode 100644 index 000000000..cf44f5967 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico new file mode 100644 index 000000000..bda12f32b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png new file mode 100644 index 000000000..2e0736413 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico new file mode 100644 index 000000000..8e361306c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png new file mode 100644 index 000000000..062152e3b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-4bpp/reftest-stylo.list new file mode 100644 index 000000000..073755a4b --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-4bpp/reftest-stylo.list @@ -0,0 +1,24 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP 4BPP tests + +# Images of various sizes +== ico-size-1x1-4bpp.ico ico-size-1x1-4bpp.ico +== ico-size-2x2-4bpp.ico ico-size-2x2-4bpp.ico +== ico-size-3x3-4bpp.ico ico-size-3x3-4bpp.ico +== ico-size-4x4-4bpp.ico ico-size-4x4-4bpp.ico +== ico-size-5x5-4bpp.ico ico-size-5x5-4bpp.ico +== ico-size-6x6-4bpp.ico ico-size-6x6-4bpp.ico +== ico-size-7x7-4bpp.ico ico-size-7x7-4bpp.ico +== ico-size-8x8-4bpp.ico ico-size-8x8-4bpp.ico +== ico-size-9x9-4bpp.ico ico-size-9x9-4bpp.ico +== ico-size-15x15-4bpp.ico ico-size-15x15-4bpp.ico +== ico-size-16x16-4bpp.ico ico-size-16x16-4bpp.ico +== ico-size-17x17-4bpp.ico ico-size-17x17-4bpp.ico +== ico-size-31x31-4bpp.ico ico-size-31x31-4bpp.ico +== ico-size-32x32-4bpp.ico ico-size-32x32-4bpp.ico +== ico-size-33x33-4bpp.ico ico-size-33x33-4bpp.ico +== ico-size-256x256-4bpp.ico ico-size-256x256-4bpp.ico +== ico-partial-transparent-4bpp.ico ico-partial-transparent-4bpp.ico +== ico-transparent-4bpp.ico ico-transparent-4bpp.ico +== ico-not-square-transparent-4bpp.ico ico-not-square-transparent-4bpp.ico + diff --git a/image/test/reftest/ico/ico-bmp-4bpp/reftest.list b/image/test/reftest/ico/ico-bmp-4bpp/reftest.list new file mode 100644 index 000000000..6caac4ac8 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-4bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 4BPP tests + +# Images of various sizes +== ico-size-1x1-4bpp.ico ico-size-1x1-4bpp.png +== ico-size-2x2-4bpp.ico ico-size-2x2-4bpp.png +== ico-size-3x3-4bpp.ico ico-size-3x3-4bpp.png +== ico-size-4x4-4bpp.ico ico-size-4x4-4bpp.png +== ico-size-5x5-4bpp.ico ico-size-5x5-4bpp.png +== ico-size-6x6-4bpp.ico ico-size-6x6-4bpp.png +== ico-size-7x7-4bpp.ico ico-size-7x7-4bpp.png +== ico-size-8x8-4bpp.ico ico-size-8x8-4bpp.png +== ico-size-9x9-4bpp.ico ico-size-9x9-4bpp.png +== ico-size-15x15-4bpp.ico ico-size-15x15-4bpp.png +== ico-size-16x16-4bpp.ico ico-size-16x16-4bpp.png +== ico-size-17x17-4bpp.ico ico-size-17x17-4bpp.png +== ico-size-31x31-4bpp.ico ico-size-31x31-4bpp.png +== ico-size-32x32-4bpp.ico ico-size-32x32-4bpp.png +== ico-size-33x33-4bpp.ico ico-size-33x33-4bpp.png +== ico-size-256x256-4bpp.ico ico-size-256x256-4bpp.png +== ico-partial-transparent-4bpp.ico ico-partial-transparent-4bpp.png +== ico-transparent-4bpp.ico ico-transparent-4bpp.png +== ico-not-square-transparent-4bpp.ico ico-not-square-transparent-4bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico new file mode 100644 index 000000000..d28b9a04e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png new file mode 100644 index 000000000..36a4eb512 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico new file mode 100644 index 000000000..9074caa40 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png new file mode 100644 index 000000000..6f990f257 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico new file mode 100644 index 000000000..f3f3a1353 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png new file mode 100644 index 000000000..e1287430d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico new file mode 100644 index 000000000..24c20e23e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png new file mode 100644 index 000000000..2e66b2e5f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico new file mode 100644 index 000000000..7fa66b9b2 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png new file mode 100644 index 000000000..4d11d7561 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico new file mode 100644 index 000000000..3cf3320ea Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png new file mode 100644 index 000000000..c05f5fef8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico new file mode 100644 index 000000000..524b6f7c8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png new file mode 100644 index 000000000..f367468c9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico new file mode 100644 index 000000000..95d8375a0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png new file mode 100644 index 000000000..e512d3f9b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico new file mode 100644 index 000000000..780675447 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png new file mode 100644 index 000000000..84bf61078 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico new file mode 100644 index 000000000..d21cc5b96 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png new file mode 100644 index 000000000..349fd4df2 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico new file mode 100644 index 000000000..1b419b263 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png new file mode 100644 index 000000000..a4c100649 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico new file mode 100644 index 000000000..869f74fcd Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png new file mode 100644 index 000000000..cb42ec4f8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico new file mode 100644 index 000000000..396756372 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png new file mode 100644 index 000000000..e6afafd89 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico new file mode 100644 index 000000000..92814e366 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png new file mode 100644 index 000000000..a844aff76 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico new file mode 100644 index 000000000..1af478a8a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico new file mode 100644 index 000000000..1c70820eb Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png new file mode 100644 index 000000000..ab2f89274 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico new file mode 100644 index 000000000..782ae220d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png new file mode 100644 index 000000000..fe2ff40a1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico new file mode 100644 index 000000000..6825372b4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png new file mode 100644 index 000000000..18ab4b25d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico new file mode 100644 index 000000000..8e361306c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png new file mode 100644 index 000000000..062152e3b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-8bpp/reftest-stylo.list new file mode 100644 index 000000000..c5269d3c8 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-8bpp/reftest-stylo.list @@ -0,0 +1,25 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP 8BPP tests + +# Images of various sizes +== ico-size-1x1-8bpp.ico ico-size-1x1-8bpp.ico +== ico-size-2x2-8bpp.ico ico-size-2x2-8bpp.ico +== ico-size-3x3-8bpp.ico ico-size-3x3-8bpp.ico +== ico-size-4x4-8bpp.ico ico-size-4x4-8bpp.ico +== ico-size-5x5-8bpp.ico ico-size-5x5-8bpp.ico +skip == ico-size-6x6-8bpp.ico ico-size-6x6-8bpp.ico +== ico-size-7x7-8bpp.ico ico-size-7x7-8bpp.ico +== ico-size-8x8-8bpp.ico ico-size-8x8-8bpp.ico +== ico-size-9x9-8bpp.ico ico-size-9x9-8bpp.ico +== ico-size-15x15-8bpp.ico ico-size-15x15-8bpp.ico +== ico-size-16x16-8bpp.ico ico-size-16x16-8bpp.ico +== ico-size-17x17-8bpp.ico ico-size-17x17-8bpp.ico +== ico-size-31x31-8bpp.ico ico-size-31x31-8bpp.ico +== ico-size-32x32-8bpp.ico ico-size-32x32-8bpp.ico +== ico-size-33x33-8bpp.ico ico-size-33x33-8bpp.ico +skip-if(B2G) == ico-size-256x256-8bpp.ico ico-size-256x256-8bpp.ico +# bug 773482 +== ico-partial-transparent-8bpp.ico ico-partial-transparent-8bpp.ico +== ico-transparent-8bpp.ico ico-transparent-8bpp.ico +== ico-not-square-transparent-8bpp.ico ico-not-square-transparent-8bpp.ico + diff --git a/image/test/reftest/ico/ico-bmp-8bpp/reftest.list b/image/test/reftest/ico/ico-bmp-8bpp/reftest.list new file mode 100644 index 000000000..5a6b54323 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-8bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 8BPP tests + +# Images of various sizes +== ico-size-1x1-8bpp.ico ico-size-1x1-8bpp.png +== ico-size-2x2-8bpp.ico ico-size-2x2-8bpp.png +== ico-size-3x3-8bpp.ico ico-size-3x3-8bpp.png +== ico-size-4x4-8bpp.ico ico-size-4x4-8bpp.png +== ico-size-5x5-8bpp.ico ico-size-5x5-8bpp.png +== ico-size-6x6-8bpp.ico ico-size-6x6-8bpp.png +== ico-size-7x7-8bpp.ico ico-size-7x7-8bpp.png +== ico-size-8x8-8bpp.ico ico-size-8x8-8bpp.png +== ico-size-9x9-8bpp.ico ico-size-9x9-8bpp.png +== ico-size-15x15-8bpp.ico ico-size-15x15-8bpp.png +== ico-size-16x16-8bpp.ico ico-size-16x16-8bpp.png +== ico-size-17x17-8bpp.ico ico-size-17x17-8bpp.png +== ico-size-31x31-8bpp.ico ico-size-31x31-8bpp.png +== ico-size-32x32-8bpp.ico ico-size-32x32-8bpp.png +== ico-size-33x33-8bpp.ico ico-size-33x33-8bpp.png +== ico-size-256x256-8bpp.ico ico-size-256x256-8bpp.png +== ico-partial-transparent-8bpp.ico ico-partial-transparent-8bpp.png +== ico-transparent-8bpp.ico ico-transparent-8bpp.png +== ico-not-square-transparent-8bpp.ico ico-not-square-transparent-8bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-corrupted/16x16.png b/image/test/reftest/ico/ico-bmp-corrupted/16x16.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/16x16.png differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico new file mode 100644 index 000000000..1189e4c04 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico new file mode 100644 index 000000000..8fd0a5d65 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico new file mode 100644 index 000000000..1f185ca62 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico new file mode 100644 index 000000000..a49a783c5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list new file mode 100644 index 000000000..1dd1a43ae --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list @@ -0,0 +1,11 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICOs containing corrupted BMP tests + +# Invalid value for bits per pixel (BPP) - detected when decoding the header. +skip == wrapper.html?invalid-bpp.ico wrapper.html?invalid-bpp.ico +# Invalid BPP values for RLE4 - detected when decoding the image data. +skip == wrapper.html?invalid-compression-RLE4.ico wrapper.html?invalid-compression-RLE4.ico +# Invalid BPP values for RLE8 - detected when decoding the image data. +skip == wrapper.html?invalid-compression-RLE8.ico wrapper.html?invalid-compression-RLE8.ico +# Invalid compression value - detected when decoding the image data. +skip == wrapper.html?invalid-compression.ico wrapper.html?invalid-compression.ico diff --git a/image/test/reftest/ico/ico-bmp-corrupted/reftest.list b/image/test/reftest/ico/ico-bmp-corrupted/reftest.list new file mode 100644 index 000000000..2467b1323 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/reftest.list @@ -0,0 +1,10 @@ +# ICOs containing corrupted BMP tests + +# Invalid value for bits per pixel (BPP) - detected when decoding the header. +== wrapper.html?invalid-bpp.ico about:blank +# Invalid BPP values for RLE4 - detected when decoding the image data. +== wrapper.html?invalid-compression-RLE4.ico about:blank +# Invalid BPP values for RLE8 - detected when decoding the image data. +== wrapper.html?invalid-compression-RLE8.ico about:blank +# Invalid compression value - detected when decoding the image data. +== wrapper.html?invalid-compression.ico about:blank diff --git a/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html b/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html new file mode 100644 index 000000000..5935f3763 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html @@ -0,0 +1,80 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico new file mode 100644 index 000000000..32e2c4995 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico differ diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png.png b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.png new file mode 100644 index 000000000..b6aee7409 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.png differ diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png b/image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png new file mode 100644 index 000000000..a05899127 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png differ diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png b/image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png new file mode 100644 index 000000000..61bea5c80 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png differ diff --git a/image/test/reftest/ico/ico-mixed/reftest-stylo.list b/image/test/reftest/ico/ico-mixed/reftest-stylo.list new file mode 100644 index 000000000..a095c2481 --- /dev/null +++ b/image/test/reftest/ico/ico-mixed/reftest-stylo.list @@ -0,0 +1,4 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO BMP and PNG mixed tests + +skip == mixed-bmp-png.ico mixed-bmp-png.ico diff --git a/image/test/reftest/ico/ico-mixed/reftest.list b/image/test/reftest/ico/ico-mixed/reftest.list new file mode 100644 index 000000000..36134e40a --- /dev/null +++ b/image/test/reftest/ico/ico-mixed/reftest.list @@ -0,0 +1,3 @@ +# ICO BMP and PNG mixed tests + +== mixed-bmp-png.ico mixed-bmp-png48.png diff --git a/image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico b/image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico new file mode 100644 index 000000000..18b97b0b7 Binary files /dev/null and b/image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico differ diff --git a/image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico b/image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico new file mode 100644 index 000000000..3fa5285c5 Binary files /dev/null and b/image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-15x15-png.ico b/image/test/reftest/ico/ico-png/ico-size-15x15-png.ico new file mode 100644 index 000000000..e67644a89 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-15x15-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-15x15-png.png b/image/test/reftest/ico/ico-png/ico-size-15x15-png.png new file mode 100644 index 000000000..e1287430d Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-15x15-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-16x16-png.ico b/image/test/reftest/ico/ico-png/ico-size-16x16-png.ico new file mode 100644 index 000000000..442ab4dc8 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-16x16-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-16x16-png.png b/image/test/reftest/ico/ico-png/ico-size-16x16-png.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-16x16-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-17x17-png.ico b/image/test/reftest/ico/ico-png/ico-size-17x17-png.ico new file mode 100644 index 000000000..f135385d7 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-17x17-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-17x17-png.png b/image/test/reftest/ico/ico-png/ico-size-17x17-png.png new file mode 100644 index 000000000..00fb8e4f3 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-17x17-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-1x1-png.ico b/image/test/reftest/ico/ico-png/ico-size-1x1-png.ico new file mode 100644 index 000000000..8eb80c7db Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-1x1-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-1x1-png.png b/image/test/reftest/ico/ico-png/ico-size-1x1-png.png new file mode 100644 index 000000000..c05f5fef8 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-1x1-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-256x256-png.ico b/image/test/reftest/ico/ico-png/ico-size-256x256-png.ico new file mode 100644 index 000000000..ecb88edf3 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-256x256-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-256x256-png.png b/image/test/reftest/ico/ico-png/ico-size-256x256-png.png new file mode 100644 index 000000000..2d2f52d6c Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-256x256-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-2x2-png.ico b/image/test/reftest/ico/ico-png/ico-size-2x2-png.ico new file mode 100644 index 000000000..5799953c9 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-2x2-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-2x2-png.png b/image/test/reftest/ico/ico-png/ico-size-2x2-png.png new file mode 100644 index 000000000..e512d3f9b Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-2x2-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-31x31-png.ico b/image/test/reftest/ico/ico-png/ico-size-31x31-png.ico new file mode 100644 index 000000000..2e9fbd8f9 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-31x31-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-31x31-png.png b/image/test/reftest/ico/ico-png/ico-size-31x31-png.png new file mode 100644 index 000000000..e4a864251 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-31x31-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-32x32-png.ico b/image/test/reftest/ico/ico-png/ico-size-32x32-png.ico new file mode 100644 index 000000000..af97a8663 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-32x32-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-32x32-png.png b/image/test/reftest/ico/ico-png/ico-size-32x32-png.png new file mode 100644 index 000000000..3a6fbe8ee Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-32x32-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-33x33-png.ico b/image/test/reftest/ico/ico-png/ico-size-33x33-png.ico new file mode 100644 index 000000000..2509c8c1f Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-33x33-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-33x33-png.png b/image/test/reftest/ico/ico-png/ico-size-33x33-png.png new file mode 100644 index 000000000..72ef7eb63 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-33x33-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-3x3-png.ico b/image/test/reftest/ico/ico-png/ico-size-3x3-png.ico new file mode 100644 index 000000000..d2cd649c8 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-3x3-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-3x3-png.png b/image/test/reftest/ico/ico-png/ico-size-3x3-png.png new file mode 100644 index 000000000..cb42ec4f8 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-3x3-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-4x4-png.ico b/image/test/reftest/ico/ico-png/ico-size-4x4-png.ico new file mode 100644 index 000000000..60180aad5 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-4x4-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-4x4-png.png b/image/test/reftest/ico/ico-png/ico-size-4x4-png.png new file mode 100644 index 000000000..e6afafd89 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-4x4-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-5x5-png.ico b/image/test/reftest/ico/ico-png/ico-size-5x5-png.ico new file mode 100644 index 000000000..089c0c885 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-5x5-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-5x5-png.png b/image/test/reftest/ico/ico-png/ico-size-5x5-png.png new file mode 100644 index 000000000..a844aff76 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-5x5-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-6x6-png.ico b/image/test/reftest/ico/ico-png/ico-size-6x6-png.ico new file mode 100644 index 000000000..2ee75d25a Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-6x6-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-6x6-png.png b/image/test/reftest/ico/ico-png/ico-size-6x6-png.png new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-6x6-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-7x7-png.ico b/image/test/reftest/ico/ico-png/ico-size-7x7-png.ico new file mode 100644 index 000000000..ade9a3ecd Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-7x7-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-7x7-png.png b/image/test/reftest/ico/ico-png/ico-size-7x7-png.png new file mode 100644 index 000000000..ab2f89274 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-7x7-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-8x8-png.ico b/image/test/reftest/ico/ico-png/ico-size-8x8-png.ico new file mode 100644 index 000000000..a0a150bad Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-8x8-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-8x8-png.png b/image/test/reftest/ico/ico-png/ico-size-8x8-png.png new file mode 100644 index 000000000..fe2ff40a1 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-8x8-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-9x9-png.ico b/image/test/reftest/ico/ico-png/ico-size-9x9-png.ico new file mode 100644 index 000000000..a53357b44 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-9x9-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-9x9-png.png b/image/test/reftest/ico/ico-png/ico-size-9x9-png.png new file mode 100644 index 000000000..18ab4b25d Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-9x9-png.png differ diff --git a/image/test/reftest/ico/ico-png/reftest-stylo.list b/image/test/reftest/ico/ico-png/reftest-stylo.list new file mode 100644 index 000000000..1fd990c89 --- /dev/null +++ b/image/test/reftest/ico/ico-png/reftest-stylo.list @@ -0,0 +1,30 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO PNG tests + +# Images of various sizes +skip == ico-size-1x1-png.ico ico-size-1x1-png.ico +== ico-size-2x2-png.ico ico-size-2x2-png.ico +skip == ico-size-3x3-png.ico ico-size-3x3-png.ico +skip == ico-size-4x4-png.ico ico-size-4x4-png.ico +skip == ico-size-5x5-png.ico ico-size-5x5-png.ico +skip == ico-size-6x6-png.ico ico-size-6x6-png.ico +== ico-size-7x7-png.ico ico-size-7x7-png.ico +fails skip == ico-size-8x8-png.ico ico-size-8x8-png.ico +skip == ico-size-9x9-png.ico ico-size-9x9-png.ico +skip == ico-size-15x15-png.ico ico-size-15x15-png.ico +skip == ico-size-16x16-png.ico ico-size-16x16-png.ico +skip == ico-size-17x17-png.ico ico-size-17x17-png.ico +skip == ico-size-31x31-png.ico ico-size-31x31-png.ico +skip == ico-size-32x32-png.ico ico-size-32x32-png.ico +skip == ico-size-33x33-png.ico ico-size-33x33-png.ico +# skip == ico-size-256x256-png.ico ico-size-256x256-png.ico + +# Corrupted files so no image should be loaded +# x00n0g01 - empty 0x0 grayscale file +skip == wrapper.html?x00n0g01.ico wrapper.html?x00n0g01.ico +# xcrn0g04 - added cr bytes +skip == wrapper.html?xcrn0g04.ico wrapper.html?xcrn0g04.ico + +# Test ICO PNG transparency +== transparent-png.ico transparent-png.ico + diff --git a/image/test/reftest/ico/ico-png/reftest.list b/image/test/reftest/ico/ico-png/reftest.list new file mode 100644 index 000000000..002d0e4f3 --- /dev/null +++ b/image/test/reftest/ico/ico-png/reftest.list @@ -0,0 +1,29 @@ +# ICO PNG tests + +# Images of various sizes +== ico-size-1x1-png.ico ico-size-1x1-png.png +== ico-size-2x2-png.ico ico-size-2x2-png.png +== ico-size-3x3-png.ico ico-size-3x3-png.png +== ico-size-4x4-png.ico ico-size-4x4-png.png +== ico-size-5x5-png.ico ico-size-5x5-png.png +== ico-size-6x6-png.ico ico-size-6x6-png.png +== ico-size-7x7-png.ico ico-size-7x7-png.png +== ico-size-8x8-png.ico ico-size-8x8-png.png +== ico-size-9x9-png.ico ico-size-9x9-png.png +== ico-size-15x15-png.ico ico-size-15x15-png.png +== ico-size-16x16-png.ico ico-size-16x16-png.png +== ico-size-17x17-png.ico ico-size-17x17-png.png +== ico-size-31x31-png.ico ico-size-31x31-png.png +== ico-size-32x32-png.ico ico-size-32x32-png.png +== ico-size-33x33-png.ico ico-size-33x33-png.png +== ico-size-256x256-png.ico ico-size-256x256-png.png + +# Corrupted files so no image should be loaded +# x00n0g01 - empty 0x0 grayscale file +== wrapper.html?x00n0g01.ico about:blank +# xcrn0g04 - added cr bytes +== wrapper.html?xcrn0g04.ico about:blank + +# Test ICO PNG transparency +== transparent-png.ico transparent-png.png + diff --git a/image/test/reftest/ico/ico-png/tmp.ico b/image/test/reftest/ico/ico-png/tmp.ico new file mode 100644 index 000000000..5723a2e77 Binary files /dev/null and b/image/test/reftest/ico/ico-png/tmp.ico differ diff --git a/image/test/reftest/ico/ico-png/transparent-png.ico b/image/test/reftest/ico/ico-png/transparent-png.ico new file mode 100644 index 000000000..cc8a4a31d Binary files /dev/null and b/image/test/reftest/ico/ico-png/transparent-png.ico differ diff --git a/image/test/reftest/ico/ico-png/transparent-png.png b/image/test/reftest/ico/ico-png/transparent-png.png new file mode 100644 index 000000000..29e3a2435 Binary files /dev/null and b/image/test/reftest/ico/ico-png/transparent-png.png differ diff --git a/image/test/reftest/ico/ico-png/wrapper.html b/image/test/reftest/ico/ico-png/wrapper.html new file mode 100644 index 000000000..0015856df --- /dev/null +++ b/image/test/reftest/ico/ico-png/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/ico/ico-png/x00n0g01.png b/image/test/reftest/ico/ico-png/x00n0g01.png new file mode 100644 index 000000000..db3a5fda7 Binary files /dev/null and b/image/test/reftest/ico/ico-png/x00n0g01.png differ diff --git a/image/test/reftest/ico/ico-png/xcrn0g04.png b/image/test/reftest/ico/ico-png/xcrn0g04.png new file mode 100644 index 000000000..5bce9f3ad Binary files /dev/null and b/image/test/reftest/ico/ico-png/xcrn0g04.png differ diff --git a/image/test/reftest/ico/reftest-stylo.list b/image/test/reftest/ico/reftest-stylo.list new file mode 100644 index 000000000..52cb9bc6c --- /dev/null +++ b/image/test/reftest/ico/reftest-stylo.list @@ -0,0 +1,13 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICO tests + +# bmp tests cause lots of intermittents +# include ico-bmp-1bpp/reftest-stylo.list +# include ico-bmp-4bpp/reftest-stylo.list +# include ico-bmp-8bpp/reftest-stylo.list +# include ico-bmp-24bpp/reftest-stylo.list +# include ico-bmp-32bpp/reftest-stylo.list +# include ico-bmp-corrupted/reftest-stylo.list +include ico-png/reftest-stylo.list +include ico-mixed/reftest-stylo.list +include cur/reftest-stylo.list diff --git a/image/test/reftest/ico/reftest.list b/image/test/reftest/ico/reftest.list new file mode 100644 index 000000000..22ed9b4fe --- /dev/null +++ b/image/test/reftest/ico/reftest.list @@ -0,0 +1,11 @@ +# ICO tests + +include ico-bmp-1bpp/reftest.list +include ico-bmp-4bpp/reftest.list +include ico-bmp-8bpp/reftest.list +include ico-bmp-24bpp/reftest.list +include ico-bmp-32bpp/reftest.list +include ico-bmp-corrupted/reftest.list +include ico-png/reftest.list +include ico-mixed/reftest.list +include cur/reftest.list diff --git a/image/test/reftest/img2html.html b/image/test/reftest/img2html.html new file mode 100644 index 000000000..57f45bbdd --- /dev/null +++ b/image/test/reftest/img2html.html @@ -0,0 +1,122 @@ + + +Image-to-html converter + + + +

Image-to-html converter

+

Enter the relative path to an image file, and this will convert it +to a pure HTML representation (no images).

+ + +
+ Path to image:
+ + Fill canvas with (instead of transparency).
+ +

+
+ (img / canvas/ imghtml) +

+ Result:
+ +
+ + + + + + diff --git a/image/test/reftest/jpeg/blue.jpg b/image/test/reftest/jpeg/blue.jpg new file mode 100644 index 000000000..b5fef5d26 Binary files /dev/null and b/image/test/reftest/jpeg/blue.jpg differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-1.jpg b/image/test/reftest/jpeg/jpg-cmyk-1.jpg new file mode 100644 index 000000000..ddb2c106f Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-1.jpg differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-1.png b/image/test/reftest/jpeg/jpg-cmyk-1.png new file mode 100644 index 000000000..06915d5bc Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-1.png differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-2.jpg b/image/test/reftest/jpeg/jpg-cmyk-2.jpg new file mode 100644 index 000000000..b955bde54 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-2.jpg differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-2.png b/image/test/reftest/jpeg/jpg-cmyk-2.png new file mode 100644 index 000000000..9691e42b6 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-2.png differ diff --git a/image/test/reftest/jpeg/jpg-gray.jpg b/image/test/reftest/jpeg/jpg-gray.jpg new file mode 100644 index 000000000..af0413e3c Binary files /dev/null and b/image/test/reftest/jpeg/jpg-gray.jpg differ diff --git a/image/test/reftest/jpeg/jpg-gray.png b/image/test/reftest/jpeg/jpg-gray.png new file mode 100644 index 000000000..c5aedc34d Binary files /dev/null and b/image/test/reftest/jpeg/jpg-gray.png differ diff --git a/image/test/reftest/jpeg/jpg-progressive.jpg b/image/test/reftest/jpeg/jpg-progressive.jpg new file mode 100644 index 000000000..db3cf59c2 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-progressive.jpg differ diff --git a/image/test/reftest/jpeg/jpg-progressive.png b/image/test/reftest/jpeg/jpg-progressive.png new file mode 100644 index 000000000..3a6fbe8ee Binary files /dev/null and b/image/test/reftest/jpeg/jpg-progressive.png differ diff --git a/image/test/reftest/jpeg/jpg-size-15x15.jpg b/image/test/reftest/jpeg/jpg-size-15x15.jpg new file mode 100644 index 000000000..efe120a27 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-15x15.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-15x15.png b/image/test/reftest/jpeg/jpg-size-15x15.png new file mode 100644 index 000000000..e1287430d Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-15x15.png differ diff --git a/image/test/reftest/jpeg/jpg-size-16x16.jpg b/image/test/reftest/jpeg/jpg-size-16x16.jpg new file mode 100644 index 000000000..148ec733f Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-16x16.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-16x16.png b/image/test/reftest/jpeg/jpg-size-16x16.png new file mode 100644 index 000000000..c04869e72 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-16x16.png differ diff --git a/image/test/reftest/jpeg/jpg-size-17x17.jpg b/image/test/reftest/jpeg/jpg-size-17x17.jpg new file mode 100644 index 000000000..b06bdb0d6 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-17x17.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-17x17.png b/image/test/reftest/jpeg/jpg-size-17x17.png new file mode 100644 index 000000000..00fb8e4f3 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-17x17.png differ diff --git a/image/test/reftest/jpeg/jpg-size-1x1.jpg b/image/test/reftest/jpeg/jpg-size-1x1.jpg new file mode 100644 index 000000000..73b68dfc0 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-1x1.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-1x1.png b/image/test/reftest/jpeg/jpg-size-1x1.png new file mode 100644 index 000000000..c05f5fef8 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-1x1.png differ diff --git a/image/test/reftest/jpeg/jpg-size-2x2.jpg b/image/test/reftest/jpeg/jpg-size-2x2.jpg new file mode 100644 index 000000000..bc50260ea Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-2x2.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-2x2.png b/image/test/reftest/jpeg/jpg-size-2x2.png new file mode 100644 index 000000000..e512d3f9b Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-2x2.png differ diff --git a/image/test/reftest/jpeg/jpg-size-31x31.jpg b/image/test/reftest/jpeg/jpg-size-31x31.jpg new file mode 100644 index 000000000..8fa0cc236 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-31x31.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-31x31.png b/image/test/reftest/jpeg/jpg-size-31x31.png new file mode 100644 index 000000000..e4a864251 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-31x31.png differ diff --git a/image/test/reftest/jpeg/jpg-size-32x32.jpg b/image/test/reftest/jpeg/jpg-size-32x32.jpg new file mode 100644 index 000000000..b11d62df6 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-32x32.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-32x32.png b/image/test/reftest/jpeg/jpg-size-32x32.png new file mode 100644 index 000000000..3a6fbe8ee Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-32x32.png differ diff --git a/image/test/reftest/jpeg/jpg-size-33x33.jpg b/image/test/reftest/jpeg/jpg-size-33x33.jpg new file mode 100644 index 000000000..5ac1169b4 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-33x33.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-33x33.png b/image/test/reftest/jpeg/jpg-size-33x33.png new file mode 100644 index 000000000..72ef7eb63 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-33x33.png differ diff --git a/image/test/reftest/jpeg/jpg-size-3x3.jpg b/image/test/reftest/jpeg/jpg-size-3x3.jpg new file mode 100644 index 000000000..cf370d8ec Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-3x3.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-3x3.png b/image/test/reftest/jpeg/jpg-size-3x3.png new file mode 100644 index 000000000..cb42ec4f8 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-3x3.png differ diff --git a/image/test/reftest/jpeg/jpg-size-4x4.jpg b/image/test/reftest/jpeg/jpg-size-4x4.jpg new file mode 100644 index 000000000..5adf760a1 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-4x4.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-4x4.png b/image/test/reftest/jpeg/jpg-size-4x4.png new file mode 100644 index 000000000..e6afafd89 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-4x4.png differ diff --git a/image/test/reftest/jpeg/jpg-size-5x5.jpg b/image/test/reftest/jpeg/jpg-size-5x5.jpg new file mode 100644 index 000000000..4d5fd0501 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-5x5.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-5x5.png b/image/test/reftest/jpeg/jpg-size-5x5.png new file mode 100644 index 000000000..a844aff76 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-5x5.png differ diff --git a/image/test/reftest/jpeg/jpg-size-6x6.jpg b/image/test/reftest/jpeg/jpg-size-6x6.jpg new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-6x6.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-6x6.png b/image/test/reftest/jpeg/jpg-size-6x6.png new file mode 100644 index 000000000..415c2d9c6 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-6x6.png differ diff --git a/image/test/reftest/jpeg/jpg-size-7x7.jpg b/image/test/reftest/jpeg/jpg-size-7x7.jpg new file mode 100644 index 000000000..5495f7e43 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-7x7.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-7x7.png b/image/test/reftest/jpeg/jpg-size-7x7.png new file mode 100644 index 000000000..ab2f89274 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-7x7.png differ diff --git a/image/test/reftest/jpeg/jpg-size-8x8.jpg b/image/test/reftest/jpeg/jpg-size-8x8.jpg new file mode 100644 index 000000000..84a5c8f42 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-8x8.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-8x8.png b/image/test/reftest/jpeg/jpg-size-8x8.png new file mode 100644 index 000000000..fe2ff40a1 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-8x8.png differ diff --git a/image/test/reftest/jpeg/jpg-size-9x9.jpg b/image/test/reftest/jpeg/jpg-size-9x9.jpg new file mode 100644 index 000000000..d0a15e599 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-9x9.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-9x9.png b/image/test/reftest/jpeg/jpg-size-9x9.png new file mode 100644 index 000000000..18ab4b25d Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-9x9.png differ diff --git a/image/test/reftest/jpeg/jpg-srgb-icc.jpg b/image/test/reftest/jpeg/jpg-srgb-icc.jpg new file mode 100644 index 000000000..3ebefac73 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-srgb-icc.jpg differ diff --git a/image/test/reftest/jpeg/jpg-srgb-icc.png b/image/test/reftest/jpeg/jpg-srgb-icc.png new file mode 100644 index 000000000..1d8efc687 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-srgb-icc.png differ diff --git a/image/test/reftest/jpeg/red.jpg b/image/test/reftest/jpeg/red.jpg new file mode 100644 index 000000000..8fca4b938 Binary files /dev/null and b/image/test/reftest/jpeg/red.jpg differ diff --git a/image/test/reftest/jpeg/reftest-stylo.list b/image/test/reftest/jpeg/reftest-stylo.list new file mode 100644 index 000000000..a906cde8e --- /dev/null +++ b/image/test/reftest/jpeg/reftest-stylo.list @@ -0,0 +1,57 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# JPEG tests + +# Images of various sizes. +fails == jpg-size-1x1.jpg jpg-size-1x1.jpg +fails == jpg-size-2x2.jpg jpg-size-2x2.jpg +fails == jpg-size-3x3.jpg jpg-size-3x3.jpg +fails == jpg-size-4x4.jpg jpg-size-4x4.jpg +fails == jpg-size-5x5.jpg jpg-size-5x5.jpg +== jpg-size-6x6.jpg jpg-size-6x6.jpg +fails == jpg-size-7x7.jpg jpg-size-7x7.jpg +fails == jpg-size-8x8.jpg jpg-size-8x8.jpg +fails == jpg-size-9x9.jpg jpg-size-9x9.jpg +fails == jpg-size-15x15.jpg jpg-size-15x15.jpg +fails == jpg-size-16x16.jpg jpg-size-16x16.jpg +fails == jpg-size-17x17.jpg jpg-size-17x17.jpg +fails == jpg-size-31x31.jpg jpg-size-31x31.jpg +fails == jpg-size-32x32.jpg jpg-size-32x32.jpg +fails == jpg-size-33x33.jpg jpg-size-33x33.jpg +# Progressive encoding +fails == jpg-progressive.jpg jpg-progressive.jpg +# Grayscale colorspace +fails == jpg-gray.jpg jpg-gray.jpg +# CMYK colorspace +fails == jpg-cmyk-1.jpg jpg-cmyk-1.jpg +fails == jpg-cmyk-2.jpg jpg-cmyk-2.jpg +# This intermittently fails on Android due to async image decoding (bug #685516) +# Sometimes the image decodes in time and the test passes, other times the image +# appears blank and the test fails. This only seems to be triggered since the +# switch to 24-bit colour (bug #803299). +fails random-if(Android) == jpg-srgb-icc.jpg jpg-srgb-icc.jpg + +# webcam-simulacrum.mjpg is a hand-edited file containing red.jpg and blue.jpg, +# concatenated together with the relevant headers for +# multipart/x-mixed-replace. Specifically, with the headers in +# webcam-simulacrum.mjpg^headers^, the web browser will get the following: +# +# HTTP 200 OK +# Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +# +# --BOUNDARYOMG\r\n +# Content-Type: image/jpeg\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG\r\n +# Content-Type: image/jpeg\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG--\r\n +# +# (The boundary is arbitrary, and just has to be defined as something that +# won't be in the text of the contents themselves. --$(boundary)\r\n means +# "Here is the beginning of a boundary," and --$(boundary)-- means "All done +# sending you parts.") +skip HTTP == webcam-simulacrum.mjpg webcam-simulacrum.mjpg +skip pref(image.mozsamplesize.enabled,true) == jpg-size-32x32.jpg#-moz-samplesize=2 jpg-size-32x32.jpg#-moz-samplesize=2 +skip pref(image.mozsamplesize.enabled,true) == jpg-size-32x32.jpg#-moz-samplesize=8 jpg-size-32x32.jpg#-moz-samplesize=8 diff --git a/image/test/reftest/jpeg/reftest.list b/image/test/reftest/jpeg/reftest.list new file mode 100644 index 000000000..0eafb77e7 --- /dev/null +++ b/image/test/reftest/jpeg/reftest.list @@ -0,0 +1,56 @@ +# JPEG tests + +# Images of various sizes. +== jpg-size-1x1.jpg jpg-size-1x1.png +== jpg-size-2x2.jpg jpg-size-2x2.png +== jpg-size-3x3.jpg jpg-size-3x3.png +== jpg-size-4x4.jpg jpg-size-4x4.png +== jpg-size-5x5.jpg jpg-size-5x5.png +== jpg-size-6x6.jpg jpg-size-6x6.png +== jpg-size-7x7.jpg jpg-size-7x7.png +== jpg-size-8x8.jpg jpg-size-8x8.png +== jpg-size-9x9.jpg jpg-size-9x9.png +== jpg-size-15x15.jpg jpg-size-15x15.png +== jpg-size-16x16.jpg jpg-size-16x16.png +== jpg-size-17x17.jpg jpg-size-17x17.png +== jpg-size-31x31.jpg jpg-size-31x31.png +== jpg-size-32x32.jpg jpg-size-32x32.png +== jpg-size-33x33.jpg jpg-size-33x33.png +# Progressive encoding +== jpg-progressive.jpg jpg-progressive.png +# Grayscale colorspace +== jpg-gray.jpg jpg-gray.png +# CMYK colorspace +== jpg-cmyk-1.jpg jpg-cmyk-1.png +== jpg-cmyk-2.jpg jpg-cmyk-2.png +# This intermittently fails on Android due to async image decoding (bug #685516) +# Sometimes the image decodes in time and the test passes, other times the image +# appears blank and the test fails. This only seems to be triggered since the +# switch to 24-bit colour (bug #803299). +random-if(Android) == jpg-srgb-icc.jpg jpg-srgb-icc.png + +# webcam-simulacrum.mjpg is a hand-edited file containing red.jpg and blue.jpg, +# concatenated together with the relevant headers for +# multipart/x-mixed-replace. Specifically, with the headers in +# webcam-simulacrum.mjpg^headers^, the web browser will get the following: +# +# HTTP 200 OK +# Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +# +# --BOUNDARYOMG\r\n +# Content-Type: image/jpeg\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG\r\n +# Content-Type: image/jpeg\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG--\r\n +# +# (The boundary is arbitrary, and just has to be defined as something that +# won't be in the text of the contents themselves. --$(boundary)\r\n means +# "Here is the beginning of a boundary," and --$(boundary)-- means "All done +# sending you parts.") +HTTP == webcam-simulacrum.mjpg blue.jpg +pref(image.mozsamplesize.enabled,true) fuzzy(21,256) == jpg-size-32x32.jpg#-moz-samplesize=2 jpg-size-16x16.png +pref(image.mozsamplesize.enabled,true) fuzzy(92,16) == jpg-size-32x32.jpg#-moz-samplesize=8 jpg-size-4x4.png diff --git a/image/test/reftest/jpeg/webcam-simulacrum.mjpg b/image/test/reftest/jpeg/webcam-simulacrum.mjpg new file mode 100644 index 000000000..a593273c0 Binary files /dev/null and b/image/test/reftest/jpeg/webcam-simulacrum.mjpg differ diff --git a/image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ b/image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ new file mode 100644 index 000000000..f5e846508 --- /dev/null +++ b/image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ @@ -0,0 +1,3 @@ +HTTP 200 OK +Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +Cache-Control: no-cache diff --git a/image/test/reftest/pngsuite-ancillary/ccwn2c08.html b/image/test/reftest/pngsuite-ancillary/ccwn2c08.html new file mode 100644 index 000000000..dc4996e2b --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ccwn2c08.html @@ -0,0 +1,1242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ccwn2c08.png b/image/test/reftest/pngsuite-ancillary/ccwn2c08.png new file mode 100644 index 000000000..47c24817b Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ccwn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ccwn3p08.html b/image/test/reftest/pngsuite-ancillary/ccwn3p08.html new file mode 100644 index 000000000..52e636eaa --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ccwn3p08.html @@ -0,0 +1,1272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ccwn3p08.png b/image/test/reftest/pngsuite-ancillary/ccwn3p08.png new file mode 100644 index 000000000..8bb2c1098 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ccwn3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdfn2c08.html b/image/test/reftest/pngsuite-ancillary/cdfn2c08.html new file mode 100644 index 000000000..aaae670ec --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdfn2c08.html @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdfn2c08.png b/image/test/reftest/pngsuite-ancillary/cdfn2c08.png new file mode 100644 index 000000000..559e5261e Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdfn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdhn2c08.html b/image/test/reftest/pngsuite-ancillary/cdhn2c08.html new file mode 100644 index 000000000..d56ebf2e1 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdhn2c08.html @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdhn2c08.png b/image/test/reftest/pngsuite-ancillary/cdhn2c08.png new file mode 100644 index 000000000..3e07e8ecb Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdhn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdsn2c08.html b/image/test/reftest/pngsuite-ancillary/cdsn2c08.html new file mode 100644 index 000000000..3ba83a6f5 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdsn2c08.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdsn2c08.png b/image/test/reftest/pngsuite-ancillary/cdsn2c08.png new file mode 100644 index 000000000..076c32cc0 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdsn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdun2c08.html b/image/test/reftest/pngsuite-ancillary/cdun2c08.html new file mode 100644 index 000000000..b78233718 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdun2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdun2c08.png b/image/test/reftest/pngsuite-ancillary/cdun2c08.png new file mode 100644 index 000000000..846033be6 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdun2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ch1n3p04.html b/image/test/reftest/pngsuite-ancillary/ch1n3p04.html new file mode 100644 index 000000000..dc2a121de --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ch1n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ch1n3p04.png b/image/test/reftest/pngsuite-ancillary/ch1n3p04.png new file mode 100644 index 000000000..17cd12dfc Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ch1n3p04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ch2n3p08.html b/image/test/reftest/pngsuite-ancillary/ch2n3p08.html new file mode 100644 index 000000000..78b72c61c --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ch2n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ch2n3p08.png b/image/test/reftest/pngsuite-ancillary/ch2n3p08.png new file mode 100644 index 000000000..25c17987a Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ch2n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cm0n0g04.html b/image/test/reftest/pngsuite-ancillary/cm0n0g04.html new file mode 100644 index 000000000..25d3abca3 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cm0n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cm0n0g04.png b/image/test/reftest/pngsuite-ancillary/cm0n0g04.png new file mode 100644 index 000000000..9fba5db3b Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cm0n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cm7n0g04.html b/image/test/reftest/pngsuite-ancillary/cm7n0g04.html new file mode 100644 index 000000000..25d3abca3 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cm7n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cm7n0g04.png b/image/test/reftest/pngsuite-ancillary/cm7n0g04.png new file mode 100644 index 000000000..f7dc46e68 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cm7n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cm9n0g04.html b/image/test/reftest/pngsuite-ancillary/cm9n0g04.html new file mode 100644 index 000000000..25d3abca3 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cm9n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cm9n0g04.png b/image/test/reftest/pngsuite-ancillary/cm9n0g04.png new file mode 100644 index 000000000..dd70911ad Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cm9n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n2c16.html b/image/test/reftest/pngsuite-ancillary/cs3n2c16.html new file mode 100644 index 000000000..bc4ab1488 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs3n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n2c16.png b/image/test/reftest/pngsuite-ancillary/cs3n2c16.png new file mode 100644 index 000000000..bf5fd20a2 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs3n2c16.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n3p08.html b/image/test/reftest/pngsuite-ancillary/cs3n3p08.html new file mode 100644 index 000000000..21557a400 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs3n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n3p08.png b/image/test/reftest/pngsuite-ancillary/cs3n3p08.png new file mode 100644 index 000000000..f4a66237b Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs3n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n2c08.html b/image/test/reftest/pngsuite-ancillary/cs5n2c08.html new file mode 100644 index 000000000..d1642a1bf --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs5n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n2c08.png b/image/test/reftest/pngsuite-ancillary/cs5n2c08.png new file mode 100644 index 000000000..40f947c33 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs5n2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n3p08.html b/image/test/reftest/pngsuite-ancillary/cs5n3p08.html new file mode 100644 index 000000000..d1642a1bf --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs5n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n3p08.png b/image/test/reftest/pngsuite-ancillary/cs5n3p08.png new file mode 100644 index 000000000..dfd6e6e6e Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs5n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n2c08.html b/image/test/reftest/pngsuite-ancillary/cs8n2c08.html new file mode 100644 index 000000000..549341e76 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs8n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n2c08.png b/image/test/reftest/pngsuite-ancillary/cs8n2c08.png new file mode 100644 index 000000000..8e01d3294 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs8n2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n3p08.html b/image/test/reftest/pngsuite-ancillary/cs8n3p08.html new file mode 100644 index 000000000..549341e76 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs8n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n3p08.png b/image/test/reftest/pngsuite-ancillary/cs8n3p08.png new file mode 100644 index 000000000..a44066eb6 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs8n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ct0n0g04.html b/image/test/reftest/pngsuite-ancillary/ct0n0g04.html new file mode 100644 index 000000000..25d3abca3 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ct0n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ct0n0g04.png b/image/test/reftest/pngsuite-ancillary/ct0n0g04.png new file mode 100644 index 000000000..40d1e062f Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ct0n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ct1n0g04.html b/image/test/reftest/pngsuite-ancillary/ct1n0g04.html new file mode 100644 index 000000000..25d3abca3 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ct1n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ct1n0g04.png b/image/test/reftest/pngsuite-ancillary/ct1n0g04.png new file mode 100644 index 000000000..3ba110aa7 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ct1n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ctzn0g04.html b/image/test/reftest/pngsuite-ancillary/ctzn0g04.html new file mode 100644 index 000000000..25d3abca3 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ctzn0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ctzn0g04.png b/image/test/reftest/pngsuite-ancillary/ctzn0g04.png new file mode 100644 index 000000000..b4401c9cf Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ctzn0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js b/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js new file mode 100644 index 000000000..32e4434aa --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js @@ -0,0 +1,28 @@ +// This is a workaround for bug 465088, that the qcms assembly doesn't +// quite match the non-assembly output. + +function check_qcms_has_assembly() +{ + // We have assembly code on x86 and x86_64 architectures. + // Unfortunately, detecting that is a little complicated. + + if (navigator.platform == "MacIntel") { + return true; + } + + if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") { + // Assume all Windows and OS/2 is x86 or x86_64. We don't + // expose any way for Web content to check. + return true; + } + + // On most Unix-like platforms, navigator.platform is basically + // |uname -sm|. + if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) { + return true; + } + + return false; +} + +var qcms_has_assembly = check_qcms_has_assembly(); diff --git a/image/test/reftest/pngsuite-ancillary/reftest-stylo.list b/image/test/reftest/pngsuite-ancillary/reftest-stylo.list new file mode 100644 index 000000000..38b0d64e1 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/reftest-stylo.list @@ -0,0 +1,63 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Ancillary chunks + +# cHRM chunks +# +# ccwn2c08 - gamma 1.0000 chunk, chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06 +fails fails-if(prefs.getIntPref("gfx.color_management.mode")!=2) fuzzy-if(winWidget,8,569) == ccwn2c08.png ccwn2c08.png +# ccwn3p08 - gamma 1.0000 chunk, chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06 +fails fails-if(prefs.getIntPref("gfx.color_management.mode")!=2) fuzzy-if(winWidget,8,577) == ccwn3p08.png ccwn3p08.png + +# pHYs chunks +# +# PngSuite implies these first 3 should end up as 32x32 bitmaps, but +# per discussion in bug 408622 that's not actually true. +# +# cdfn2c08 - physical pixel dimensions, 8x32 flat pixels +fails == cdfn2c08.png cdfn2c08.png +# cdhn2c08 - physical pixel dimensions, 32x8 high pixels +fails == cdhn2c08.png cdhn2c08.png +# cdsn2c08 - physical pixel dimensions, 8x8 square pixels +fails == cdsn2c08.png cdsn2c08.png +# cdun2c08 - physical pixel dimensions, 1000 pixels per 1 meter +fails == cdun2c08.png cdun2c08.png + +# hISt chunks (shouldn't affect display on 24bit systems) +# +# ch1n3p04 - histogram 15 colors +fails == ch1n3p04.png ch1n3p04.png +# ch2n3p08 - histogram 256 colors +fails == ch2n3p08.png ch2n3p08.png + +# tIME chunks (doesn't affect display) +# +# cm0n0g04 - modification time, 01-jan-2000 12:34:56 +fails == cm0n0g04.png cm0n0g04.png +# cm7n0g04 - modification time, 01-jan-1970 00:00:00 +fails == cm7n0g04.png cm7n0g04.png +# cm9n0g04 - modification time, 31-dec-1999 23:59:59 +fails == cm9n0g04.png cm9n0g04.png + +# sBIT chunks +# +# cs3n2c16 - color, 13 significant bits +fails == cs3n2c16.png cs3n2c16.png +# cs3n3p08 - paletted, 3 significant bits +fails == cs3n3p08.png cs3n3p08.png +# cs5n2c08 - color, 5 significant bits +fails == cs5n2c08.png cs5n2c08.png +# cs5n3p08 - paletted, 5 significant bits +fails == cs5n3p08.png cs5n3p08.png +# cs8n2c08 - color, 8 significant bits (reference) +fails == cs8n2c08.png cs8n2c08.png +# cs8n3p08 - paletted, 8 significant bits (reference) +fails == cs8n3p08.png cs8n3p08.png + +# tEXt chunks (doesn't affect display) +# +# ct0n0g04 - no textual data +fails == ct0n0g04.png ct0n0g04.png +# ct1n0g04 - with textual data +fails == ct1n0g04.png ct1n0g04.png +# ctzn0g04 - with compressed textual data +fails == ctzn0g04.png ctzn0g04.png diff --git a/image/test/reftest/pngsuite-ancillary/reftest.list b/image/test/reftest/pngsuite-ancillary/reftest.list new file mode 100644 index 000000000..7a8900b95 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/reftest.list @@ -0,0 +1,62 @@ +# PngSuite - Ancillary chunks + +# cHRM chunks +# +# ccwn2c08 - gamma 1.0000 chunk, chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06 +fails-if(prefs.getIntPref("gfx.color_management.mode")!=2) fuzzy-if(winWidget,8,569) == ccwn2c08.png ccwn2c08.html +# ccwn3p08 - gamma 1.0000 chunk, chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06 +fails-if(prefs.getIntPref("gfx.color_management.mode")!=2) fuzzy-if(winWidget,8,577) == ccwn3p08.png ccwn3p08.html + +# pHYs chunks +# +# PngSuite implies these first 3 should end up as 32x32 bitmaps, but +# per discussion in bug 408622 that's not actually true. +# +# cdfn2c08 - physical pixel dimensions, 8x32 flat pixels +== cdfn2c08.png cdfn2c08.html +# cdhn2c08 - physical pixel dimensions, 32x8 high pixels +== cdhn2c08.png cdhn2c08.html +# cdsn2c08 - physical pixel dimensions, 8x8 square pixels +== cdsn2c08.png cdsn2c08.html +# cdun2c08 - physical pixel dimensions, 1000 pixels per 1 meter +== cdun2c08.png cdun2c08.html + +# hISt chunks (shouldn't affect display on 24bit systems) +# +# ch1n3p04 - histogram 15 colors +== ch1n3p04.png ch1n3p04.html +# ch2n3p08 - histogram 256 colors +== ch2n3p08.png ch2n3p08.html + +# tIME chunks (doesn't affect display) +# +# cm0n0g04 - modification time, 01-jan-2000 12:34:56 +== cm0n0g04.png cm0n0g04.html +# cm7n0g04 - modification time, 01-jan-1970 00:00:00 +== cm7n0g04.png cm7n0g04.html +# cm9n0g04 - modification time, 31-dec-1999 23:59:59 +== cm9n0g04.png cm9n0g04.html + +# sBIT chunks +# +# cs3n2c16 - color, 13 significant bits +== cs3n2c16.png cs3n2c16.html +# cs3n3p08 - paletted, 3 significant bits +== cs3n3p08.png cs3n3p08.html +# cs5n2c08 - color, 5 significant bits +== cs5n2c08.png cs5n2c08.html +# cs5n3p08 - paletted, 5 significant bits +== cs5n3p08.png cs5n3p08.html +# cs8n2c08 - color, 8 significant bits (reference) +== cs8n2c08.png cs8n2c08.html +# cs8n3p08 - paletted, 8 significant bits (reference) +== cs8n3p08.png cs8n3p08.html + +# tEXt chunks (doesn't affect display) +# +# ct0n0g04 - no textual data +== ct0n0g04.png ct0n0g04.html +# ct1n0g04 - with textual data +== ct1n0g04.png ct1n0g04.html +# ctzn0g04 - with compressed textual data +== ctzn0g04.png ctzn0g04.html diff --git a/image/test/reftest/pngsuite-background/bg__4a08.html b/image/test/reftest/pngsuite-background/bg__4a08.html new file mode 100644 index 000000000..743ad1200 --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__4a08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bg__4a16.html b/image/test/reftest/pngsuite-background/bg__4a16.html new file mode 100644 index 000000000..b15b280f1 --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__4a16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bg__6a08.html b/image/test/reftest/pngsuite-background/bg__6a08.html new file mode 100644 index 000000000..1ab2721f3 --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__6a08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bg__6a16.html b/image/test/reftest/pngsuite-background/bg__6a16.html new file mode 100644 index 000000000..8ead05a34 --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__6a16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bgai4a08.png b/image/test/reftest/pngsuite-background/bgai4a08.png new file mode 100644 index 000000000..398132be5 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgai4a08.png differ diff --git a/image/test/reftest/pngsuite-background/bgai4a16.png b/image/test/reftest/pngsuite-background/bgai4a16.png new file mode 100644 index 000000000..51192e731 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgai4a16.png differ diff --git a/image/test/reftest/pngsuite-background/bgan6a08.png b/image/test/reftest/pngsuite-background/bgan6a08.png new file mode 100644 index 000000000..e60873876 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgan6a08.png differ diff --git a/image/test/reftest/pngsuite-background/bgan6a16.png b/image/test/reftest/pngsuite-background/bgan6a16.png new file mode 100644 index 000000000..984a99525 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgan6a16.png differ diff --git a/image/test/reftest/pngsuite-background/bgbn4a08.png b/image/test/reftest/pngsuite-background/bgbn4a08.png new file mode 100644 index 000000000..7cbefc3bf Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgbn4a08.png differ diff --git a/image/test/reftest/pngsuite-background/bggn4a16.png b/image/test/reftest/pngsuite-background/bggn4a16.png new file mode 100644 index 000000000..13fd85ba1 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bggn4a16.png differ diff --git a/image/test/reftest/pngsuite-background/bgwn6a08.png b/image/test/reftest/pngsuite-background/bgwn6a08.png new file mode 100644 index 000000000..a67ff205b Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgwn6a08.png differ diff --git a/image/test/reftest/pngsuite-background/bgyn6a16.png b/image/test/reftest/pngsuite-background/bgyn6a16.png new file mode 100644 index 000000000..ae3e9be58 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgyn6a16.png differ diff --git a/image/test/reftest/pngsuite-background/reftest-stylo.list b/image/test/reftest/pngsuite-background/reftest-stylo.list new file mode 100644 index 000000000..567b36b5b --- /dev/null +++ b/image/test/reftest/pngsuite-background/reftest-stylo.list @@ -0,0 +1,23 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Background colors +# +# Note 1: The first 4 images have no bKGD chunk, the last 4 do. The background +# color indicated by bKGD isn't used, so the two sets of images are rendered +# identically and thus share common reference HTML files. + +# bgai4a08 - 8 bit grayscale, alpha, no background chunk, interlaced +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgai4a08.png wrapper.html?bgai4a08.png +# bgai4a16 - 16 bit grayscale, alpha, no background chunk, interlaced +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgai4a16.png wrapper.html?bgai4a16.png +# bgan6a08 - 3x8 bits rgb color, alpha, no background chunk +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgan6a08.png wrapper.html?bgan6a08.png +# bgan6a16 - 3x16 bits rgb color, alpha, no background chunk +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgan6a16.png wrapper.html?bgan6a16.png +# bgbn4a08 - 8 bit grayscale, alpha, black background chunk +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgbn4a08.png wrapper.html?bgbn4a08.png +# bggn4a16 - 16 bit grayscale, alpha, gray background chunk +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bggn4a16.png wrapper.html?bggn4a16.png +# bgwn6a08 - 3x8 bits rgb color, alpha, white background chunk +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgwn6a08.png wrapper.html?bgwn6a08.png +# bgyn6a16 - 3x16 bits rgb color, alpha, yellow background chunk +skip fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgyn6a16.png wrapper.html?bgyn6a16.png diff --git a/image/test/reftest/pngsuite-background/reftest.list b/image/test/reftest/pngsuite-background/reftest.list new file mode 100644 index 000000000..f15cfa079 --- /dev/null +++ b/image/test/reftest/pngsuite-background/reftest.list @@ -0,0 +1,22 @@ +# PngSuite - Background colors +# +# Note 1: The first 4 images have no bKGD chunk, the last 4 do. The background +# color indicated by bKGD isn't used, so the two sets of images are rendered +# identically and thus share common reference HTML files. + +# bgai4a08 - 8 bit grayscale, alpha, no background chunk, interlaced +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgai4a08.png bg__4a08.html +# bgai4a16 - 16 bit grayscale, alpha, no background chunk, interlaced +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgai4a16.png bg__4a16.html +# bgan6a08 - 3x8 bits rgb color, alpha, no background chunk +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgan6a08.png bg__6a08.html +# bgan6a16 - 3x16 bits rgb color, alpha, no background chunk +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgan6a16.png bg__6a16.html +# bgbn4a08 - 8 bit grayscale, alpha, black background chunk +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgbn4a08.png bg__4a08.html +# bggn4a16 - 16 bit grayscale, alpha, gray background chunk +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bggn4a16.png bg__4a16.html +# bgwn6a08 - 3x8 bits rgb color, alpha, white background chunk +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgwn6a08.png bg__6a08.html +# bgyn6a16 - 3x16 bits rgb color, alpha, yellow background chunk +fuzzy-if(cocoaWidget||skiaContent,1,1024) == wrapper.html?bgyn6a16.png bg__6a16.html diff --git a/image/test/reftest/pngsuite-background/wrapper.html b/image/test/reftest/pngsuite-background/wrapper.html new file mode 100644 index 000000000..5bbe75e01 --- /dev/null +++ b/image/test/reftest/pngsuite-background/wrapper.html @@ -0,0 +1,27 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/pngsuite-basic-i/basi0g01.html b/image/test/reftest/pngsuite-basic-i/basi0g01.html new file mode 100644 index 000000000..7389a1b66 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g01.png b/image/test/reftest/pngsuite-basic-i/basi0g01.png new file mode 100644 index 000000000..556fa7270 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g01.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g02.html b/image/test/reftest/pngsuite-basic-i/basi0g02.html new file mode 100644 index 000000000..538afad14 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g02.png b/image/test/reftest/pngsuite-basic-i/basi0g02.png new file mode 100644 index 000000000..ce09821ef Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g02.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g04.html b/image/test/reftest/pngsuite-basic-i/basi0g04.html new file mode 100644 index 000000000..d782230d4 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g04.png b/image/test/reftest/pngsuite-basic-i/basi0g04.png new file mode 100644 index 000000000..3853273f9 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g04.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g08.html b/image/test/reftest/pngsuite-basic-i/basi0g08.html new file mode 100644 index 000000000..5aaf11cab --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g08.png b/image/test/reftest/pngsuite-basic-i/basi0g08.png new file mode 100644 index 000000000..faed8bec4 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g16.html b/image/test/reftest/pngsuite-basic-i/basi0g16.html new file mode 100644 index 000000000..fc18c727b --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g16.png b/image/test/reftest/pngsuite-basic-i/basi0g16.png new file mode 100644 index 000000000..a9f28165e Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c08.html b/image/test/reftest/pngsuite-basic-i/basi2c08.html new file mode 100644 index 000000000..e30216bdf --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c08.png b/image/test/reftest/pngsuite-basic-i/basi2c08.png new file mode 100644 index 000000000..2aab44d42 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi2c08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c16.html b/image/test/reftest/pngsuite-basic-i/basi2c16.html new file mode 100644 index 000000000..dd08f0e3d --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c16.png b/image/test/reftest/pngsuite-basic-i/basi2c16.png new file mode 100644 index 000000000..cd7e50f91 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi2c16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p01.html b/image/test/reftest/pngsuite-basic-i/basi3p01.html new file mode 100644 index 000000000..2cb512200 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p01.png b/image/test/reftest/pngsuite-basic-i/basi3p01.png new file mode 100644 index 000000000..00a7cea6c Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p01.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p02.html b/image/test/reftest/pngsuite-basic-i/basi3p02.html new file mode 100644 index 000000000..4555fbb9b --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p02.png b/image/test/reftest/pngsuite-basic-i/basi3p02.png new file mode 100644 index 000000000..bb16b44b3 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p02.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p04.html b/image/test/reftest/pngsuite-basic-i/basi3p04.html new file mode 100644 index 000000000..dc2a121de --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p04.png b/image/test/reftest/pngsuite-basic-i/basi3p04.png new file mode 100644 index 000000000..b4e888e24 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p04.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p08.html b/image/test/reftest/pngsuite-basic-i/basi3p08.html new file mode 100644 index 000000000..78b72c61c --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p08.png b/image/test/reftest/pngsuite-basic-i/basi3p08.png new file mode 100644 index 000000000..50a6d1cac Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi4a08.png b/image/test/reftest/pngsuite-basic-i/basi4a08.png new file mode 100644 index 000000000..398132be5 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi4a08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi4a16.png b/image/test/reftest/pngsuite-basic-i/basi4a16.png new file mode 100644 index 000000000..51192e731 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi4a16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi6a08.png b/image/test/reftest/pngsuite-basic-i/basi6a08.png new file mode 100644 index 000000000..aecb32e0d Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi6a08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi6a16.png b/image/test/reftest/pngsuite-basic-i/basi6a16.png new file mode 100644 index 000000000..4181533ad Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi6a16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/reftest-stylo.list b/image/test/reftest/pngsuite-basic-i/reftest-stylo.list new file mode 100644 index 000000000..cef5dbc6c --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/reftest-stylo.list @@ -0,0 +1,34 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Basic formats (interlaced) + + +# basi0g01 - black & white +fails == basi0g01.png basi0g01.png +# basi0g02 - 2 bit (4 level) grayscale +fails == basi0g02.png basi0g02.png +# basi0g04 - 4 bit (16 level) grayscale +fails == basi0g04.png basi0g04.png +# basi0g08 - 8 bit (256 level) grayscale +fails == basi0g08.png basi0g08.png +# basi0g16 - 16 bit (64k level) grayscale +fails == basi0g16.png basi0g16.png +# basi2c08 - 3x8 bits rgb color +fails == basi2c08.png basi2c08.png +# basi2c16 - 3x16 bits rgb color +fails == basi2c16.png basi2c16.png +# basi3p01 - 1 bit (2 color) paletted +fails == basi3p01.png basi3p01.png +# basi3p02 - 2 bit (4 color) paletted +fails == basi3p02.png basi3p02.png +# basi3p04 - 4 bit (16 color) paletted +fails == basi3p04.png basi3p04.png +# basi3p08 - 8 bit (256 color) paletted +# fails == basi3p08.png basi3p08.png +# basi4a08 - 8 bit grayscale + 8 bit alpha-channel +#== basi4a08.png basi4a08.png +# basi4a16 - 16 bit grayscale + 16 bit alpha-channel +#== basi4a16.png basi4a16.png +# basi6a08 - 3x8 bits rgb color + 8 bit alpha-channel +#== basi6a08.png basi6a08.png +# basi6a16 - 3x16 bits rgb color + 16 bit alpha-channel +#== basi6a16.png basi6a16.png diff --git a/image/test/reftest/pngsuite-basic-i/reftest.list b/image/test/reftest/pngsuite-basic-i/reftest.list new file mode 100644 index 000000000..bc61af89d --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/reftest.list @@ -0,0 +1,33 @@ +# PngSuite - Basic formats (interlaced) + + +# basi0g01 - black & white +== basi0g01.png basi0g01.html +# basi0g02 - 2 bit (4 level) grayscale +== basi0g02.png basi0g02.html +# basi0g04 - 4 bit (16 level) grayscale +== basi0g04.png basi0g04.html +# basi0g08 - 8 bit (256 level) grayscale +== basi0g08.png basi0g08.html +# basi0g16 - 16 bit (64k level) grayscale +== basi0g16.png basi0g16.html +# basi2c08 - 3x8 bits rgb color +== basi2c08.png basi2c08.html +# basi2c16 - 3x16 bits rgb color +== basi2c16.png basi2c16.html +# basi3p01 - 1 bit (2 color) paletted +== basi3p01.png basi3p01.html +# basi3p02 - 2 bit (4 color) paletted +== basi3p02.png basi3p02.html +# basi3p04 - 4 bit (16 color) paletted +== basi3p04.png basi3p04.html +# basi3p08 - 8 bit (256 color) paletted +== basi3p08.png basi3p08.html +# basi4a08 - 8 bit grayscale + 8 bit alpha-channel +#== basi4a08.png basi4a08.html +# basi4a16 - 16 bit grayscale + 16 bit alpha-channel +#== basi4a16.png basi4a16.html +# basi6a08 - 3x8 bits rgb color + 8 bit alpha-channel +#== basi6a08.png basi6a08.html +# basi6a16 - 3x16 bits rgb color + 16 bit alpha-channel +#== basi6a16.png basi6a16.html diff --git a/image/test/reftest/pngsuite-basic-n/basn0g01.html b/image/test/reftest/pngsuite-basic-n/basn0g01.html new file mode 100644 index 000000000..7389a1b66 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g01.png b/image/test/reftest/pngsuite-basic-n/basn0g01.png new file mode 100644 index 000000000..1d722423a Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g01.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g02.html b/image/test/reftest/pngsuite-basic-n/basn0g02.html new file mode 100644 index 000000000..538afad14 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g02.png b/image/test/reftest/pngsuite-basic-n/basn0g02.png new file mode 100644 index 000000000..508332418 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g02.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g04.html b/image/test/reftest/pngsuite-basic-n/basn0g04.html new file mode 100644 index 000000000..d782230d4 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g04.png b/image/test/reftest/pngsuite-basic-n/basn0g04.png new file mode 100644 index 000000000..0bf368786 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g04.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g08.html b/image/test/reftest/pngsuite-basic-n/basn0g08.html new file mode 100644 index 000000000..5aaf11cab --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g08.png b/image/test/reftest/pngsuite-basic-n/basn0g08.png new file mode 100644 index 000000000..23c82379a Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g16.html b/image/test/reftest/pngsuite-basic-n/basn0g16.html new file mode 100644 index 000000000..fc18c727b --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g16.png b/image/test/reftest/pngsuite-basic-n/basn0g16.png new file mode 100644 index 000000000..e7c82f78e Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c08.html b/image/test/reftest/pngsuite-basic-n/basn2c08.html new file mode 100644 index 000000000..e30216bdf --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c08.png b/image/test/reftest/pngsuite-basic-n/basn2c08.png new file mode 100644 index 000000000..db5ad1586 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn2c08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c16.html b/image/test/reftest/pngsuite-basic-n/basn2c16.html new file mode 100644 index 000000000..dd08f0e3d --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c16.png b/image/test/reftest/pngsuite-basic-n/basn2c16.png new file mode 100644 index 000000000..50c1cb91a Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn2c16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p01.html b/image/test/reftest/pngsuite-basic-n/basn3p01.html new file mode 100644 index 000000000..2cb512200 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p01.png b/image/test/reftest/pngsuite-basic-n/basn3p01.png new file mode 100644 index 000000000..b145c2b8e Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p01.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p02.html b/image/test/reftest/pngsuite-basic-n/basn3p02.html new file mode 100644 index 000000000..4555fbb9b --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p02.png b/image/test/reftest/pngsuite-basic-n/basn3p02.png new file mode 100644 index 000000000..8985b3d81 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p02.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p04.html b/image/test/reftest/pngsuite-basic-n/basn3p04.html new file mode 100644 index 000000000..dc2a121de --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p04.png b/image/test/reftest/pngsuite-basic-n/basn3p04.png new file mode 100644 index 000000000..0fbf9e827 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p04.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p08.html b/image/test/reftest/pngsuite-basic-n/basn3p08.html new file mode 100644 index 000000000..78b72c61c --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p08.png b/image/test/reftest/pngsuite-basic-n/basn3p08.png new file mode 100644 index 000000000..0ddad07e5 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn4a08.png b/image/test/reftest/pngsuite-basic-n/basn4a08.png new file mode 100644 index 000000000..3e1305220 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn4a08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn4a16.png b/image/test/reftest/pngsuite-basic-n/basn4a16.png new file mode 100644 index 000000000..8243644d0 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn4a16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn6a08.png b/image/test/reftest/pngsuite-basic-n/basn6a08.png new file mode 100644 index 000000000..e60873876 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn6a08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn6a16.png b/image/test/reftest/pngsuite-basic-n/basn6a16.png new file mode 100644 index 000000000..984a99525 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn6a16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/reftest-stylo.list b/image/test/reftest/pngsuite-basic-n/reftest-stylo.list new file mode 100644 index 000000000..a4f594645 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/reftest-stylo.list @@ -0,0 +1,34 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Basic formats (non-interlaced) + + +# basn0g01 - black & white +fails == basn0g01.png basn0g01.png +# basn0g02 - 2 bit (4 level) grayscale +fails == basn0g02.png basn0g02.png +# basn0g04 - 4 bit (16 level) grayscale +fails == basn0g04.png basn0g04.png +# basn0g08 - 8 bit (256 level) grayscale +fails == basn0g08.png basn0g08.png +# basn0g16 - 16 bit (64k level) grayscale +fails == basn0g16.png basn0g16.png +# basn2c08 - 3x8 bits rgb color +fails == basn2c08.png basn2c08.png +# basn2c16 - 3x16 bits rgb color +fails == basn2c16.png basn2c16.png +# basn3p01 - 1 bit (2 color) paletted +fails == basn3p01.png basn3p01.png +# basn3p02 - 2 bit (4 color) paletted +fails == basn3p02.png basn3p02.png +# basn3p04 - 4 bit (16 color) paletted +fails == basn3p04.png basn3p04.png +# basn3p08 - 8 bit (256 color) paletted +fails == basn3p08.png basn3p08.png +# basn4a08 - 8 bit grayscale + 8 bit alpha-channel +#== basn4a08.png basn4a08.png +# basn4a16 - 16 bit grayscale + 16 bit alpha-channel +#== basn4a16.png basn4a16.png +# basn6a08 - 3x8 bits rgb color + 8 bit alpha-channel +#== basn6a08.png basn6a08.png +# basn6a16 - 3x16 bits rgb color + 16 bit alpha-channel +#== basn6a16.png basn6a16.png diff --git a/image/test/reftest/pngsuite-basic-n/reftest.list b/image/test/reftest/pngsuite-basic-n/reftest.list new file mode 100644 index 000000000..c59a5a7e4 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/reftest.list @@ -0,0 +1,33 @@ +# PngSuite - Basic formats (non-interlaced) + + +# basn0g01 - black & white +== basn0g01.png basn0g01.html +# basn0g02 - 2 bit (4 level) grayscale +== basn0g02.png basn0g02.html +# basn0g04 - 4 bit (16 level) grayscale +== basn0g04.png basn0g04.html +# basn0g08 - 8 bit (256 level) grayscale +== basn0g08.png basn0g08.html +# basn0g16 - 16 bit (64k level) grayscale +== basn0g16.png basn0g16.html +# basn2c08 - 3x8 bits rgb color +== basn2c08.png basn2c08.html +# basn2c16 - 3x16 bits rgb color +== basn2c16.png basn2c16.html +# basn3p01 - 1 bit (2 color) paletted +== basn3p01.png basn3p01.html +# basn3p02 - 2 bit (4 color) paletted +== basn3p02.png basn3p02.html +# basn3p04 - 4 bit (16 color) paletted +== basn3p04.png basn3p04.html +# basn3p08 - 8 bit (256 color) paletted +== basn3p08.png basn3p08.html +# basn4a08 - 8 bit grayscale + 8 bit alpha-channel +#== basn4a08.png basn4a08.html +# basn4a16 - 16 bit grayscale + 16 bit alpha-channel +#== basn4a16.png basn4a16.html +# basn6a08 - 3x8 bits rgb color + 8 bit alpha-channel +#== basn6a08.png basn6a08.html +# basn6a16 - 3x16 bits rgb color + 16 bit alpha-channel +#== basn6a16.png basn6a16.html diff --git a/image/test/reftest/pngsuite-chunkorder/color.html b/image/test/reftest/pngsuite-chunkorder/color.html new file mode 100644 index 000000000..dd08f0e3d --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/color.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-chunkorder/grayscale.html b/image/test/reftest/pngsuite-chunkorder/grayscale.html new file mode 100644 index 000000000..fc18c727b --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/grayscale.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-chunkorder/oi1n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi1n0g16.png new file mode 100644 index 000000000..e7c82f78e Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi1n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi1n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi1n2c16.png new file mode 100644 index 000000000..50c1cb91a Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi1n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi2n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi2n0g16.png new file mode 100644 index 000000000..14d64c583 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi2n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi2n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi2n2c16.png new file mode 100644 index 000000000..4c2e3e335 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi2n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi4n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi4n0g16.png new file mode 100644 index 000000000..69e73ede3 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi4n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi4n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi4n2c16.png new file mode 100644 index 000000000..93691e373 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi4n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi9n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi9n0g16.png new file mode 100644 index 000000000..924841357 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi9n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi9n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi9n2c16.png new file mode 100644 index 000000000..f0512e49f Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi9n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/reftest-stylo.list b/image/test/reftest/pngsuite-chunkorder/reftest-stylo.list new file mode 100644 index 000000000..57415ac0e --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/reftest-stylo.list @@ -0,0 +1,22 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Chunk ordering +# +# The resulting images of a type (color or grayscale) should all look the +# same, so they share common HTML reference files. + +# oi1n0g16 - grayscale mother image with 1 idat-chunk +fails == oi1n0g16.png oi1n0g16.png +# oi1n2c16 - color mother image with 1 idat-chunk +fails == oi1n2c16.png oi1n2c16.png +# oi2n0g16 - grayscale image with 2 idat-chunks +fails == oi2n0g16.png oi2n0g16.png +# oi2n2c16 - color image with 2 idat-chunks +fails == oi2n2c16.png oi2n2c16.png +# oi4n0g16 - grayscale image with 4 unequal sized idat-chunks +fails == oi4n0g16.png oi4n0g16.png +# oi4n2c16 - color image with 4 unequal sized idat-chunks +fails == oi4n2c16.png oi4n2c16.png +# oi9n0g16 - grayscale image with all idat-chunks length one +fails == oi9n0g16.png oi9n0g16.png +# oi9n2c16 - color image with all idat-chunks length one +fails == oi9n2c16.png oi9n2c16.png diff --git a/image/test/reftest/pngsuite-chunkorder/reftest.list b/image/test/reftest/pngsuite-chunkorder/reftest.list new file mode 100644 index 000000000..2e161d0d3 --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/reftest.list @@ -0,0 +1,21 @@ +# PngSuite - Chunk ordering +# +# The resulting images of a type (color or grayscale) should all look the +# same, so they share common HTML reference files. + +# oi1n0g16 - grayscale mother image with 1 idat-chunk +== oi1n0g16.png grayscale.html +# oi1n2c16 - color mother image with 1 idat-chunk +== oi1n2c16.png color.html +# oi2n0g16 - grayscale image with 2 idat-chunks +== oi2n0g16.png grayscale.html +# oi2n2c16 - color image with 2 idat-chunks +== oi2n2c16.png color.html +# oi4n0g16 - grayscale image with 4 unequal sized idat-chunks +== oi4n0g16.png grayscale.html +# oi4n2c16 - color image with 4 unequal sized idat-chunks +== oi4n2c16.png color.html +# oi9n0g16 - grayscale image with all idat-chunks length one +== oi9n0g16.png grayscale.html +# oi9n2c16 - color image with all idat-chunks length one +== oi9n2c16.png color.html diff --git a/image/test/reftest/pngsuite-corrupted/reftest-stylo.list b/image/test/reftest/pngsuite-corrupted/reftest-stylo.list new file mode 100644 index 000000000..ed4baead8 --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/reftest-stylo.list @@ -0,0 +1,11 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Corrupted files +# +# Note: these are corrupt files, and so no image should be rendered. + +# x00n0g01 - empty 0x0 grayscale file +skip == wrapper.html?x00n0g01.png wrapper.html?x00n0g01.png +# xcrn0g04 - added cr bytes +skip == wrapper.html?xcrn0g04.png wrapper.html?xcrn0g04.png +# xlfn0g04 - added lf bytes +skip == wrapper.html?xlfn0g04.png wrapper.html?xlfn0g04.png diff --git a/image/test/reftest/pngsuite-corrupted/reftest.list b/image/test/reftest/pngsuite-corrupted/reftest.list new file mode 100644 index 000000000..86c5880f2 --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/reftest.list @@ -0,0 +1,10 @@ +# PngSuite - Corrupted files +# +# Note: these are corrupt files, and so no image should be rendered. + +# x00n0g01 - empty 0x0 grayscale file +== wrapper.html?x00n0g01.png about:blank +# xcrn0g04 - added cr bytes +== wrapper.html?xcrn0g04.png about:blank +# xlfn0g04 - added lf bytes +== wrapper.html?xlfn0g04.png about:blank diff --git a/image/test/reftest/pngsuite-corrupted/wrapper.html b/image/test/reftest/pngsuite-corrupted/wrapper.html new file mode 100644 index 000000000..0015856df --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/pngsuite-corrupted/x00n0g01.png b/image/test/reftest/pngsuite-corrupted/x00n0g01.png new file mode 100644 index 000000000..db3a5fda7 Binary files /dev/null and b/image/test/reftest/pngsuite-corrupted/x00n0g01.png differ diff --git a/image/test/reftest/pngsuite-corrupted/xcrn0g04.png b/image/test/reftest/pngsuite-corrupted/xcrn0g04.png new file mode 100644 index 000000000..5bce9f3ad Binary files /dev/null and b/image/test/reftest/pngsuite-corrupted/xcrn0g04.png differ diff --git a/image/test/reftest/pngsuite-corrupted/xlfn0g04.png b/image/test/reftest/pngsuite-corrupted/xlfn0g04.png new file mode 100644 index 000000000..1fd104ba6 --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/xlfn0g04.png @@ -0,0 +1,13 @@ +‰PNG + + + + + +IHDR “áÈ)ÈIDATxœ]ÑÁ +Â0 P*@ð¡#° + +#TâÈ10lPF`Ø F=•ŸÄIQâ*çÅuí”`%qk +Hžñšˆ©ñ´€m÷Íüµàߟ Ñ=,¸fìOK + +ç ÐtŽÀ(Èïä’צíF ;èPº€¯¾{xpç]9‡/p*$(ì*éyìÕƒ ×þÚéçè@÷C¼  cÔqž‹NÛU#„)11·.räðfä0°ägh(¥týÙÂEøÿ‰kIEND®B`‚ \ No newline at end of file diff --git a/image/test/reftest/pngsuite-filtering/f00n0g08.html b/image/test/reftest/pngsuite-filtering/f00n0g08.html new file mode 100644 index 000000000..3df624891 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f00n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f00n0g08.png b/image/test/reftest/pngsuite-filtering/f00n0g08.png new file mode 100644 index 000000000..45a007596 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f00n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f00n2c08.html b/image/test/reftest/pngsuite-filtering/f00n2c08.html new file mode 100644 index 000000000..2e5f1e186 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f00n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f00n2c08.png b/image/test/reftest/pngsuite-filtering/f00n2c08.png new file mode 100644 index 000000000..d6a1ffff6 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f00n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f01n0g08.html b/image/test/reftest/pngsuite-filtering/f01n0g08.html new file mode 100644 index 000000000..2e056ecb9 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f01n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f01n0g08.png b/image/test/reftest/pngsuite-filtering/f01n0g08.png new file mode 100644 index 000000000..4a1107b46 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f01n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f01n2c08.html b/image/test/reftest/pngsuite-filtering/f01n2c08.html new file mode 100644 index 000000000..25c4fe044 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f01n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f01n2c08.png b/image/test/reftest/pngsuite-filtering/f01n2c08.png new file mode 100644 index 000000000..26fee958c Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f01n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f02n0g08.html b/image/test/reftest/pngsuite-filtering/f02n0g08.html new file mode 100644 index 000000000..c9a6263f4 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f02n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f02n0g08.png b/image/test/reftest/pngsuite-filtering/f02n0g08.png new file mode 100644 index 000000000..bfe410c5e Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f02n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f02n2c08.html b/image/test/reftest/pngsuite-filtering/f02n2c08.html new file mode 100644 index 000000000..051691ab9 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f02n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f02n2c08.png b/image/test/reftest/pngsuite-filtering/f02n2c08.png new file mode 100644 index 000000000..e590f1234 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f02n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f03n0g08.html b/image/test/reftest/pngsuite-filtering/f03n0g08.html new file mode 100644 index 000000000..f40bbe51b --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f03n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f03n0g08.png b/image/test/reftest/pngsuite-filtering/f03n0g08.png new file mode 100644 index 000000000..ed01e2923 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f03n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f03n2c08.html b/image/test/reftest/pngsuite-filtering/f03n2c08.html new file mode 100644 index 000000000..3d3c85e6c --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f03n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f03n2c08.png b/image/test/reftest/pngsuite-filtering/f03n2c08.png new file mode 100644 index 000000000..758115059 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f03n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f04n0g08.html b/image/test/reftest/pngsuite-filtering/f04n0g08.html new file mode 100644 index 000000000..3c7ce550b --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f04n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f04n0g08.png b/image/test/reftest/pngsuite-filtering/f04n0g08.png new file mode 100644 index 000000000..663fdae3e Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f04n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f04n2c08.html b/image/test/reftest/pngsuite-filtering/f04n2c08.html new file mode 100644 index 000000000..77c90face --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f04n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f04n2c08.png b/image/test/reftest/pngsuite-filtering/f04n2c08.png new file mode 100644 index 000000000..3c8b5116e Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f04n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/reftest-stylo.list b/image/test/reftest/pngsuite-filtering/reftest-stylo.list new file mode 100644 index 000000000..d69ff484e --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/reftest-stylo.list @@ -0,0 +1,23 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Image filtering + +# f00n0g08 - grayscale, no interlacing, filter-type 0 +fails == f00n0g08.png f00n0g08.png +# f00n2c08 - color, no interlacing, filter-type 0 +fails == f00n2c08.png f00n2c08.png +# f01n0g08 - grayscale, no interlacing, filter-type 1 +fails == f01n0g08.png f01n0g08.png +# f01n2c08 - color, no interlacing, filter-type 1 +skip == f01n2c08.png f01n2c08.png +# f02n0g08 - grayscale, no interlacing, filter-type 2 +fails == f02n0g08.png f02n0g08.png +# f02n2c08 - color, no interlacing, filter-type 2 +fails == f02n2c08.png f02n2c08.png +# f03n0g08 - grayscale, no interlacing, filter-type 3 +fails == f03n0g08.png f03n0g08.png +# f03n2c08 - color, no interlacing, filter-type 3 +fails == f03n2c08.png f03n2c08.png +# f04n0g08 - grayscale, no interlacing, filter-type 4 +fails == f04n0g08.png f04n0g08.png +# f04n2c08 - color, no interlacing, filter-type 4 +skip == f04n2c08.png f04n2c08.png diff --git a/image/test/reftest/pngsuite-filtering/reftest.list b/image/test/reftest/pngsuite-filtering/reftest.list new file mode 100644 index 000000000..81b4ac5f3 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/reftest.list @@ -0,0 +1,22 @@ +# PngSuite - Image filtering + +# f00n0g08 - grayscale, no interlacing, filter-type 0 +== f00n0g08.png f00n0g08.html +# f00n2c08 - color, no interlacing, filter-type 0 +== f00n2c08.png f00n2c08.html +# f01n0g08 - grayscale, no interlacing, filter-type 1 +== f01n0g08.png f01n0g08.html +# f01n2c08 - color, no interlacing, filter-type 1 +== f01n2c08.png f01n2c08.html +# f02n0g08 - grayscale, no interlacing, filter-type 2 +== f02n0g08.png f02n0g08.html +# f02n2c08 - color, no interlacing, filter-type 2 +== f02n2c08.png f02n2c08.html +# f03n0g08 - grayscale, no interlacing, filter-type 3 +== f03n0g08.png f03n0g08.html +# f03n2c08 - color, no interlacing, filter-type 3 +== f03n2c08.png f03n2c08.html +# f04n0g08 - grayscale, no interlacing, filter-type 4 +== f04n0g08.png f04n0g08.html +# f04n2c08 - color, no interlacing, filter-type 4 +== f04n2c08.png f04n2c08.html diff --git a/image/test/reftest/pngsuite-gamma/g03n0g16.html b/image/test/reftest/pngsuite-gamma/g03n0g16.html new file mode 100644 index 000000000..dc15a536b --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g03n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g03n0g16.png b/image/test/reftest/pngsuite-gamma/g03n0g16.png new file mode 100644 index 000000000..41083ca80 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g03n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g03n2c08.html b/image/test/reftest/pngsuite-gamma/g03n2c08.html new file mode 100644 index 000000000..c2d02beed --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g03n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g03n2c08.png b/image/test/reftest/pngsuite-gamma/g03n2c08.png new file mode 100644 index 000000000..a9354dbee Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g03n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g03n3p04.html b/image/test/reftest/pngsuite-gamma/g03n3p04.html new file mode 100644 index 000000000..efcf39f29 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g03n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g03n3p04.png b/image/test/reftest/pngsuite-gamma/g03n3p04.png new file mode 100644 index 000000000..60396c95a Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g03n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g04n0g16.html b/image/test/reftest/pngsuite-gamma/g04n0g16.html new file mode 100644 index 000000000..5bec9867f --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g04n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g04n0g16.png b/image/test/reftest/pngsuite-gamma/g04n0g16.png new file mode 100644 index 000000000..32395b76c Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g04n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g04n2c08.html b/image/test/reftest/pngsuite-gamma/g04n2c08.html new file mode 100644 index 000000000..b3b0556c6 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g04n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g04n2c08.png b/image/test/reftest/pngsuite-gamma/g04n2c08.png new file mode 100644 index 000000000..a652b0ce8 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g04n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g04n3p04.html b/image/test/reftest/pngsuite-gamma/g04n3p04.html new file mode 100644 index 000000000..337dcb49d --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g04n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g04n3p04.png b/image/test/reftest/pngsuite-gamma/g04n3p04.png new file mode 100644 index 000000000..5661cc313 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g04n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g05n0g16.html b/image/test/reftest/pngsuite-gamma/g05n0g16.html new file mode 100644 index 000000000..ab100e638 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g05n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g05n0g16.png b/image/test/reftest/pngsuite-gamma/g05n0g16.png new file mode 100644 index 000000000..70b37f01e Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g05n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g05n2c08.html b/image/test/reftest/pngsuite-gamma/g05n2c08.html new file mode 100644 index 000000000..475ecd21d --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g05n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g05n2c08.png b/image/test/reftest/pngsuite-gamma/g05n2c08.png new file mode 100644 index 000000000..932c13653 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g05n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g05n3p04.html b/image/test/reftest/pngsuite-gamma/g05n3p04.html new file mode 100644 index 000000000..d71689c29 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g05n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g05n3p04.png b/image/test/reftest/pngsuite-gamma/g05n3p04.png new file mode 100644 index 000000000..961993058 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g05n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g07n0g16.html b/image/test/reftest/pngsuite-gamma/g07n0g16.html new file mode 100644 index 000000000..b9f1a1c3e --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g07n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g07n0g16.png b/image/test/reftest/pngsuite-gamma/g07n0g16.png new file mode 100644 index 000000000..d6a47c2d5 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g07n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g07n2c08.html b/image/test/reftest/pngsuite-gamma/g07n2c08.html new file mode 100644 index 000000000..0a5b63bf0 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g07n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g07n2c08.png b/image/test/reftest/pngsuite-gamma/g07n2c08.png new file mode 100644 index 000000000..597346460 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g07n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g07n3p04.html b/image/test/reftest/pngsuite-gamma/g07n3p04.html new file mode 100644 index 000000000..7303ed0d7 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g07n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g07n3p04.png b/image/test/reftest/pngsuite-gamma/g07n3p04.png new file mode 100644 index 000000000..c73fb6136 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g07n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g10n0g16.html b/image/test/reftest/pngsuite-gamma/g10n0g16.html new file mode 100644 index 000000000..29301dd71 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g10n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g10n0g16.png b/image/test/reftest/pngsuite-gamma/g10n0g16.png new file mode 100644 index 000000000..85f2c958e Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g10n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g10n2c08.html b/image/test/reftest/pngsuite-gamma/g10n2c08.html new file mode 100644 index 000000000..24e8637b7 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g10n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g10n2c08.png b/image/test/reftest/pngsuite-gamma/g10n2c08.png new file mode 100644 index 000000000..b3039970c Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g10n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g10n3p04.html b/image/test/reftest/pngsuite-gamma/g10n3p04.html new file mode 100644 index 000000000..7c25d439d --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g10n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g10n3p04.png b/image/test/reftest/pngsuite-gamma/g10n3p04.png new file mode 100644 index 000000000..1b6a6be2c Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g10n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g25n0g16.html b/image/test/reftest/pngsuite-gamma/g25n0g16.html new file mode 100644 index 000000000..7f3d84edf --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g25n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g25n0g16.png b/image/test/reftest/pngsuite-gamma/g25n0g16.png new file mode 100644 index 000000000..a9f6787c7 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g25n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g25n2c08.html b/image/test/reftest/pngsuite-gamma/g25n2c08.html new file mode 100644 index 000000000..2476d2cc9 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g25n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g25n2c08.png b/image/test/reftest/pngsuite-gamma/g25n2c08.png new file mode 100644 index 000000000..03f505a64 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g25n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g25n3p04.html b/image/test/reftest/pngsuite-gamma/g25n3p04.html new file mode 100644 index 000000000..3cb0205be --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g25n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g25n3p04.png b/image/test/reftest/pngsuite-gamma/g25n3p04.png new file mode 100644 index 000000000..4f943c617 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g25n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/reftest-stylo.list b/image/test/reftest/pngsuite-gamma/reftest-stylo.list new file mode 100644 index 000000000..25439123a --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/reftest-stylo.list @@ -0,0 +1,39 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Gamma values + +# g03n0g16 - grayscale, file-gamma = 0.35 +fails == g03n0g16.png g03n0g16.png +# g03n2c08 - color, file-gamma = 0.35 +fails == g03n2c08.png g03n2c08.png +# g03n3p04 - paletted, file-gamma = 0.35 +fails == g03n3p04.png g03n3p04.png +# g04n0g16 - grayscale, file-gamma = 0.45 +fails == g04n0g16.png g04n0g16.png +# g04n2c08 - color, file-gamma = 0.45 +skip == g04n2c08.png g04n2c08.png +# g04n3p04 - paletted, file-gamma = 0.45 +fails == g04n3p04.png g04n3p04.png +# g05n0g16 - grayscale, file-gamma = 0.55 +fails == g05n0g16.png g05n0g16.png +# g05n2c08 - color, file-gamma = 0.55 +fails == g05n2c08.png g05n2c08.png +# g05n3p04 - paletted, file-gamma = 0.55 +fails == g05n3p04.png g05n3p04.png +# g07n0g16 - grayscale, file-gamma = 0.70 +fails == g07n0g16.png g07n0g16.png +# g07n2c08 - color, file-gamma = 0.70 +fails == g07n2c08.png g07n2c08.png +# g07n3p04 - paletted, file-gamma = 0.70 +fails == g07n3p04.png g07n3p04.png +# g10n0g16 - grayscale, file-gamma = 1.00 +fails == g10n0g16.png g10n0g16.png +# g10n2c08 - color, file-gamma = 1.00 +fails == g10n2c08.png g10n2c08.png +# g10n3p04 - paletted, file-gamma = 1.00 +fails == g10n3p04.png g10n3p04.png +# g25n0g16 - grayscale, file-gamma = 2.50 +fails == g25n0g16.png g25n0g16.png +# g25n2c08 - color, file-gamma = 2.50 +fails == g25n2c08.png g25n2c08.png +# g25n3p04 - paletted, file-gamma = 2.50 +fails == g25n3p04.png g25n3p04.png diff --git a/image/test/reftest/pngsuite-gamma/reftest.list b/image/test/reftest/pngsuite-gamma/reftest.list new file mode 100644 index 000000000..1b5abdda7 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/reftest.list @@ -0,0 +1,38 @@ +# PngSuite - Gamma values + +# g03n0g16 - grayscale, file-gamma = 0.35 +== g03n0g16.png g03n0g16.html +# g03n2c08 - color, file-gamma = 0.35 +== g03n2c08.png g03n2c08.html +# g03n3p04 - paletted, file-gamma = 0.35 +== g03n3p04.png g03n3p04.html +# g04n0g16 - grayscale, file-gamma = 0.45 +== g04n0g16.png g04n0g16.html +# g04n2c08 - color, file-gamma = 0.45 +== g04n2c08.png g04n2c08.html +# g04n3p04 - paletted, file-gamma = 0.45 +== g04n3p04.png g04n3p04.html +# g05n0g16 - grayscale, file-gamma = 0.55 +== g05n0g16.png g05n0g16.html +# g05n2c08 - color, file-gamma = 0.55 +== g05n2c08.png g05n2c08.html +# g05n3p04 - paletted, file-gamma = 0.55 +== g05n3p04.png g05n3p04.html +# g07n0g16 - grayscale, file-gamma = 0.70 +== g07n0g16.png g07n0g16.html +# g07n2c08 - color, file-gamma = 0.70 +== g07n2c08.png g07n2c08.html +# g07n3p04 - paletted, file-gamma = 0.70 +== g07n3p04.png g07n3p04.html +# g10n0g16 - grayscale, file-gamma = 1.00 +== g10n0g16.png g10n0g16.html +# g10n2c08 - color, file-gamma = 1.00 +== g10n2c08.png g10n2c08.html +# g10n3p04 - paletted, file-gamma = 1.00 +== g10n3p04.png g10n3p04.html +# g25n0g16 - grayscale, file-gamma = 2.50 +== g25n0g16.png g25n0g16.html +# g25n2c08 - color, file-gamma = 2.50 +== g25n2c08.png g25n2c08.html +# g25n3p04 - paletted, file-gamma = 2.50 +== g25n3p04.png g25n3p04.html diff --git a/image/test/reftest/pngsuite-oddsizes/reftest-stylo.list b/image/test/reftest/pngsuite-oddsizes/reftest-stylo.list new file mode 100644 index 000000000..21254621c --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/reftest-stylo.list @@ -0,0 +1,78 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Odd sizes +# +# Note: For each size, there are 2 PNGs (one interlaced, one not). Both +# versions look identical, so they share a common HTML reference file. + +# s01i3p01 - 1x1 paletted file, interlaced +fails == s01i3p01.png s01i3p01.png +# s01n3p01 - 1x1 paletted file, no interlacing +fails == s01n3p01.png s01n3p01.png +# s02i3p01 - 2x2 paletted file, interlaced +fails == s02i3p01.png s02i3p01.png +# s02n3p01 - 2x2 paletted file, no interlacing +fails == s02n3p01.png s02n3p01.png +# s03i3p01 - 3x3 paletted file, interlaced +fails == s03i3p01.png s03i3p01.png +# s03n3p01 - 3x3 paletted file, no interlacing +fails == s03n3p01.png s03n3p01.png +# s04i3p01 - 4x4 paletted file, interlaced +fails == s04i3p01.png s04i3p01.png +# s04n3p01 - 4x4 paletted file, no interlacing +fails == s04n3p01.png s04n3p01.png +# s05i3p02 - 5x5 paletted file, interlaced +fails == s05i3p02.png s05i3p02.png +# s05n3p02 - 5x5 paletted file, no interlacing +skip == s05n3p02.png s05n3p02.png +# s06i3p02 - 6x6 paletted file, interlaced +fails == s06i3p02.png s06i3p02.png +# s06n3p02 - 6x6 paletted file, no interlacing +fails == s06n3p02.png s06n3p02.png +# s07i3p02 - 7x7 paletted file, interlaced +fails == s07i3p02.png s07i3p02.png +# s07n3p02 - 7x7 paletted file, no interlacing +fails == s07n3p02.png s07n3p02.png +# s08i3p02 - 8x8 paletted file, interlaced +fails == s08i3p02.png s08i3p02.png +# s08n3p02 - 8x8 paletted file, no interlacing +fails == s08n3p02.png s08n3p02.png +# s09i3p02 - 9x9 paletted file, interlaced +fails == s09i3p02.png s09i3p02.png +# s09n3p02 - 9x9 paletted file, no interlacing +fails == s09n3p02.png s09n3p02.png +# s32i3p04 - 32x32 paletted file, interlaced +fails == s32i3p04.png s32i3p04.png +# s32n3p04 - 32x32 paletted file, no interlacing +fails == s32n3p04.png s32n3p04.png +# s33i3p04 - 33x33 paletted file, interlaced +fails == s33i3p04.png s33i3p04.png +# s33n3p04 - 33x33 paletted file, no interlacing +fails == s33n3p04.png s33n3p04.png +# s34i3p04 - 34x34 paletted file, interlaced +fails == s34i3p04.png s34i3p04.png +# s34n3p04 - 34x34 paletted file, no interlacing +fails == s34n3p04.png s34n3p04.png +# s35i3p04 - 35x35 paletted file, interlaced +fails == s35i3p04.png s35i3p04.png +# s35n3p04 - 35x35 paletted file, no interlacing +fails == s35n3p04.png s35n3p04.png +# s36i3p04 - 36x36 paletted file, interlaced +fails == s36i3p04.png s36i3p04.png +# s36n3p04 - 36x36 paletted file, no interlacing +fails == s36n3p04.png s36n3p04.png +# s37i3p04 - 37x37 paletted file, interlaced +fails == s37i3p04.png s37i3p04.png +# s37n3p04 - 37x37 paletted file, no interlacing +fails == s37n3p04.png s37n3p04.png +# s38i3p04 - 38x38 paletted file, interlaced +fails == s38i3p04.png s38i3p04.png +# s38n3p04 - 38x38 paletted file, no interlacing +fails == s38n3p04.png s38n3p04.png +# s39i3p04 - 39x39 paletted file, interlaced +fails == s39i3p04.png s39i3p04.png +# s39n3p04 - 39x39 paletted file, no interlacing +fails == s39n3p04.png s39n3p04.png +# s40i3p04 - 40x40 paletted file, interlaced +fails == s40i3p04.png s40i3p04.png +# s40n3p04 - 40x40 paletted file, no interlacing +fails == s40n3p04.png s40n3p04.png diff --git a/image/test/reftest/pngsuite-oddsizes/reftest.list b/image/test/reftest/pngsuite-oddsizes/reftest.list new file mode 100644 index 000000000..fa72e005b --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/reftest.list @@ -0,0 +1,77 @@ +# PngSuite - Odd sizes +# +# Note: For each size, there are 2 PNGs (one interlaced, one not). Both +# versions look identical, so they share a common HTML reference file. + +# s01i3p01 - 1x1 paletted file, interlaced +== s01i3p01.png s01_3p01.html +# s01n3p01 - 1x1 paletted file, no interlacing +== s01n3p01.png s01_3p01.html +# s02i3p01 - 2x2 paletted file, interlaced +== s02i3p01.png s02_3p01.html +# s02n3p01 - 2x2 paletted file, no interlacing +== s02n3p01.png s02_3p01.html +# s03i3p01 - 3x3 paletted file, interlaced +== s03i3p01.png s03_3p01.html +# s03n3p01 - 3x3 paletted file, no interlacing +== s03n3p01.png s03_3p01.html +# s04i3p01 - 4x4 paletted file, interlaced +== s04i3p01.png s04_3p01.html +# s04n3p01 - 4x4 paletted file, no interlacing +== s04n3p01.png s04_3p01.html +# s05i3p02 - 5x5 paletted file, interlaced +== s05i3p02.png s05_3p02.html +# s05n3p02 - 5x5 paletted file, no interlacing +== s05n3p02.png s05_3p02.html +# s06i3p02 - 6x6 paletted file, interlaced +== s06i3p02.png s06_3p02.html +# s06n3p02 - 6x6 paletted file, no interlacing +== s06n3p02.png s06_3p02.html +# s07i3p02 - 7x7 paletted file, interlaced +== s07i3p02.png s07_3p02.html +# s07n3p02 - 7x7 paletted file, no interlacing +== s07n3p02.png s07_3p02.html +# s08i3p02 - 8x8 paletted file, interlaced +== s08i3p02.png s08_3p02.html +# s08n3p02 - 8x8 paletted file, no interlacing +== s08n3p02.png s08_3p02.html +# s09i3p02 - 9x9 paletted file, interlaced +== s09i3p02.png s09_3p02.html +# s09n3p02 - 9x9 paletted file, no interlacing +== s09n3p02.png s09_3p02.html +# s32i3p04 - 32x32 paletted file, interlaced +== s32i3p04.png s32_3p04.html +# s32n3p04 - 32x32 paletted file, no interlacing +== s32n3p04.png s32_3p04.html +# s33i3p04 - 33x33 paletted file, interlaced +== s33i3p04.png s33_3p04.html +# s33n3p04 - 33x33 paletted file, no interlacing +== s33n3p04.png s33_3p04.html +# s34i3p04 - 34x34 paletted file, interlaced +== s34i3p04.png s34_3p04.html +# s34n3p04 - 34x34 paletted file, no interlacing +== s34n3p04.png s34_3p04.html +# s35i3p04 - 35x35 paletted file, interlaced +== s35i3p04.png s35_3p04.html +# s35n3p04 - 35x35 paletted file, no interlacing +== s35n3p04.png s35_3p04.html +# s36i3p04 - 36x36 paletted file, interlaced +== s36i3p04.png s36_3p04.html +# s36n3p04 - 36x36 paletted file, no interlacing +== s36n3p04.png s36_3p04.html +# s37i3p04 - 37x37 paletted file, interlaced +== s37i3p04.png s37_3p04.html +# s37n3p04 - 37x37 paletted file, no interlacing +== s37n3p04.png s37_3p04.html +# s38i3p04 - 38x38 paletted file, interlaced +== s38i3p04.png s38_3p04.html +# s38n3p04 - 38x38 paletted file, no interlacing +== s38n3p04.png s38_3p04.html +# s39i3p04 - 39x39 paletted file, interlaced +== s39i3p04.png s39_3p04.html +# s39n3p04 - 39x39 paletted file, no interlacing +== s39n3p04.png s39_3p04.html +# s40i3p04 - 40x40 paletted file, interlaced +== s40i3p04.png s40_3p04.html +# s40n3p04 - 40x40 paletted file, no interlacing +== s40n3p04.png s40_3p04.html diff --git a/image/test/reftest/pngsuite-oddsizes/s01_3p01.html b/image/test/reftest/pngsuite-oddsizes/s01_3p01.html new file mode 100644 index 000000000..f38d98f1a --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s01_3p01.html @@ -0,0 +1,9 @@ + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s01i3p01.png b/image/test/reftest/pngsuite-oddsizes/s01i3p01.png new file mode 100644 index 000000000..6c0fad1fc Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s01i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s01n3p01.png b/image/test/reftest/pngsuite-oddsizes/s01n3p01.png new file mode 100644 index 000000000..cb2c8c782 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s01n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s02_3p01.html b/image/test/reftest/pngsuite-oddsizes/s02_3p01.html new file mode 100644 index 000000000..ad4660a24 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s02_3p01.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s02i3p01.png b/image/test/reftest/pngsuite-oddsizes/s02i3p01.png new file mode 100644 index 000000000..2defaed91 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s02i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s02n3p01.png b/image/test/reftest/pngsuite-oddsizes/s02n3p01.png new file mode 100644 index 000000000..2b1b66964 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s02n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s03_3p01.html b/image/test/reftest/pngsuite-oddsizes/s03_3p01.html new file mode 100644 index 000000000..adff34db3 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s03_3p01.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s03i3p01.png b/image/test/reftest/pngsuite-oddsizes/s03i3p01.png new file mode 100644 index 000000000..c23fdc463 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s03i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s03n3p01.png b/image/test/reftest/pngsuite-oddsizes/s03n3p01.png new file mode 100644 index 000000000..6d96ee4f8 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s03n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s04_3p01.html b/image/test/reftest/pngsuite-oddsizes/s04_3p01.html new file mode 100644 index 000000000..d97c2d42c --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s04_3p01.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s04i3p01.png b/image/test/reftest/pngsuite-oddsizes/s04i3p01.png new file mode 100644 index 000000000..0e710c2c3 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s04i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s04n3p01.png b/image/test/reftest/pngsuite-oddsizes/s04n3p01.png new file mode 100644 index 000000000..956396c45 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s04n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s05_3p02.html b/image/test/reftest/pngsuite-oddsizes/s05_3p02.html new file mode 100644 index 000000000..e5664fb9d --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s05_3p02.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s05i3p02.png b/image/test/reftest/pngsuite-oddsizes/s05i3p02.png new file mode 100644 index 000000000..d14cbd351 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s05i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s05n3p02.png b/image/test/reftest/pngsuite-oddsizes/s05n3p02.png new file mode 100644 index 000000000..bf940f057 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s05n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s06_3p02.html b/image/test/reftest/pngsuite-oddsizes/s06_3p02.html new file mode 100644 index 000000000..6d13dc56f --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s06_3p02.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s06i3p02.png b/image/test/reftest/pngsuite-oddsizes/s06i3p02.png new file mode 100644 index 000000000..456ada320 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s06i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s06n3p02.png b/image/test/reftest/pngsuite-oddsizes/s06n3p02.png new file mode 100644 index 000000000..501064dc2 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s06n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s07_3p02.html b/image/test/reftest/pngsuite-oddsizes/s07_3p02.html new file mode 100644 index 000000000..3fc2d42a7 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s07_3p02.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s07i3p02.png b/image/test/reftest/pngsuite-oddsizes/s07i3p02.png new file mode 100644 index 000000000..44b66bab9 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s07i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s07n3p02.png b/image/test/reftest/pngsuite-oddsizes/s07n3p02.png new file mode 100644 index 000000000..6a582593d Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s07n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s08_3p02.html b/image/test/reftest/pngsuite-oddsizes/s08_3p02.html new file mode 100644 index 000000000..52079c319 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s08_3p02.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s08i3p02.png b/image/test/reftest/pngsuite-oddsizes/s08i3p02.png new file mode 100644 index 000000000..acf74f3fc Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s08i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s08n3p02.png b/image/test/reftest/pngsuite-oddsizes/s08n3p02.png new file mode 100644 index 000000000..b7094e1b4 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s08n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s09_3p02.html b/image/test/reftest/pngsuite-oddsizes/s09_3p02.html new file mode 100644 index 000000000..3b994e128 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s09_3p02.html @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s09i3p02.png b/image/test/reftest/pngsuite-oddsizes/s09i3p02.png new file mode 100644 index 000000000..0bfae8e45 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s09i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s09n3p02.png b/image/test/reftest/pngsuite-oddsizes/s09n3p02.png new file mode 100644 index 000000000..711ab8245 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s09n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s32_3p04.html b/image/test/reftest/pngsuite-oddsizes/s32_3p04.html new file mode 100644 index 000000000..a10399ba6 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s32_3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s32i3p04.png b/image/test/reftest/pngsuite-oddsizes/s32i3p04.png new file mode 100644 index 000000000..0841910b7 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s32i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s32n3p04.png b/image/test/reftest/pngsuite-oddsizes/s32n3p04.png new file mode 100644 index 000000000..fa58e3e3f Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s32n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s33_3p04.html b/image/test/reftest/pngsuite-oddsizes/s33_3p04.html new file mode 100644 index 000000000..d845558ce --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s33_3p04.html @@ -0,0 +1,1161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s33i3p04.png b/image/test/reftest/pngsuite-oddsizes/s33i3p04.png new file mode 100644 index 000000000..ab0dc14ab Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s33i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s33n3p04.png b/image/test/reftest/pngsuite-oddsizes/s33n3p04.png new file mode 100644 index 000000000..764f1a3dc Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s33n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s34_3p04.html b/image/test/reftest/pngsuite-oddsizes/s34_3p04.html new file mode 100644 index 000000000..605ff9264 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s34_3p04.html @@ -0,0 +1,1230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s34i3p04.png b/image/test/reftest/pngsuite-oddsizes/s34i3p04.png new file mode 100644 index 000000000..bd99039be Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s34i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s34n3p04.png b/image/test/reftest/pngsuite-oddsizes/s34n3p04.png new file mode 100644 index 000000000..9cbc68b3b Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s34n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s35_3p04.html b/image/test/reftest/pngsuite-oddsizes/s35_3p04.html new file mode 100644 index 000000000..6a5f720a9 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s35_3p04.html @@ -0,0 +1,1301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s35i3p04.png b/image/test/reftest/pngsuite-oddsizes/s35i3p04.png new file mode 100644 index 000000000..e2a5e0a65 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s35i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s35n3p04.png b/image/test/reftest/pngsuite-oddsizes/s35n3p04.png new file mode 100644 index 000000000..90b892eba Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s35n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s36_3p04.html b/image/test/reftest/pngsuite-oddsizes/s36_3p04.html new file mode 100644 index 000000000..68a5ae4be --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s36_3p04.html @@ -0,0 +1,1374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s36i3p04.png b/image/test/reftest/pngsuite-oddsizes/s36i3p04.png new file mode 100644 index 000000000..eb61b6f9a Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s36i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s36n3p04.png b/image/test/reftest/pngsuite-oddsizes/s36n3p04.png new file mode 100644 index 000000000..b38d17977 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s36n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s37_3p04.html b/image/test/reftest/pngsuite-oddsizes/s37_3p04.html new file mode 100644 index 000000000..0f19b653a --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s37_3p04.html @@ -0,0 +1,1449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s37i3p04.png b/image/test/reftest/pngsuite-oddsizes/s37i3p04.png new file mode 100644 index 000000000..6e2b1e9b7 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s37i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s37n3p04.png b/image/test/reftest/pngsuite-oddsizes/s37n3p04.png new file mode 100644 index 000000000..4d3054da5 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s37n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s38_3p04.html b/image/test/reftest/pngsuite-oddsizes/s38_3p04.html new file mode 100644 index 000000000..38a869298 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s38_3p04.html @@ -0,0 +1,1526 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s38i3p04.png b/image/test/reftest/pngsuite-oddsizes/s38i3p04.png new file mode 100644 index 000000000..a0a8a140a Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s38i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s38n3p04.png b/image/test/reftest/pngsuite-oddsizes/s38n3p04.png new file mode 100644 index 000000000..1233ed048 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s38n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s39_3p04.html b/image/test/reftest/pngsuite-oddsizes/s39_3p04.html new file mode 100644 index 000000000..6a00026dc --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s39_3p04.html @@ -0,0 +1,1605 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s39i3p04.png b/image/test/reftest/pngsuite-oddsizes/s39i3p04.png new file mode 100644 index 000000000..04fee93ea Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s39i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s39n3p04.png b/image/test/reftest/pngsuite-oddsizes/s39n3p04.png new file mode 100644 index 000000000..c750100d5 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s39n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s40_3p04.html b/image/test/reftest/pngsuite-oddsizes/s40_3p04.html new file mode 100644 index 000000000..59b18da4d --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s40_3p04.html @@ -0,0 +1,1686 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s40i3p04.png b/image/test/reftest/pngsuite-oddsizes/s40i3p04.png new file mode 100644 index 000000000..68f358b82 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s40i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s40n3p04.png b/image/test/reftest/pngsuite-oddsizes/s40n3p04.png new file mode 100644 index 000000000..864b6b967 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s40n3p04.png differ diff --git a/image/test/reftest/pngsuite-palettes/pp0n2c16.html b/image/test/reftest/pngsuite-palettes/pp0n2c16.html new file mode 100644 index 000000000..dd08f0e3d --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/pp0n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/pp0n2c16.png b/image/test/reftest/pngsuite-palettes/pp0n2c16.png new file mode 100644 index 000000000..8f2aad733 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/pp0n2c16.png differ diff --git a/image/test/reftest/pngsuite-palettes/pp0n6a08.png b/image/test/reftest/pngsuite-palettes/pp0n6a08.png new file mode 100644 index 000000000..4ed7a30e4 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/pp0n6a08.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps1n0g08.html b/image/test/reftest/pngsuite-palettes/ps1n0g08.html new file mode 100644 index 000000000..5aaf11cab --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps1n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps1n0g08.png b/image/test/reftest/pngsuite-palettes/ps1n0g08.png new file mode 100644 index 000000000..2053df2ba Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps1n0g08.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps1n2c16.html b/image/test/reftest/pngsuite-palettes/ps1n2c16.html new file mode 100644 index 000000000..dd08f0e3d --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps1n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps1n2c16.png b/image/test/reftest/pngsuite-palettes/ps1n2c16.png new file mode 100644 index 000000000..b03ecfc66 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps1n2c16.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps2n0g08.html b/image/test/reftest/pngsuite-palettes/ps2n0g08.html new file mode 100644 index 000000000..5aaf11cab --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps2n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps2n0g08.png b/image/test/reftest/pngsuite-palettes/ps2n0g08.png new file mode 100644 index 000000000..beeab8ff3 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps2n0g08.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps2n2c16.html b/image/test/reftest/pngsuite-palettes/ps2n2c16.html new file mode 100644 index 000000000..dd08f0e3d --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps2n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps2n2c16.png b/image/test/reftest/pngsuite-palettes/ps2n2c16.png new file mode 100644 index 000000000..c256f9091 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps2n2c16.png differ diff --git a/image/test/reftest/pngsuite-palettes/reftest-stylo.list b/image/test/reftest/pngsuite-palettes/reftest-stylo.list new file mode 100644 index 000000000..702529b29 --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/reftest-stylo.list @@ -0,0 +1,15 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Additional palettes + +# pp0n2c16 - six-cube palette-chunk in true-color image +fails == pp0n2c16.png pp0n2c16.png +# pp0n6a08 - six-cube palette-chunk in true-color+alpha image +#== pp0n6a08.png pp0n6a08.png +# ps1n0g08 - six-cube suggested palette (1 byte) in grayscale image +fails == ps1n0g08.png ps1n0g08.png +# ps1n2c16 - six-cube suggested palette (1 byte) in true-color image +fails == ps1n2c16.png ps1n2c16.png +# ps2n0g08 - six-cube suggested palette (2 bytes) in grayscale image +fails == ps2n0g08.png ps2n0g08.png +# ps2n2c16 - six-cube suggested palette (2 bytes) in true-color image +fails == ps2n2c16.png ps2n2c16.png diff --git a/image/test/reftest/pngsuite-palettes/reftest.list b/image/test/reftest/pngsuite-palettes/reftest.list new file mode 100644 index 000000000..56eb56e0a --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/reftest.list @@ -0,0 +1,14 @@ +# PngSuite - Additional palettes + +# pp0n2c16 - six-cube palette-chunk in true-color image +== pp0n2c16.png pp0n2c16.html +# pp0n6a08 - six-cube palette-chunk in true-color+alpha image +#== pp0n6a08.png pp0n6a08.html +# ps1n0g08 - six-cube suggested palette (1 byte) in grayscale image +== ps1n0g08.png ps1n0g08.html +# ps1n2c16 - six-cube suggested palette (1 byte) in true-color image +== ps1n2c16.png ps1n2c16.html +# ps2n0g08 - six-cube suggested palette (2 bytes) in grayscale image +== ps2n0g08.png ps2n0g08.html +# ps2n2c16 - six-cube suggested palette (2 bytes) in true-color image +== ps2n2c16.png ps2n2c16.html diff --git a/image/test/reftest/pngsuite-transparency/reftest-stylo.list b/image/test/reftest/pngsuite-transparency/reftest-stylo.list new file mode 100644 index 000000000..90543ab95 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/reftest-stylo.list @@ -0,0 +1,27 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# PngSuite - Transparency + +# tbbn1g04 - transparent, black background chunk +skip == wrapper.html?tbbn1g04.png wrapper.html?tbbn1g04.png +# tbbn2c16 - transparent, blue background chunk +skip == wrapper.html?tbbn2c16.png wrapper.html?tbbn2c16.png +# tbbn3p08 - transparent, black background chunk +skip == wrapper.html?tbbn3p08.png wrapper.html?tbbn3p08.png +# tbgn2c16 - transparent, green background chunk +skip == wrapper.html?tbgn2c16.png wrapper.html?tbgn2c16.png +# tbgn3p08 - transparent, light-gray background chunk +skip == wrapper.html?tbgn3p08.png wrapper.html?tbgn3p08.png +# tbrn2c08 - transparent, red background chunk +skip == wrapper.html?tbrn2c08.png wrapper.html?tbrn2c08.png +# tbwn1g16 - transparent, white background chunk +skip == wrapper.html?tbwn1g16.png wrapper.html?tbwn1g16.png +# tbwn3p08 - transparent, white background chunk +skip == wrapper.html?tbwn3p08.png wrapper.html?tbwn3p08.png +# tbyn3p08 - transparent, yellow background chunk +skip == wrapper.html?tbyn3p08.png wrapper.html?tbyn3p08.png +# tp0n1g08 - not transparent for reference (logo on gray) +# tp0n2c08 - not transparent for reference (logo on gray) +# tp0n3p08 - not transparent for reference (logo on gray) +# ...these 3 not tested because they're not transparent. +# tp1n3p08 - transparent, but no background chunk +skip == wrapper.html?tp1n3p08.png wrapper.html?tp1n3p08.png diff --git a/image/test/reftest/pngsuite-transparency/reftest.list b/image/test/reftest/pngsuite-transparency/reftest.list new file mode 100644 index 000000000..2b574c5d8 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/reftest.list @@ -0,0 +1,26 @@ +# PngSuite - Transparency + +# tbbn1g04 - transparent, black background chunk +== wrapper.html?tbbn1g04.png tbbn1g04.html +# tbbn2c16 - transparent, blue background chunk +== wrapper.html?tbbn2c16.png tbbn2c16.html +# tbbn3p08 - transparent, black background chunk +== wrapper.html?tbbn3p08.png tbbn3p08.html +# tbgn2c16 - transparent, green background chunk +== wrapper.html?tbgn2c16.png tbgn2c16.html +# tbgn3p08 - transparent, light-gray background chunk +== wrapper.html?tbgn3p08.png tbgn3p08.html +# tbrn2c08 - transparent, red background chunk +== wrapper.html?tbrn2c08.png tbrn2c08.html +# tbwn1g16 - transparent, white background chunk +== wrapper.html?tbwn1g16.png tbwn1g16.html +# tbwn3p08 - transparent, white background chunk +== wrapper.html?tbwn3p08.png tbwn3p08.html +# tbyn3p08 - transparent, yellow background chunk +== wrapper.html?tbyn3p08.png tbyn3p08.html +# tp0n1g08 - not transparent for reference (logo on gray) +# tp0n2c08 - not transparent for reference (logo on gray) +# tp0n3p08 - not transparent for reference (logo on gray) +# ...these 3 not tested because they're not transparent. +# tp1n3p08 - transparent, but no background chunk +== wrapper.html?tp1n3p08.png tp1n3p08.html diff --git a/image/test/reftest/pngsuite-transparency/tbbn1g04.html b/image/test/reftest/pngsuite-transparency/tbbn1g04.html new file mode 100644 index 000000000..c2e5780b0 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbbn1g04.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbbn1g04.png b/image/test/reftest/pngsuite-transparency/tbbn1g04.png new file mode 100644 index 000000000..fc8002053 Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbbn1g04.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbbn2c16.html b/image/test/reftest/pngsuite-transparency/tbbn2c16.html new file mode 100644 index 000000000..849c66faf --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbbn2c16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbbn2c16.png b/image/test/reftest/pngsuite-transparency/tbbn2c16.png new file mode 100644 index 000000000..5abfbbb3a Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbbn2c16.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbbn3p08.html b/image/test/reftest/pngsuite-transparency/tbbn3p08.html new file mode 100644 index 000000000..9248bb274 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbbn3p08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbbn3p08.png b/image/test/reftest/pngsuite-transparency/tbbn3p08.png new file mode 100644 index 000000000..4210d1683 Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbbn3p08.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbgn2c16.html b/image/test/reftest/pngsuite-transparency/tbgn2c16.html new file mode 100644 index 000000000..849c66faf --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbgn2c16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbgn2c16.png b/image/test/reftest/pngsuite-transparency/tbgn2c16.png new file mode 100644 index 000000000..236c81dcf Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbgn2c16.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbgn3p08.html b/image/test/reftest/pngsuite-transparency/tbgn3p08.html new file mode 100644 index 000000000..9248bb274 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbgn3p08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbgn3p08.png b/image/test/reftest/pngsuite-transparency/tbgn3p08.png new file mode 100644 index 000000000..42db2325b Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbgn3p08.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbrn2c08.html b/image/test/reftest/pngsuite-transparency/tbrn2c08.html new file mode 100644 index 000000000..9248bb274 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbrn2c08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbrn2c08.png b/image/test/reftest/pngsuite-transparency/tbrn2c08.png new file mode 100644 index 000000000..8c214746d Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbrn2c08.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbwn1g16.html b/image/test/reftest/pngsuite-transparency/tbwn1g16.html new file mode 100644 index 000000000..381cc427c --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbwn1g16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbwn1g16.png b/image/test/reftest/pngsuite-transparency/tbwn1g16.png new file mode 100644 index 000000000..dba2cbb6c Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbwn1g16.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbwn3p08.html b/image/test/reftest/pngsuite-transparency/tbwn3p08.html new file mode 100644 index 000000000..9248bb274 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbwn3p08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbwn3p08.png b/image/test/reftest/pngsuite-transparency/tbwn3p08.png new file mode 100644 index 000000000..7922135aa Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbwn3p08.png differ diff --git a/image/test/reftest/pngsuite-transparency/tbyn3p08.html b/image/test/reftest/pngsuite-transparency/tbyn3p08.html new file mode 100644 index 000000000..9248bb274 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tbyn3p08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tbyn3p08.png b/image/test/reftest/pngsuite-transparency/tbyn3p08.png new file mode 100644 index 000000000..5b2c6cbba Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tbyn3p08.png differ diff --git a/image/test/reftest/pngsuite-transparency/tp1n3p08.html b/image/test/reftest/pngsuite-transparency/tp1n3p08.html new file mode 100644 index 000000000..9248bb274 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/tp1n3p08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-transparency/tp1n3p08.png b/image/test/reftest/pngsuite-transparency/tp1n3p08.png new file mode 100644 index 000000000..6c5fd6ec3 Binary files /dev/null and b/image/test/reftest/pngsuite-transparency/tp1n3p08.png differ diff --git a/image/test/reftest/pngsuite-transparency/wrapper.html b/image/test/reftest/pngsuite-transparency/wrapper.html new file mode 100644 index 000000000..5bbe75e01 --- /dev/null +++ b/image/test/reftest/pngsuite-transparency/wrapper.html @@ -0,0 +1,27 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/pngsuite-zlib/reftest-stylo.list b/image/test/reftest/pngsuite-zlib/reftest-stylo.list new file mode 100644 index 000000000..35753fa4e --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/reftest-stylo.list @@ -0,0 +1,9 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# z00n2c08 - color, no interlacing, compression level 0 (none) +fails == z00n2c08.png z00n2c08.png +# z03n2c08 - color, no interlacing, compression level 3 +fails == z03n2c08.png z03n2c08.png +# z06n2c08 - color, no interlacing, compression level 6 (default) +fails == z06n2c08.png z06n2c08.png +# z09n2c08 - color, no interlacing, compression level 9 (maximum) +fails == z09n2c08.png z09n2c08.png diff --git a/image/test/reftest/pngsuite-zlib/reftest.list b/image/test/reftest/pngsuite-zlib/reftest.list new file mode 100644 index 000000000..ec153449f --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/reftest.list @@ -0,0 +1,8 @@ +# z00n2c08 - color, no interlacing, compression level 0 (none) +== z00n2c08.png z00n2c08.html +# z03n2c08 - color, no interlacing, compression level 3 +== z03n2c08.png z03n2c08.html +# z06n2c08 - color, no interlacing, compression level 6 (default) +== z06n2c08.png z06n2c08.html +# z09n2c08 - color, no interlacing, compression level 9 (maximum) +== z09n2c08.png z09n2c08.html diff --git a/image/test/reftest/pngsuite-zlib/z00n2c08.html b/image/test/reftest/pngsuite-zlib/z00n2c08.html new file mode 100644 index 000000000..c878a03ff --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z00n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z00n2c08.png b/image/test/reftest/pngsuite-zlib/z00n2c08.png new file mode 100644 index 000000000..7669eb838 Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z00n2c08.png differ diff --git a/image/test/reftest/pngsuite-zlib/z03n2c08.html b/image/test/reftest/pngsuite-zlib/z03n2c08.html new file mode 100644 index 000000000..c878a03ff --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z03n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z03n2c08.png b/image/test/reftest/pngsuite-zlib/z03n2c08.png new file mode 100644 index 000000000..bfb10de8d Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z03n2c08.png differ diff --git a/image/test/reftest/pngsuite-zlib/z06n2c08.html b/image/test/reftest/pngsuite-zlib/z06n2c08.html new file mode 100644 index 000000000..c878a03ff --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z06n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z06n2c08.png b/image/test/reftest/pngsuite-zlib/z06n2c08.png new file mode 100644 index 000000000..b90ebc10f Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z06n2c08.png differ diff --git a/image/test/reftest/pngsuite-zlib/z09n2c08.html b/image/test/reftest/pngsuite-zlib/z09n2c08.html new file mode 100644 index 000000000..c878a03ff --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z09n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z09n2c08.png b/image/test/reftest/pngsuite-zlib/z09n2c08.png new file mode 100644 index 000000000..5f191a78e Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z09n2c08.png differ diff --git a/image/test/reftest/reftest-stylo.list b/image/test/reftest/reftest-stylo.list new file mode 100644 index 000000000..8c76cce79 --- /dev/null +++ b/image/test/reftest/reftest-stylo.list @@ -0,0 +1,65 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# Check for 24-bit color mode (test for bug 414720) +skip-if(Android) == colordepth.html colordepth.html + +# "PngSuite, the official set of PNG test images" +# Images by Willem van Schaik +# +# http://www.schaik.com/pngsuite/pngsuite.html +# http://www.libpng.org/pub/png/pngsuite.html +skip-if(B2G) include pngsuite-basic-n/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-basic-i/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-ancillary/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-background/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-chunkorder/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-corrupted/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-filtering/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-gamma/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-oddsizes/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-palettes/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-transparency/reftest-stylo.list +# bug 783632 +skip-if(B2G) include pngsuite-zlib/reftest-stylo.list +# bug 783632 + +# Disabled, lots of intermittents here +# BMP tests +#skip-if(Android) include bmp/reftest-stylo.list + +# ICO tests +#skip-if(Android) include ico/reftest-stylo.list + +# JPEG tests +# include jpeg/reftest-stylo.list + +# GIF tests +# include gif/reftest-stylo.list + +# APNG tests +include apng/reftest-stylo.list + +# Generic image tests +include generic/reftest-stylo.list + +# Color management test +include color-management/reftest-stylo.list + +# Downscaling tests +# include downscaling/reftest-stylo.list + +# Blob URI tests +include blob/reftest-stylo.list + +# Lossless encoders +# skip-if(Android||B2G) include encoders-lossless/reftest-stylo.list +# bug 783621 diff --git a/image/test/reftest/reftest.list b/image/test/reftest/reftest.list new file mode 100644 index 000000000..bfa154e6a --- /dev/null +++ b/image/test/reftest/reftest.list @@ -0,0 +1,50 @@ +# Check for 24-bit color mode (test for bug 414720) +skip-if(Android) == colordepth.html about:blank + +# "PngSuite, the official set of PNG test images" +# Images by Willem van Schaik +# +# http://www.schaik.com/pngsuite/pngsuite.html +# http://www.libpng.org/pub/png/pngsuite.html +include pngsuite-basic-n/reftest.list +include pngsuite-basic-i/reftest.list +include pngsuite-ancillary/reftest.list +include pngsuite-background/reftest.list +include pngsuite-chunkorder/reftest.list +include pngsuite-corrupted/reftest.list +include pngsuite-filtering/reftest.list +include pngsuite-gamma/reftest.list +include pngsuite-oddsizes/reftest.list +include pngsuite-palettes/reftest.list +include pngsuite-transparency/reftest.list +include pngsuite-zlib/reftest.list + +# BMP tests +skip-if(Android) include bmp/reftest.list + +# ICO tests +skip-if(Android) include ico/reftest.list + +# JPEG tests +include jpeg/reftest.list + +# GIF tests +include gif/reftest.list + +# APNG tests +include apng/reftest.list + +# Generic image tests +include generic/reftest.list + +# Color management test +include color-management/reftest.list + +# Downscaling tests +include downscaling/reftest.list + +# Blob URI tests +include blob/reftest.list + +# Lossless encoders +skip-if(Android) include encoders-lossless/reftest.list diff --git a/image/test/unit/async_load_tests.js b/image/test/unit/async_load_tests.js new file mode 100644 index 000000000..fafb26f75 --- /dev/null +++ b/image/test/unit/async_load_tests.js @@ -0,0 +1,214 @@ +/* + * Test to ensure that image loading/decoding notifications are always + * delivered async, and in the order we expect. + * + * Must be included from a file that has a uri of the image to test defined in + * var uri. + */ + +var Cc = Components.classes; +var Ci = Components.interfaces; +var Cu = Components.utils; +var Cr = Components.results; + +Cu.import("resource://testing-common/httpd.js"); +Cu.import("resource://gre/modules/NetUtil.jsm"); + +var server = new HttpServer(); +server.registerDirectory("/", do_get_file('')); +server.registerContentType("sjs", "sjs"); +server.start(-1); + + +load('image_load_helpers.js'); + +var requests = []; + +// Return a closure that holds on to the listener from the original +// imgIRequest, and compares its results to the cloned one. +function getCloneStopCallback(original_listener) +{ + return function cloneStop(listener) { + do_check_eq(original_listener.state, listener.state); + + // Sanity check to make sure we didn't accidentally use the same listener + // twice. + do_check_neq(original_listener, listener); + do_test_finished(); + } +} + +// Make sure that cloned requests get all the same callbacks as the original, +// but they aren't synchronous right now. +function checkClone(other_listener, aRequest) +{ + do_test_pending(); + + // For as long as clone notification is synchronous, we can't test the clone state reliably. + var listener = new ImageListener(null, function(foo, bar) { do_test_finished(); } /*getCloneStopCallback(other_listener)*/); + listener.synchronous = false; + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener); + var clone = aRequest.clone(outer); + requests.push(clone); +} + +// Ensure that all the callbacks were called on aRequest. +function checkSizeAndLoad(listener, aRequest) +{ + do_check_neq(listener.state & SIZE_AVAILABLE, 0); + do_check_neq(listener.state & LOAD_COMPLETE, 0); + + do_test_finished(); +} + +function secondLoadDone(oldlistener, aRequest) +{ + do_test_pending(); + + try { + var staticrequest = aRequest.getStaticRequest(); + + // For as long as clone notification is synchronous, we can't test the + // clone state reliably. + var listener = new ImageListener(null, checkSizeAndLoad); + listener.synchronous = false; + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener); + var staticrequestclone = staticrequest.clone(outer); + requests.push(staticrequestclone); + } catch(e) { + // We can't create a static request. Most likely the request we started + // with didn't load successfully. + do_test_finished(); + } + + run_loadImageWithChannel_tests(); + + do_test_finished(); +} + +// Load the request a second time. This should come from the image cache, and +// therefore would be at most risk of being served synchronously. +function checkSecondLoad() +{ + do_test_pending(); + + var listener = new ImageListener(checkClone, secondLoadDone); + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener); + requests.push(gCurrentLoader.loadImageXPCOM(uri, null, null, "default", null, null, outer, null, 0, null)); + listener.synchronous = false; +} + +function firstLoadDone(oldlistener, aRequest) +{ + checkSecondLoad(uri); + + do_test_finished(); +} + +// Return a closure that allows us to check the stream listener's status when the +// image finishes loading. +function getChannelLoadImageStopCallback(streamlistener, next) +{ + return function channelLoadStop(imglistener, aRequest) { + + next(); + + do_test_finished(); + } +} + +// Load the request a second time. This should come from the image cache, and +// therefore would be at most risk of being served synchronously. +function checkSecondChannelLoad() +{ + do_test_pending(); + var channel = NetUtil.newChannel({uri: uri, loadUsingSystemPrincipal: true}); + var channellistener = new ChannelListener(); + channel.asyncOpen2(channellistener); + + var listener = new ImageListener(null, + getChannelLoadImageStopCallback(channellistener, + all_done_callback)); + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener); + var outlistener = {}; + requests.push(gCurrentLoader.loadImageWithChannelXPCOM(channel, outer, null, outlistener)); + channellistener.outputListener = outlistener.value; + + listener.synchronous = false; +} + +function run_loadImageWithChannel_tests() +{ + // To ensure we're testing what we expect to, create a new loader and cache. + gCurrentLoader = Cc["@mozilla.org/image/loader;1"].createInstance(Ci.imgILoader); + + do_test_pending(); + var channel = NetUtil.newChannel({uri: uri, loadUsingSystemPrincipal: true}); + var channellistener = new ChannelListener(); + channel.asyncOpen2(channellistener); + + var listener = new ImageListener(null, + getChannelLoadImageStopCallback(channellistener, + checkSecondChannelLoad)); + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener); + var outlistener = {}; + requests.push(gCurrentLoader.loadImageWithChannelXPCOM(channel, outer, null, outlistener)); + channellistener.outputListener = outlistener.value; + + listener.synchronous = false; +} + +function all_done_callback() +{ + server.stop(function() { do_test_finished(); }); +} + +function startImageCallback(otherCb) +{ + return function(listener, request) + { + // Make sure we can load the same image immediately out of the cache. + do_test_pending(); + var listener2 = new ImageListener(null, function(foo, bar) { do_test_finished(); }); + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener2); + requests.push(gCurrentLoader.loadImageXPCOM(uri, null, null, "default", null, null, outer, null, 0, null)); + listener2.synchronous = false; + + // Now that we've started another load, chain to the callback. + otherCb(listener, request); + } +} + +var gCurrentLoader; + +function cleanup() +{ + for (var i = 0; i < requests.length; ++i) { + requests[i].cancelAndForgetObserver(0); + } +} + +function run_test() +{ + do_register_cleanup(cleanup); + + gCurrentLoader = Cc["@mozilla.org/image/loader;1"].createInstance(Ci.imgILoader); + + do_test_pending(); + var listener = new ImageListener(startImageCallback(checkClone), firstLoadDone); + var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) + .createScriptedObserver(listener); + var req = gCurrentLoader.loadImageXPCOM(uri, null, null, "default", null, null, outer, null, 0, null); + requests.push(req); + + // Ensure that we don't cause any mayhem when we lock an image. + req.lockImage(); + + listener.synchronous = false; +} diff --git a/image/test/unit/bug413512.ico b/image/test/unit/bug413512.ico new file mode 100644 index 000000000..b2db0429f Binary files /dev/null and b/image/test/unit/bug413512.ico differ diff --git a/image/test/unit/bug815359.ico b/image/test/unit/bug815359.ico new file mode 100644 index 000000000..a24b8fb6b Binary files /dev/null and b/image/test/unit/bug815359.ico differ diff --git a/image/test/unit/image1.png b/image/test/unit/image1.png new file mode 100644 index 000000000..2fb37aeec Binary files /dev/null and b/image/test/unit/image1.png differ diff --git a/image/test/unit/image1png16x16.jpg b/image/test/unit/image1png16x16.jpg new file mode 100644 index 000000000..ea14dbede Binary files /dev/null and b/image/test/unit/image1png16x16.jpg differ diff --git a/image/test/unit/image1png64x64.jpg b/image/test/unit/image1png64x64.jpg new file mode 100644 index 000000000..11c34f6c6 Binary files /dev/null and b/image/test/unit/image1png64x64.jpg differ diff --git a/image/test/unit/image2.jpg b/image/test/unit/image2.jpg new file mode 100644 index 000000000..b2131bf0c Binary files /dev/null and b/image/test/unit/image2.jpg differ diff --git a/image/test/unit/image2jpg16x16-win.png b/image/test/unit/image2jpg16x16-win.png new file mode 100644 index 000000000..a821626c0 Binary files /dev/null and b/image/test/unit/image2jpg16x16-win.png differ diff --git a/image/test/unit/image2jpg16x16.png b/image/test/unit/image2jpg16x16.png new file mode 100644 index 000000000..5722223c2 Binary files /dev/null and b/image/test/unit/image2jpg16x16.png differ diff --git a/image/test/unit/image2jpg16x16cropped.jpg b/image/test/unit/image2jpg16x16cropped.jpg new file mode 100644 index 000000000..fca22cb30 Binary files /dev/null and b/image/test/unit/image2jpg16x16cropped.jpg differ diff --git a/image/test/unit/image2jpg16x16cropped2.jpg b/image/test/unit/image2jpg16x16cropped2.jpg new file mode 100644 index 000000000..e51d3530d Binary files /dev/null and b/image/test/unit/image2jpg16x16cropped2.jpg differ diff --git a/image/test/unit/image2jpg16x32cropped3.jpg b/image/test/unit/image2jpg16x32cropped3.jpg new file mode 100644 index 000000000..13a3d26e5 Binary files /dev/null and b/image/test/unit/image2jpg16x32cropped3.jpg differ diff --git a/image/test/unit/image2jpg16x32scaled.jpg b/image/test/unit/image2jpg16x32scaled.jpg new file mode 100644 index 000000000..6abef0f99 Binary files /dev/null and b/image/test/unit/image2jpg16x32scaled.jpg differ diff --git a/image/test/unit/image2jpg32x16cropped4.jpg b/image/test/unit/image2jpg32x16cropped4.jpg new file mode 100644 index 000000000..46f34918c Binary files /dev/null and b/image/test/unit/image2jpg32x16cropped4.jpg differ diff --git a/image/test/unit/image2jpg32x16scaled.jpg b/image/test/unit/image2jpg32x16scaled.jpg new file mode 100644 index 000000000..e302fbafd Binary files /dev/null and b/image/test/unit/image2jpg32x16scaled.jpg differ diff --git a/image/test/unit/image2jpg32x32-win.png b/image/test/unit/image2jpg32x32-win.png new file mode 100644 index 000000000..4d84df26a Binary files /dev/null and b/image/test/unit/image2jpg32x32-win.png differ diff --git a/image/test/unit/image2jpg32x32.jpg b/image/test/unit/image2jpg32x32.jpg new file mode 100644 index 000000000..cf9a10a37 Binary files /dev/null and b/image/test/unit/image2jpg32x32.jpg differ diff --git a/image/test/unit/image2jpg32x32.png b/image/test/unit/image2jpg32x32.png new file mode 100644 index 000000000..723008771 Binary files /dev/null and b/image/test/unit/image2jpg32x32.png differ diff --git a/image/test/unit/image3.ico b/image/test/unit/image3.ico new file mode 100644 index 000000000..d44438903 Binary files /dev/null and b/image/test/unit/image3.ico differ diff --git a/image/test/unit/image3ico16x16.png b/image/test/unit/image3ico16x16.png new file mode 100644 index 000000000..e9e520cb6 Binary files /dev/null and b/image/test/unit/image3ico16x16.png differ diff --git a/image/test/unit/image3ico32x32.png b/image/test/unit/image3ico32x32.png new file mode 100644 index 000000000..58497e3fa Binary files /dev/null and b/image/test/unit/image3ico32x32.png differ diff --git a/image/test/unit/image4.gif b/image/test/unit/image4.gif new file mode 100644 index 000000000..b1530bc81 Binary files /dev/null and b/image/test/unit/image4.gif differ diff --git a/image/test/unit/image4gif16x16bmp24bpp.ico b/image/test/unit/image4gif16x16bmp24bpp.ico new file mode 100644 index 000000000..890c81c27 Binary files /dev/null and b/image/test/unit/image4gif16x16bmp24bpp.ico differ diff --git a/image/test/unit/image4gif16x16bmp32bpp.ico b/image/test/unit/image4gif16x16bmp32bpp.ico new file mode 100644 index 000000000..f8a9eb8ad Binary files /dev/null and b/image/test/unit/image4gif16x16bmp32bpp.ico differ diff --git a/image/test/unit/image4gif32x32bmp24bpp.ico b/image/test/unit/image4gif32x32bmp24bpp.ico new file mode 100644 index 000000000..28092818d Binary files /dev/null and b/image/test/unit/image4gif32x32bmp24bpp.ico differ diff --git a/image/test/unit/image4gif32x32bmp32bpp.ico b/image/test/unit/image4gif32x32bmp32bpp.ico new file mode 100644 index 000000000..0e2d28c82 Binary files /dev/null and b/image/test/unit/image4gif32x32bmp32bpp.ico differ diff --git a/image/test/unit/image_load_helpers.js b/image/test/unit/image_load_helpers.js new file mode 100644 index 000000000..e8d9a29f8 --- /dev/null +++ b/image/test/unit/image_load_helpers.js @@ -0,0 +1,122 @@ +/* + * Helper structures to track callbacks from image and channel loads. + */ + +// START_REQUEST and STOP_REQUEST are used by ChannelListener, and +// stored in ChannelListener.requestStatus. +const START_REQUEST = 0x01; +const STOP_REQUEST = 0x02; +const DATA_AVAILABLE = 0x04; + +// One bit per callback that imageListener below implements. Stored in +// ImageListener.state. +const SIZE_AVAILABLE = 0x01; +const FRAME_UPDATE = 0x02; +const FRAME_COMPLETE = 0x04; +const LOAD_COMPLETE = 0x08; +const DECODE_COMPLETE = 0x10; + +// Safebrowsing requires that the profile dir is set. +do_get_profile(); + +// An implementation of imgIScriptedNotificationObserver with the ability to +// call specified functions on onStartRequest and onStopRequest. +function ImageListener(start_callback, stop_callback) +{ + this.sizeAvailable = function onSizeAvailable(aRequest) + { + do_check_false(this.synchronous); + + this.state |= SIZE_AVAILABLE; + + if (this.start_callback) + this.start_callback(this, aRequest); + } + this.frameComplete = function onFrameComplete(aRequest) + { + do_check_false(this.synchronous); + + this.state |= FRAME_COMPLETE; + } + this.decodeComplete = function onDecodeComplete(aRequest) + { + do_check_false(this.synchronous); + + this.state |= DECODE_COMPLETE; + } + this.loadComplete = function onLoadcomplete(aRequest) + { + do_check_false(this.synchronous); + + this.state |= LOAD_COMPLETE; + + if (this.stop_callback) + this.stop_callback(this, aRequest); + } + this.frameUpdate = function onFrameUpdate(aRequest) + { + } + this.isAnimated = function onIsAnimated() + { + } + + // Initialize the synchronous flag to true to start. This must be set to + // false before exiting to the event loop! + this.synchronous = true; + + // A function to call when onStartRequest is called. + this.start_callback = start_callback; + + // A function to call when onStopRequest is called. + this.stop_callback = stop_callback; + + // The image load/decode state. + // A bitfield that tracks which callbacks have been called. Takes the bits + // defined above. + this.state = 0; +} + +function NS_FAILED(val) +{ + return !!(val & 0x80000000); +} + +function ChannelListener() +{ + this.onStartRequest = function onStartRequest(aRequest, aContext) + { + if (this.outputListener) + this.outputListener.onStartRequest(aRequest, aContext); + + this.requestStatus |= START_REQUEST; + } + + this.onDataAvailable = function onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) + { + if (this.outputListener) + this.outputListener.onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount); + + this.requestStatus |= DATA_AVAILABLE; + } + + this.onStopRequest = function onStopRequest(aRequest, aContext, aStatusCode) + { + if (this.outputListener) + this.outputListener.onStopRequest(aRequest, aContext, aStatusCode); + + // If we failed (or were canceled - failure is implied if canceled), + // there's no use tracking our state, since it's meaningless. + if (NS_FAILED(aStatusCode)) + this.requestStatus = 0; + else + this.requestStatus |= STOP_REQUEST; + } + + // A listener to pass the notifications we get to. + this.outputListener = null; + + // The request's status. A bitfield that holds one or both of START_REQUEST + // and STOP_REQUEST, according to which callbacks have been called on the + // associated request. + this.requestStatus = 0; +} diff --git a/image/test/unit/test_async_notification.js b/image/test/unit/test_async_notification.js new file mode 100644 index 000000000..63d04b99b --- /dev/null +++ b/image/test/unit/test_async_notification.js @@ -0,0 +1,10 @@ +/* + * Test for asynchronous image load/decode notifications in the case that the image load works. + */ + +// A simple 3x3 png; rows go red, green, blue. Stolen from the PNG encoder test. +var pngspec = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII="; +var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); +var uri = ioService.newURI(pngspec, null, null); + +load('async_load_tests.js'); diff --git a/image/test/unit/test_async_notification_404.js b/image/test/unit/test_async_notification_404.js new file mode 100644 index 000000000..4949d282d --- /dev/null +++ b/image/test/unit/test_async_notification_404.js @@ -0,0 +1,16 @@ +/* + * Test to ensure that load/decode notifications are delivered completely and + * asynchronously when dealing with a file that's a 404. + */ +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); + +var ioService = Components.classes["@mozilla.org/network/io-service;1"] + .getService(Components.interfaces.nsIIOService); + +XPCOMUtils.defineLazyGetter(this, "uri", function() { + return ioService.newURI("http://localhost:" + + server.identity.primaryPort + + "/async-notification-never-here.jpg", null, null); +}); + +load('async_load_tests.js'); diff --git a/image/test/unit/test_async_notification_animated.js b/image/test/unit/test_async_notification_animated.js new file mode 100644 index 000000000..bfe6e2d0d --- /dev/null +++ b/image/test/unit/test_async_notification_animated.js @@ -0,0 +1,14 @@ +/* + * Test for asynchronous image load/decode notifications in the case that the + * image load works, but for an animated image. + * + * If this fails because a request wasn't cancelled, it's possible that + * imgContainer::ExtractFrame didn't set the new image's status correctly. + */ + +// transparent-animation.gif from the gif reftests. +var spec = "data:image/gif;base64,R0lGODlhZABkAIABAP8AAP///yH5BAkBAAEALAAAAABLAGQAAAK8jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpchgPMJjUqnVOipis1ir9qul+sNV8HistVkTj/JajG7/UXDy+95tm4fy/NdPF/q93dWIqgVWAhwWKgoyPjnyAeZJ2lHOWcJh9mmqcaZ5mkGSreHOCXqRloadRrGGkeoapoa6+TaN0tra4gbq3vHq+q7BVwqrMeEnKy8zNzs/AwdLT1NXW19jZ1tUgAAIfkECQEAAQAsAAAAADQAZAAAArCMj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/7vAAiHxKLxiCRCkswmc+mMSqHSapJqzSof2u4Q67WCw1MuOTs+N9Pqq7kdZcON8vk2aF+/88g6358HaCc4Rwhn2IaopnjGSOYYBukl2UWpZYm2x0enuXnX4NnXGQqAKTYaalqlWoZH+snwWsQah+pJ64Sr5ypbCvQLHCw8TFxsfIycrLzM3PxQAAAh+QQJAQABACwAAAAAGwBkAAACUIyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gTE8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvdrfYnH5LL5jE6r16sCADs="; +var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); +var uri = ioService.newURI(spec, null, null); + +load('async_load_tests.js'); diff --git a/image/test/unit/test_encoder_apng.js b/image/test/unit/test_encoder_apng.js new file mode 100644 index 000000000..e7b90c28b --- /dev/null +++ b/image/test/unit/test_encoder_apng.js @@ -0,0 +1,470 @@ +/* + * Test for APNG encoding in ImageLib + * + */ + + +var Ci = Components.interfaces; +var Cc = Components.classes; + + // dispose=[none|background|previous] + // blend=[source|over] + +var apng1A = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGB format. + width : 3, height : 3, skipFirstFrame : false, + format : Ci.imgIEncoder.INPUT_FORMAT_RGB, + transparency : null, + plays : 0, + + frames : [ + { // frame #1 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGB, stride : 9, + transparency : null, + + pixels : [ + 255,0,0, 255,0,0, 255,0,0, + 255,0,0, 255,0,0, 255,0,0, + 255,0,0, 255,0,0, 255,0,0 + ] + }, + + { // frame #2 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGB, stride : 9, + transparency : null, + + pixels : [ + 0,255,0, 0,255,0, 0,255,0, + 0,255,0, 0,255,0, 0,255,0, + 0,255,0, 0,255,0, 0,255,0 + ] + }, + + { // frame #3 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGB, stride : 9, + transparency : null, + + pixels : [ + 0,0,255, 0,0,255, 0,0,255, + 0,0,255, 0,0,255, 0,0,255, + 0,0,255, 0,0,255, 0,0,255 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABBJREFUCJlj+M/AAEEMWFgAj44I+H2CySsAAAAaZmNUTAAAAAEAAAADAAAAAwAAAAAAAAAAAfQD6AAA7mXKzAAAABNmZEFUAAAAAgiZY2D4zwBFWFgAhpcI+I731VcAAAAaZmNUTAAAAAMAAAADAAAAAwAAAAAAAAAAAfQD6AAAA/MZJQAAABNmZEFUAAAABAiZY2Bg+A9DmCwAfaAI+AGmQVoAAAAASUVORK5CYII=" +}; + + +var apng1B = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + width : 3, height : 3, skipFirstFrame : false, + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency : null, + plays : 0, + + frames : [ + { // frame #1 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255 + ] + }, + + { // frame #2 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,255,0,255, 0,255,0,255, 0,255,0,255, + 0,255,0,255, 0,255,0,255, 0,255,0,255, + 0,255,0,255, 0,255,0,255, 0,255,0,255 + ] + }, + + { // frame #3 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,255,255, 0,0,255,255, 0,0,255,255, + 0,0,255,255, 0,0,255,255, 0,0,255,255, + 0,0,255,255, 0,0,255,255, 0,0,255,255 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABFJREFUCJlj+M/A8B+GGXByAF3XEe/CoiJ1AAAAGmZjVEwAAAABAAAAAwAAAAMAAAAAAAAAAAH0A+gAAO5lyswAAAASZmRBVAAAAAIImWNg+I8EcXIAVOAR77Vyl9QAAAAaZmNUTAAAAAMAAAADAAAAAwAAAAAAAAAAAfQD6AAAA/MZJQAAABRmZEFUAAAABAiZY2Bg+P8fgXFxAEvpEe8rClxSAAAAAElFTkSuQmCC" +}; + + +var apng1C = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + // The first frame is skipped, so it will only flash green/blue (or static red in an APNG-unaware viewer) + width : 3, height : 3, skipFirstFrame : true, + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency : null, + plays : 0, + + frames : [ + { // frame #1 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255 + ] + }, + + { // frame #2 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,255,0,255, 0,255,0,255, 0,255,0,255, + 0,255,0,255, 0,255,0,255, 0,255,0,255, + 0,255,0,255, 0,255,0,255, 0,255,0,255 + ] + }, + + { // frame #3 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,255,255, 0,0,255,255, 0,0,255,255, + 0,0,255,255, 0,0,255,255, 0,0,255,255, + 0,0,255,255, 0,0,255,255, 0,0,255,255 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAACAAAAAPONk3AAAAARSURBVAiZY/jPwPAfhhlwcgBd1xHvwqIidQAAABpmY1RMAAAAAAAAAAMAAAADAAAAAAAAAAAB9APoAAB1FiAYAAAAEmZkQVQAAAABCJljYPiPBHFyAFTgEe+kD/2tAAAAGmZjVEwAAAACAAAAAwAAAAMAAAAAAAAAAAH0A+gAAJiA8/EAAAAUZmRBVAAAAAMImWNgYPj/H4FxcQBL6RHvC5ggGQAAAABJRU5ErkJggg==" +}; + + +var apng2A = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + // blend = over mode + // (The green frame is a horizontal gradient, and the blue frame is a + // vertical gradient. They stack as they animate.) + width : 3, height : 3, skipFirstFrame : false, + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency : null, + plays : 0, + + frames : [ + { // frame #1 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255 + ] + }, + + { // frame #2 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "over", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,255,0,255, 0,255,0,180, 0,255,0,75, + 0,255,0,255, 0,255,0,180, 0,255,0,75, + 0,255,0,255, 0,255,0,180, 0,255,0,75 + ] + }, + + { // frame #3 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "over", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,255,75, 0,0,255,75, 0,0,255,75, + 0,0,255,180, 0,0,255,180, 0,0,255,180, + 0,0,255,255, 0,0,255,255, 0,0,255,255 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABFJREFUCJlj+M/A8B+GGXByAF3XEe/CoiJ1AAAAGmZjVEwAAAABAAAAAwAAAAMAAAAAAAAAAAH0A+gAAZli+loAAAAcZmRBVAAAAAIImWNg+M/wn+E/wxaG/wzeDDg5ACeGDvKVa3pyAAAAGmZjVEwAAAADAAAAAwAAAAMAAAAAAAAAAAH0A+gAAXT0KbMAAAAcZmRBVAAAAAQImWNgYPjvjcAM/7cgMMP//zAMAPqkDvLn1m3SAAAAAElFTkSuQmCC" +}; + + +var apng2B = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + // blend = over, dispose = background + // (The green frame is a horizontal gradient, and the blue frame is a + // vertical gradient. Each frame is displayed individually, blended to + // whatever the background is.) + width : 3, height : 3, skipFirstFrame : false, + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency : null, + plays : 0, + + frames : [ + { // frame #1 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "background", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255, + 255,0,0,255, 255,0,0,255, 255,0,0,255 + ] + }, + + { // frame #2 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "background", blend : "over", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,255,0,255, 0,255,0,180, 0,255,0,75, + 0,255,0,255, 0,255,0,180, 0,255,0,75, + 0,255,0,255, 0,255,0,180, 0,255,0,75 + ] + }, + + { // frame #3 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "background", blend : "over", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,255,75, 0,0,255,75, 0,0,255,75, + 0,0,255,180, 0,0,255,180, 0,0,255,180, + 0,0,255,255, 0,0,255,255, 0,0,255,255 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AEAbA0RWQAAABFJREFUCJlj+M/A8B+GGXByAF3XEe/CoiJ1AAAAGmZjVEwAAAABAAAAAwAAAAMAAAAAAAAAAAH0A+gBAYB5yxsAAAAcZmRBVAAAAAIImWNg+M/wn+E/wxaG/wzeDDg5ACeGDvKVa3pyAAAAGmZjVEwAAAADAAAAAwAAAAMAAAAAAAAAAAH0A+gBAW3vGPIAAAAcZmRBVAAAAAQImWNgYPjvjcAM/7cgMMP//zAMAPqkDvLn1m3SAAAAAElFTkSuQmCC" +}; + + +var apng3 = { + // A 3x3 image with 4 frames. First frame is white, then 1x1 frames draw a diagonal line + width : 3, height : 3, skipFirstFrame : false, + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency : null, + plays : 0, + + frames : [ + { // frame #1 + width : 3, height : 3, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + + 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255 + ] + }, + + { // frame #2 + width : 1, height : 1, + x_offset : 0, y_offset : 0, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,0,255 + ] + }, + + { // frame #3 + width : 1, height : 1, + x_offset : 1, y_offset : 1, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,0,255 + ] + }, + + { // frame #4 + width : 1, height : 1, + x_offset : 2, y_offset : 2, + dispose : "none", blend : "source", delay : 500, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 0,0,0,255 + ] + } + ], + + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAAEAAAAAHzNZtAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAAA5JREFUCJlj+I8EGHByALuHI91kueRqAAAAGmZjVEwAAAABAAAAAQAAAAEAAAAAAAAAAAH0A+gAADJXfawAAAARZmRBVAAAAAIImWNgYGD4DwABBAEAbr5mpgAAABpmY1RMAAAAAwAAAAEAAAABAAAAAQAAAAEB9APoAAC4OHoxAAAAEWZkQVQAAAAECJljYGBg+A8AAQQBAJZ8LRAAAAAaZmNUTAAAAAUAAAABAAAAAQAAAAIAAAACAfQD6AAA/fh01wAAABFmZEFUAAAABgiZY2BgYPgPAAEEAQB3Eum9AAAAAElFTkSuQmCC" +}; + +// Main test entry point. +function run_test() { + dump("Checking apng1A...\n"); + run_test_for(apng1A); + dump("Checking apng1B...\n"); + run_test_for(apng1B); + dump("Checking apng1C...\n"); + run_test_for(apng1C); + + dump("Checking apng2A...\n"); + run_test_for(apng2A); + dump("Checking apng2B...\n"); + run_test_for(apng2B); + + dump("Checking apng3...\n"); + run_test_for(apng3); +}; + + +function run_test_for(input) { + var encoder, dataURL; + + encoder = encodeImage(input); + dataURL = makeDataURL(encoder, "image/png"); + do_check_eq(dataURL, input.expected); +}; + + +function encodeImage(input) { + var encoder = Cc["@mozilla.org/image/encoder;2?type=image/png"].createInstance(); + encoder.QueryInterface(Ci.imgIEncoder); + + var options = ""; + if (input.transparency) { options += "transparency=" + input.transparency; } + options += ";frames=" + input.frames.length; + options += ";skipfirstframe=" + (input.skipFirstFrame ? "yes" : "no"); + options += ";plays=" + input.plays; + encoder.startImageEncode(input.width, input.height, input.format, options); + + for (var i = 0; i < input.frames.length; i++) { + var frame = input.frames[i]; + + options = ""; + if (frame.transparency) { options += "transparency=" + input.transparency; } + options += ";delay=" + frame.delay; + options += ";dispose=" + frame.dispose; + options += ";blend=" + frame.blend; + if (frame.x_offset > 0) { options += ";xoffset=" + frame.x_offset; } + if (frame.y_offset > 0) { options += ";yoffset=" + frame.y_offset; } + + encoder.addImageFrame(frame.pixels, frame.pixels.length, + frame.width, frame.height, frame.stride, frame.format, options); + } + + encoder.endImageEncode(); + + return encoder; +} + + +function makeDataURL(encoder, mimetype) { + var rawStream = encoder.QueryInterface(Ci.nsIInputStream); + + var stream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(); + stream.QueryInterface(Ci.nsIBinaryInputStream); + + stream.setInputStream(rawStream); + + var bytes = stream.readByteArray(stream.available()); // returns int[] + + var base64String = toBase64(bytes); + + return "data:" + mimetype + ";base64," + base64String; +} + +/* toBase64 copied from extensions/xml-rpc/src/nsXmlRpcClient.js */ + +/* Convert data (an array of integers) to a Base64 string. */ +const toBase64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' + + '0123456789+/'; +const base64Pad = '='; +function toBase64(data) { + var result = ''; + var length = data.length; + var i; + // Convert every three bytes to 4 ascii characters. + for (i = 0; i < (length - 2); i += 3) { + result += toBase64Table[data[i] >> 2]; + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)]; + result += toBase64Table[((data[i+1] & 0x0f) << 2) + (data[i+2] >> 6)]; + result += toBase64Table[data[i+2] & 0x3f]; + } + + // Convert the remaining 1 or 2 bytes, pad out to 4 characters. + if (length%3) { + i = length - (length%3); + result += toBase64Table[data[i] >> 2]; + if ((length%3) == 2) { + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)]; + result += toBase64Table[(data[i+1] & 0x0f) << 2]; + result += base64Pad; + } else { + result += toBase64Table[(data[i] & 0x03) << 4]; + result += base64Pad + base64Pad; + } + } + + return result; +} diff --git a/image/test/unit/test_encoder_png.js b/image/test/unit/test_encoder_png.js new file mode 100644 index 000000000..67beb840f --- /dev/null +++ b/image/test/unit/test_encoder_png.js @@ -0,0 +1,256 @@ +/* + * Test for PNG encoding in ImageLib + * + */ + +var Ci = Components.interfaces; +var Cc = Components.classes; + +var png1A = { + // A 3x3 image, rows are red, green, blue. + // RGB format, transparency defaults. + + transparency : null, + + frames : [ + { + width : 3, height : 3, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGB, stride : 9, + + pixels : [ + 255,0,0, 255,0,0, 255,0,0, + 0,255,0, 0,255,0, 0,255,0, + 0,0,255, 0,0,255, 0,0,255, + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII=" +}; + +var png1B = { + // A 3x3 image, rows are red, green, blue. + // RGB format, transparency=none. + + transparency : "none", + + frames : [ + { + width : 3, height : 3, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGB, stride : 9, + + pixels : [ + 255,0,0, 255,0,0, 255,0,0, + 0,255,0, 0,255,0, 0,255,0, + 0,0,255, 0,0,255, 0,0,255, + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII=" +}; + +var png2A = { + // A 3x3 image, rows are: red, green, blue. Columns are: 0%, 33%, 66% transparent. + + transparency : null, + + frames : [ + { + width : 3, height : 3, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 255,0,0,255, 255,0,0,170, 255,0,0,85, + 0,255,0,255, 0,255,0,170, 0,255,0,85, + 0,0,255,255, 0,0,255,170, 0,0,255,85 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAAIElEQVQImSXJMQEAMAwEIUy+yZi8DmVFFBcjycn86GgPJw4O8v9DkkEAAAAASUVORK5CYII=" +}; + +var png2B = { + // A 3x3 image, rows are: red, green, blue. Columns are: 0%, 33%, 66% transparent, + // but transparency will be ignored. + + transparency : "none", + + frames : [ + { + width : 3, height : 3, + + format : Ci.imgIEncoder.INPUT_FORMAT_RGBA, stride : 12, + + pixels : [ + 255,0,0,255, 255,0,0,170, 255,0,0,85, + 0,255,0,255, 0,255,0,170, 0,255,0,85, + 0,0,255,255, 0,0,255,170, 0,0,255,85 + ] + } + + ], + expected : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII=" +}; + +// Main test entry point. +function run_test() { + dump("Checking png1A...\n") + run_test_for(png1A); + dump("Checking png1B...\n") + run_test_for(png1B); + dump("Checking png2A...\n") + run_test_for(png2A); + dump("Checking png2B...\n") + run_test_for(png2B); +}; + + +function run_test_for(input) { + var encoder, dataURL; + + encoder = encodeImage(input); + dataURL = makeDataURL(encoder, "image/png"); + do_check_eq(dataURL, input.expected); + + encoder = encodeImageAsync(input); + dataURL = makeDataURLFromAsync(encoder, "image/png", input.expected); +}; + + +function encodeImage(input) { + var encoder = Cc["@mozilla.org/image/encoder;2?type=image/png"].createInstance(); + encoder.QueryInterface(Ci.imgIEncoder); + + var options = ""; + if (input.transparency) { + options += "transparency=" + input.transparency; + } + + var frame = input.frames[0]; + encoder.initFromData(frame.pixels, frame.pixels.length, + frame.width, frame.height, frame.stride, + frame.format, options); + return encoder; +} + +function _encodeImageAsyncFactory(frame, options, encoder) +{ + function finishEncode() { + encoder.addImageFrame(frame.pixels, frame.pixels.length, + frame.width, frame.height, frame.stride, + frame.format, options); + encoder.endImageEncode(); + } + return finishEncode; +} + +function encodeImageAsync(input) +{ + var encoder = Cc["@mozilla.org/image/encoder;2?type=image/png"].createInstance(); + encoder.QueryInterface(Ci.imgIEncoder); + + var options = ""; + if (input.transparency) { + options += "transparency=" + input.transparency; + } + + var frame = input.frames[0]; + encoder.startImageEncode(frame.width, frame.height, + frame.format, options); + + do_timeout(50, _encodeImageAsyncFactory(frame, options, encoder)); + return encoder; +} + + +function makeDataURL(encoder, mimetype) { + var rawStream = encoder.QueryInterface(Ci.nsIInputStream); + + var stream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(); + stream.QueryInterface(Ci.nsIBinaryInputStream); + + stream.setInputStream(rawStream); + + var bytes = stream.readByteArray(stream.available()); // returns int[] + + var base64String = toBase64(bytes); + + return "data:" + mimetype + ";base64," + base64String; +} + +function makeDataURLFromAsync(encoder, mimetype, expected) { + do_test_pending(); + var rawStream = encoder.QueryInterface(Ci.nsIAsyncInputStream); + + var currentThread = Cc["@mozilla.org/thread-manager;1"].getService().currentThread; + + var bytes = []; + + var binarystream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(); + binarystream.QueryInterface(Ci.nsIBinaryInputStream); + + var asyncReader = + { + onInputStreamReady: function(stream) + { + binarystream.setInputStream(stream); + var available = 0; + try { + available = stream.available(); + } catch(e) { } + + if (available > 0) + { + bytes = bytes.concat(binarystream.readByteArray(available)); + stream.asyncWait(this, 0, 0, currentThread); + } else { + var base64String = toBase64(bytes); + var dataURL = "data:" + mimetype + ";base64," + base64String; + do_check_eq(dataURL, expected); + do_test_finished(); + } + + } + }; + rawStream.asyncWait(asyncReader, 0, 0, currentThread); +} + +/* toBase64 copied from extensions/xml-rpc/src/nsXmlRpcClient.js */ + +/* Convert data (an array of integers) to a Base64 string. */ +const toBase64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' + + '0123456789+/'; +const base64Pad = '='; +function toBase64(data) { + var result = ''; + var length = data.length; + var i; + // Convert every three bytes to 4 ascii characters. + for (i = 0; i < (length - 2); i += 3) { + result += toBase64Table[data[i] >> 2]; + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)]; + result += toBase64Table[((data[i+1] & 0x0f) << 2) + (data[i+2] >> 6)]; + result += toBase64Table[data[i+2] & 0x3f]; + } + + // Convert the remaining 1 or 2 bytes, pad out to 4 characters. + if (length%3) { + i = length - (length%3); + result += toBase64Table[data[i] >> 2]; + if ((length%3) == 2) { + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)]; + result += toBase64Table[(data[i+1] & 0x0f) << 2]; + result += base64Pad; + } else { + result += toBase64Table[(data[i] & 0x03) << 4]; + result += base64Pad + base64Pad; + } + } + + return result; +} diff --git a/image/test/unit/test_imgtools.js b/image/test/unit/test_imgtools.js new file mode 100644 index 000000000..b9b8da82b --- /dev/null +++ b/image/test/unit/test_imgtools.js @@ -0,0 +1,737 @@ +/* + * Tests for imgITools + */ + +var Ci = Components.interfaces; +var Cc = Components.classes; + + +/* + * dumpToFile() + * + * For test development, dumps the specified array to a file. + * Call |dumpToFile(outData);| in a test to file to a file. + */ +function dumpToFile(aData) { + var outputFile = do_get_tempdir(); + outputFile.append("testdump.png"); + + var outputStream = Cc["@mozilla.org/network/file-output-stream;1"]. + createInstance(Ci.nsIFileOutputStream); + // WR_ONLY|CREAT|TRUNC + outputStream.init(outputFile, 0x02 | 0x08 | 0x20, 0o644, null); + + var bos = Cc["@mozilla.org/binaryoutputstream;1"]. + createInstance(Ci.nsIBinaryOutputStream); + bos.setOutputStream(outputStream); + + bos.writeByteArray(aData, aData.length); + + outputStream.close(); +} + + +/* + * getFileInputStream() + * + * Returns an input stream for the specified file. + */ +function getFileInputStream(aFile) { + var inputStream = Cc["@mozilla.org/network/file-input-stream;1"]. + createInstance(Ci.nsIFileInputStream); + // init the stream as RD_ONLY, -1 == default permissions. + inputStream.init(aFile, 0x01, -1, null); + + // Blah. The image decoders use ReadSegments, which isn't implemented on + // file input streams. Use a buffered stream to make it work. + var bis = Cc["@mozilla.org/network/buffered-input-stream;1"]. + createInstance(Ci.nsIBufferedInputStream); + bis.init(inputStream, 1024); + + return bis; +} + + +/* + * streamToArray() + * + * Consumes an input stream, and returns its bytes as an array. + */ +function streamToArray(aStream) { + var size = aStream.available(); + + // use a binary input stream to grab the bytes. + var bis = Cc["@mozilla.org/binaryinputstream;1"]. + createInstance(Ci.nsIBinaryInputStream); + bis.setInputStream(aStream); + + var bytes = bis.readByteArray(size); + if (size != bytes.length) + throw "Didn't read expected number of bytes"; + + return bytes; +} + + +/* + * compareArrays + * + * Compares two arrays, and throws if there's a difference. + */ +function compareArrays(aArray1, aArray2) { + do_check_eq(aArray1.length, aArray2.length); + + for (var i = 0; i < aArray1.length; i++) + if (aArray1[i] != aArray2[i]) + throw "arrays differ at index " + i; +} + + +/* + * checkExpectedError + * + * Checks to see if a thrown error was expected or not, and if it + * matches the expected value. + */ +function checkExpectedError (aExpectedError, aActualError) { + if (aExpectedError) { + if (!aActualError) + throw "Didn't throw as expected (" + aExpectedError + ")"; + + if (!aExpectedError.test(aActualError)) + throw "Threw (" + aActualError + "), not (" + aExpectedError; + + // We got the expected error, so make a note in the test log. + dump("...that error was expected.\n\n"); + } else if (aActualError) { + throw "Threw unexpected error: " + aActualError; + } +} + + +function run_test() { + +try { + + +/* ========== 0 ========== */ +var testnum = 0; +var testdesc = "imgITools setup"; +var err = null; + +var imgTools = Cc["@mozilla.org/image/tools;1"]. + getService(Ci.imgITools); + +if (!imgTools) + throw "Couldn't get imgITools service" + +// Ugh, this is an ugly hack. The pixel values we get in Windows are sometimes +// +/- 1 value compared to other platforms, so we need to compare against a +// different set of reference images. nsIXULRuntime.OS doesn't seem to be +// available in xpcshell, so we'll use this as a kludgy way to figure out if +// we're running on Windows. +var isWindows = mozinfo.os == "win"; + + +/* ========== 1 ========== */ +testnum++; +testdesc = "test decoding a PNG"; + +// 64x64 png, 8415 bytes. +var imgName = "image1.png"; +var inMimeType = "image/png"; +var imgFile = do_get_file(imgName); + +var istream = getFileInputStream(imgFile); +do_check_eq(istream.available(), 8415); + +// Use decodeImageData for this test even though it's deprecated to ensure that +// it correctly forwards to decodeImage and continues to work. +var outParam = { value: null }; +imgTools.decodeImageData(istream, inMimeType, outParam); +var container = outParam.value; + +// It's not easy to look at the pixel values from JS, so just +// check the container's size. +do_check_eq(container.width, 64); +do_check_eq(container.height, 64); + + +/* ========== 2 ========== */ +testnum++; +testdesc = "test encoding a scaled JPEG"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, "image/jpeg", 16, 16); + +var encodedBytes = streamToArray(istream); +// Get bytes for exected result +var refName = "image1png16x16.jpg"; +var refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1051); +var referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 3 ========== */ +testnum++; +testdesc = "test encoding an unscaled JPEG"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeImage(container, "image/jpeg"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image1png64x64.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 4503); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 4 ========== */ +testnum++; +testdesc = "test decoding a JPEG"; + +// 32x32 jpeg, 3494 bytes. +imgName = "image2.jpg"; +inMimeType = "image/jpeg"; +imgFile = do_get_file(imgName); + +istream = getFileInputStream(imgFile); +do_check_eq(istream.available(), 3494); + +container = imgTools.decodeImage(istream, inMimeType); + +// It's not easy to look at the pixel values from JS, so just +// check the container's size. +do_check_eq(container.width, 32); +do_check_eq(container.height, 32); + + +/* ========== 5 ========== */ +testnum++; +testdesc = "test encoding a scaled PNG"; + +if (!isWindows) { +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, "image/png", 16, 16); + +encodedBytes = streamToArray(istream); +// Get bytes for exected result +refName = isWindows ? "image2jpg16x16-win.png" : "image2jpg16x16.png"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 950); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); +} + + +/* ========== 6 ========== */ +testnum++; +testdesc = "test encoding an unscaled PNG"; + +if (!isWindows) { +// we'll reuse the container from the previous test +istream = imgTools.encodeImage(container, "image/png"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = isWindows ? "image2jpg32x32-win.png" : "image2jpg32x32.png"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 3105); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); +} + + +/* ========== 7 ========== */ +testnum++; +testdesc = "test decoding a ICO"; + +// 16x16 ico, 1406 bytes. +imgName = "image3.ico"; +inMimeType = "image/x-icon"; +imgFile = do_get_file(imgName); + +istream = getFileInputStream(imgFile); +do_check_eq(istream.available(), 1406); + +container = imgTools.decodeImage(istream, inMimeType); + +// It's not easy to look at the pixel values from JS, so just +// check the container's size. +do_check_eq(container.width, 16); +do_check_eq(container.height, 16); + + +/* ========== 8 ========== */ +testnum++; +testdesc = "test encoding a scaled PNG"; // note that we're scaling UP + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, "image/png", 32, 32); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image3ico32x32.png"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 2285); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 9 ========== */ +testnum++; +testdesc = "test encoding an unscaled PNG"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeImage(container, "image/png"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image3ico16x16.png"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 330); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 10 ========== */ +testnum++; +testdesc = "test decoding a GIF"; + +// 32x32 gif, 1809 bytes. +imgName = "image4.gif"; +inMimeType = "image/gif"; +imgFile = do_get_file(imgName); + +istream = getFileInputStream(imgFile); +do_check_eq(istream.available(), 1809); + +container = imgTools.decodeImage(istream, inMimeType); + +// It's not easy to look at the pixel values from JS, so just +// check the container's size. +do_check_eq(container.width, 32); +do_check_eq(container.height, 32); + +/* ========== 11 ========== */ +testnum++; +testdesc = "test encoding an unscaled ICO with format options " + + "(format=bmp;bpp=32)"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeImage(container, + "image/vnd.microsoft.icon", + "format=bmp;bpp=32"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image4gif32x32bmp32bpp.ico"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 4286); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + +/* ========== 12 ========== */ +testnum++; +testdesc = "test encoding a scaled ICO with format options " + + "(format=bmp;bpp=32)"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, + "image/vnd.microsoft.icon", + 16, + 16, + "format=bmp;bpp=32"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image4gif16x16bmp32bpp.ico"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1150); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + +/* ========== 13 ========== */ +testnum++; +testdesc = "test encoding an unscaled ICO with format options " + + "(format=bmp;bpp=24)"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeImage(container, + "image/vnd.microsoft.icon", + "format=bmp;bpp=24"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image4gif32x32bmp24bpp.ico"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 3262); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + +/* ========== 14 ========== */ +testnum++; +testdesc = "test encoding a scaled ICO with format options " + + "(format=bmp;bpp=24)"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, + "image/vnd.microsoft.icon", + 16, + 16, + "format=bmp;bpp=24"); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image4gif16x16bmp24bpp.ico"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 894); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 15 ========== */ +testnum++; +testdesc = "test cropping a JPG"; + +// 32x32 jpeg, 3494 bytes. +imgName = "image2.jpg"; +inMimeType = "image/jpeg"; +imgFile = do_get_file(imgName); + +istream = getFileInputStream(imgFile); +do_check_eq(istream.available(), 3494); + +container = imgTools.decodeImage(istream, inMimeType); + +// It's not easy to look at the pixel values from JS, so just +// check the container's size. +do_check_eq(container.width, 32); +do_check_eq(container.height, 32); + +// encode a cropped image +istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 16, 16); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg16x16cropped.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 879); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 16 ========== */ +testnum++; +testdesc = "test cropping a JPG with an offset"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeCroppedImage(container, "image/jpeg", 16, 16, 16, 16); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg16x16cropped2.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 878); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 17 ========== */ +testnum++; +testdesc = "test cropping a JPG without a given height"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 16, 0); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg16x32cropped3.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1127); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 18 ========== */ +testnum++; +testdesc = "test cropping a JPG without a given width"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 0, 16); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg32x16cropped4.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1135); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 19 ========== */ +testnum++; +testdesc = "test cropping a JPG without a given width and height"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 0, 0); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg32x32.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1634); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 20 ========== */ +testnum++; +testdesc = "test scaling a JPG without a given width"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, "image/jpeg", 0, 16); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg32x16scaled.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1227); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 21 ========== */ +testnum++; +testdesc = "test scaling a JPG without a given height"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, "image/jpeg", 16, 0); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg16x32scaled.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1219); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 22 ========== */ +testnum++; +testdesc = "test scaling a JPG without a given width and height"; + +// we'll reuse the container from the previous test +istream = imgTools.encodeScaledImage(container, "image/jpeg", 0, 0); +encodedBytes = streamToArray(istream); + +// Get bytes for exected result +refName = "image2jpg32x32.jpg"; +refFile = do_get_file(refName); +istream = getFileInputStream(refFile); +do_check_eq(istream.available(), 1634); +referenceBytes = streamToArray(istream); + +// compare the encoder's output to the reference file. +compareArrays(encodedBytes, referenceBytes); + + +/* ========== 22 ========== */ +testnum++; +testdesc = "test invalid arguments for cropping"; + +var numErrors = 0; + +try { + // width/height can't be negative + imgTools.encodeScaledImage(container, "image/jpeg", -1, -1); +} catch (e) { numErrors++; } + +try { + // offsets can't be negative + imgTools.encodeCroppedImage(container, "image/jpeg", -1, -1, 16, 16); +} catch (e) { numErrors++; } + +try { + // width/height can't be negative + imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, -1, -1); +} catch (e) { numErrors++; } + +try { + // out of bounds + imgTools.encodeCroppedImage(container, "image/jpeg", 17, 17, 16, 16); +} catch (e) { numErrors++; } + +try { + // out of bounds + imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 33, 33); +} catch (e) { numErrors++; } + +try { + // out of bounds + imgTools.encodeCroppedImage(container, "image/jpeg", 1, 1, 0, 0); +} catch (e) { numErrors++; } + +do_check_eq(numErrors, 6); + + +/* ========== bug 363986 ========== */ +testnum = 363986; +testdesc = "test PNG and JPEG encoders' Read/ReadSegments methods"; + +var testData = + [{preImage: "image3.ico", + preImageMimeType: "image/x-icon", + refImage: "image3ico16x16.png", + refImageMimeType: "image/png"}, + {preImage: "image1.png", + preImageMimeType: "image/png", + refImage: "image1png64x64.jpg", + refImageMimeType: "image/jpeg"}]; + +for(var i=0; i