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 000000000000..5e018590c375 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 000000000000..63ec56ef7ce3 --- /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 000000000000..588e6b78df68 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 000000000000..a9629ef85530 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-1.html @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/reftest.list b/image/test/reftest/downscaling/reftest.list new file mode 100644 index 000000000000..53f5988b0a21 --- /dev/null +++ b/image/test/reftest/downscaling/reftest.list @@ -0,0 +1,28 @@ +# 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. +# +# 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. + +# RUN TESTS WITH HIGH QUALITY DOWNSCALING DISABLED: +# ================================================= +default-preferences pref(image.high_quality_downscaling.enabled,false) + +fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1-ref.html + + +# RUN TESTS WITH HIGH QUALITY DOWNSCALING ENABLED: +# ================================================ +# High-quality downscaling enabled: +default-preferences pref(image.high_quality_downscaling.enabled,true) + +fuzzy(31,127) == downscale-1.html downscale-1-ref.html diff --git a/image/test/reftest/reftest.list b/image/test/reftest/reftest.list index c5616cc40c3c..4eb2fc34ef6f 100644 --- a/image/test/reftest/reftest.list +++ b/image/test/reftest/reftest.list @@ -43,5 +43,8 @@ include generic/reftest.list # Color management test include color-management/reftest.list +# Downscaling tests +include downscaling/reftest.list + # Lossless encoders skip-if(Android||B2G) include encoders-lossless/reftest.list # bug 783621