Commit 66727d800 for imagemagick.org

commit 66727d8006966bd9640f8b2e0d9e0ca257027f7e
Author: Madan mohan Manokar <madanmohan.manokar@amd.com>
Date:   Tue Nov 3 19:56:15 2026 +0530

    MagickCore: do not clip new resize rows against uninitialized memory (#9083)

    With mask_trait set to UpdatePixelTrait, each row sync in ResizeImage
    runs ClipPixelCacheNexus, which blends partially masked pixels against
    the uninitialized contents of the new canvas. The output then varies
    with heap contents, for example under MALLOC_PERTURB_.

    Clear mask_trait while the filters write; the filter loop already uses
    the mask to choose between filtering and copying each pixel.

    Add tests/resize-filter-pixels, which compares every Lanczos sample of
    RGB, RGBA, grayscale, CMYK, channel-masked and write-masked resizes
    with a stored Q16 non-HDRI reference. The write-mask case fails
    without this change.

    Co-authored-by: Cristy <12486802+urban-warrior@users.noreply.github.com>

diff --git a/MagickCore/resize.c b/MagickCore/resize.c
index 18c949408..7f64da7d2 100644
--- a/MagickCore/resize.c
+++ b/MagickCore/resize.c
@@ -3864,10 +3864,11 @@ MagickExport Image *ResizeImage(const Image *image,const size_t columns,
       return(DestroyImage(resize_image));
     }
   /*
-    Resize image.
+    Resize image. A new canvas has no pixels to protect, so do not clip these
+    rows against uninitialized cache memory.
   */
-  filter_image->mask_trait=UpdatePixelTrait;
-  resize_image->mask_trait=UpdatePixelTrait;
+  filter_image->mask_trait=UndefinedPixelTrait;
+  resize_image->mask_trait=UndefinedPixelTrait;
   offset=0;
   if (x_factor > y_factor)
     {
diff --git a/Makefile.in b/Makefile.in
index 859878917..60944f445 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -333,7 +333,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codersdir)" \
 	"$(DESTDIR)$(MagickWandincdir)" "$(DESTDIR)$(includedir)" \
 	"$(DESTDIR)$(magickppincdir)" "$(DESTDIR)$(magickpptopincdir)"
 am__EXEEXT_2 = tests/validate$(EXEEXT) tests/drawtest$(EXEEXT) \
-	tests/wandtest$(EXEEXT)
+	tests/wandtest$(EXEEXT) tests/resize-filter-pixels$(EXEEXT)
 am__EXEEXT_3 = Magick++/demo/analyze$(EXEEXT) \
 	Magick++/demo/button$(EXEEXT) Magick++/demo/demo$(EXEEXT) \
 	Magick++/demo/detrans$(EXEEXT) Magick++/demo/flip$(EXEEXT) \
@@ -2165,6 +2165,16 @@ tests_drawtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(AM_CFLAGS) $(CFLAGS) $(tests_drawtest_LDFLAGS) $(LDFLAGS) -o \
 	$@
+am_tests_resize_filter_pixels_OBJECTS =  \
+	tests/resize_filter_pixels-resize-filter-pixels.$(OBJEXT)
+tests_resize_filter_pixels_OBJECTS =  \
+	$(am_tests_resize_filter_pixels_OBJECTS)
+tests_resize_filter_pixels_DEPENDENCIES = $(MAGICKCORE_LIBS) \
+	$(am__DEPENDENCIES_1)
+tests_resize_filter_pixels_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(tests_resize_filter_pixels_LDFLAGS) \
+	$(LDFLAGS) -o $@
 am_tests_validate_OBJECTS = tests/validate-validate.$(OBJEXT)
 tests_validate_OBJECTS = $(am_tests_validate_OBJECTS)
 tests_validate_DEPENDENCIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) \
@@ -2657,6 +2667,7 @@ am__depfiles_remade = ./$(DEPDIR)/dummy.Po \
 	filters/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-analyze.Plo \
 	filters/$(DEPDIR)/analyze_la-analyze.Plo \
 	tests/$(DEPDIR)/drawtest-drawtest.Po \
+	tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Po \
 	tests/$(DEPDIR)/validate-validate.Po \
 	tests/$(DEPDIR)/wandtest-wandtest.Po \
 	utilities/$(DEPDIR)/magick.Po
@@ -2793,8 +2804,10 @@ SOURCES = $(Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_
 	$(Magick___tests_morphImages_SOURCES) \
 	$(Magick___tests_readWriteBlob_SOURCES) \
 	$(Magick___tests_readWriteImages_SOURCES) \
-	$(tests_drawtest_SOURCES) $(tests_validate_SOURCES) \
-	$(tests_wandtest_SOURCES) $(utilities_magick_SOURCES) \
+	$(tests_drawtest_SOURCES) \
+	$(tests_resize_filter_pixels_SOURCES) \
+	$(tests_validate_SOURCES) $(tests_wandtest_SOURCES) \
+	$(utilities_magick_SOURCES) \
 	$(nodist_EXTRA_utilities_magick_SOURCES)
 DIST_SOURCES = $(Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES) \
 	$(am__MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES_DIST) \
@@ -2891,8 +2904,10 @@ DIST_SOURCES = $(Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUF
 	$(Magick___tests_morphImages_SOURCES) \
 	$(Magick___tests_readWriteBlob_SOURCES) \
 	$(Magick___tests_readWriteImages_SOURCES) \
-	$(tests_drawtest_SOURCES) $(tests_validate_SOURCES) \
-	$(tests_wandtest_SOURCES) $(am__utilities_magick_SOURCES_DIST)
+	$(tests_drawtest_SOURCES) \
+	$(tests_resize_filter_pixels_SOURCES) \
+	$(tests_validate_SOURCES) $(tests_wandtest_SOURCES) \
+	$(am__utilities_magick_SOURCES_DIST)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -6255,7 +6270,8 @@ TESTS_CPPFLAGS = $(AM_CPPFLAGS)
 TESTS_CHECK_PGRMS = \
   tests/validate \
   tests/drawtest \
-  tests/wandtest
+  tests/wandtest \
+  tests/resize-filter-pixels

 tests_validate_SOURCES = tests/validate.c tests/validate.h
 tests_validate_CPPFLAGS = $(TESTS_CPPFLAGS)
@@ -6269,6 +6285,10 @@ tests_wandtest_SOURCES = tests/wandtest.c
 tests_wandtest_CPPFLAGS = $(TESTS_CPPFLAGS)
 tests_wandtest_LDFLAGS = $(LDFLAGS)
 tests_wandtest_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
+tests_resize_filter_pixels_SOURCES = tests/resize-filter-pixels.c
+tests_resize_filter_pixels_CPPFLAGS = $(TESTS_CPPFLAGS)
+tests_resize_filter_pixels_LDFLAGS = $(LDFLAGS)
+tests_resize_filter_pixels_LDADD = $(MAGICKCORE_LIBS) $(MATH_LIBS)
 TESTS_XFAIL_TESTS =
 TESTS_TESTS = \
   tests/cli-colorspace.tap \
@@ -6295,6 +6315,7 @@ TESTS_TESTS = \
   tests/validate-montage.tap \
   tests/validate-stream.tap \
   tests/drawtest.tap \
+  tests/resize-filter-pixels.tap \
   tests/wandtest.tap

 TESTS_EXTRA_DIST = \
@@ -6308,10 +6329,12 @@ TESTS_EXTRA_DIST = \
   tests/input_gray.miff \
   tests/input_truecolor.miff \
   tests/sequence.miff \
+  tests/resize-filter-pixels.q16.txt \
   $(TESTS_TESTS)

 TESTS_CLEANFILES = \
-  tests/*_out.*
+  tests/*_out.* \
+  tests/resize-filter-pixels.out

 @WITH_PERL_TRUE@PERLMAGICK = PerlMagick
 @WITH_PERL_TRUE@PERLMAKEMAKER = $(PERLMAGICK)/Makefile.PL
@@ -8337,6 +8360,12 @@ tests/drawtest-drawtest.$(OBJEXT): tests/$(am__dirstamp) \
 tests/drawtest$(EXEEXT): $(tests_drawtest_OBJECTS) $(tests_drawtest_DEPENDENCIES) $(EXTRA_tests_drawtest_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/drawtest$(EXEEXT)
 	$(AM_V_CCLD)$(tests_drawtest_LINK) $(tests_drawtest_OBJECTS) $(tests_drawtest_LDADD) $(LIBS)
+tests/resize_filter_pixels-resize-filter-pixels.$(OBJEXT):  \
+	tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
+
+tests/resize-filter-pixels$(EXEEXT): $(tests_resize_filter_pixels_OBJECTS) $(tests_resize_filter_pixels_DEPENDENCIES) $(EXTRA_tests_resize_filter_pixels_DEPENDENCIES) tests/$(am__dirstamp)
+	@rm -f tests/resize-filter-pixels$(EXEEXT)
+	$(AM_V_CCLD)$(tests_resize_filter_pixels_LINK) $(tests_resize_filter_pixels_OBJECTS) $(tests_resize_filter_pixels_LDADD) $(LIBS)
 tests/validate-validate.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)

@@ -8871,6 +8900,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@filters/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-analyze.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@filters/$(DEPDIR)/analyze_la-analyze.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/drawtest-drawtest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/validate-validate.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/wandtest-wandtest.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@utilities/$(DEPDIR)/magick.Po@am__quote@ # am--include-marker
@@ -11796,6 +11826,20 @@ tests/drawtest-drawtest.obj: tests/drawtest.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_drawtest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/drawtest-drawtest.obj `if test -f 'tests/drawtest.c'; then $(CYGPATH_W) 'tests/drawtest.c'; else $(CYGPATH_W) '$(srcdir)/tests/drawtest.c'; fi`

+tests/resize_filter_pixels-resize-filter-pixels.o: tests/resize-filter-pixels.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_resize_filter_pixels_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/resize_filter_pixels-resize-filter-pixels.o -MD -MP -MF tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Tpo -c -o tests/resize_filter_pixels-resize-filter-pixels.o `test -f 'tests/resize-filter-pixels.c' || echo '$(srcdir)/'`tests/resize-filter-pixels.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Tpo tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/resize-filter-pixels.c' object='tests/resize_filter_pixels-resize-filter-pixels.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_resize_filter_pixels_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/resize_filter_pixels-resize-filter-pixels.o `test -f 'tests/resize-filter-pixels.c' || echo '$(srcdir)/'`tests/resize-filter-pixels.c
+
+tests/resize_filter_pixels-resize-filter-pixels.obj: tests/resize-filter-pixels.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_resize_filter_pixels_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/resize_filter_pixels-resize-filter-pixels.obj -MD -MP -MF tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Tpo -c -o tests/resize_filter_pixels-resize-filter-pixels.obj `if test -f 'tests/resize-filter-pixels.c'; then $(CYGPATH_W) 'tests/resize-filter-pixels.c'; else $(CYGPATH_W) '$(srcdir)/tests/resize-filter-pixels.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Tpo tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/resize-filter-pixels.c' object='tests/resize_filter_pixels-resize-filter-pixels.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_resize_filter_pixels_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/resize_filter_pixels-resize-filter-pixels.obj `if test -f 'tests/resize-filter-pixels.c'; then $(CYGPATH_W) 'tests/resize-filter-pixels.c'; else $(CYGPATH_W) '$(srcdir)/tests/resize-filter-pixels.c'; fi`
+
 tests/validate-validate.o: tests/validate.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_validate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/validate-validate.o -MD -MP -MF tests/$(DEPDIR)/validate-validate.Tpo -c -o tests/validate-validate.o `test -f 'tests/validate.c' || echo '$(srcdir)/'`tests/validate.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/validate-validate.Tpo tests/$(DEPDIR)/validate-validate.Po
@@ -13577,6 +13621,7 @@ distclean: distclean-am
 	-rm -f filters/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-analyze.Plo
 	-rm -f filters/$(DEPDIR)/analyze_la-analyze.Plo
 	-rm -f tests/$(DEPDIR)/drawtest-drawtest.Po
+	-rm -f tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Po
 	-rm -f tests/$(DEPDIR)/validate-validate.Po
 	-rm -f tests/$(DEPDIR)/wandtest-wandtest.Po
 	-rm -f utilities/$(DEPDIR)/magick.Po
@@ -14089,6 +14134,7 @@ maintainer-clean: maintainer-clean-am
 	-rm -f filters/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-analyze.Plo
 	-rm -f filters/$(DEPDIR)/analyze_la-analyze.Plo
 	-rm -f tests/$(DEPDIR)/drawtest-drawtest.Po
+	-rm -f tests/$(DEPDIR)/resize_filter_pixels-resize-filter-pixels.Po
 	-rm -f tests/$(DEPDIR)/validate-validate.Po
 	-rm -f tests/$(DEPDIR)/wandtest-wandtest.Po
 	-rm -f utilities/$(DEPDIR)/magick.Po
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 42df0d7bd..2b6d8c42d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,7 +18,8 @@ TESTS_CPPFLAGS = $(AM_CPPFLAGS)
 TESTS_CHECK_PGRMS = \
   tests/validate \
   tests/drawtest \
-  tests/wandtest
+  tests/wandtest \
+  tests/resize-filter-pixels

 tests_validate_SOURCES  = tests/validate.c tests/validate.h
 tests_validate_CPPFLAGS = $(TESTS_CPPFLAGS)
@@ -35,6 +36,11 @@ tests_wandtest_CPPFLAGS = $(TESTS_CPPFLAGS)
 tests_wandtest_LDFLAGS  = $(LDFLAGS)
 tests_wandtest_LDADD    = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)

+tests_resize_filter_pixels_SOURCES = tests/resize-filter-pixels.c
+tests_resize_filter_pixels_CPPFLAGS = $(TESTS_CPPFLAGS)
+tests_resize_filter_pixels_LDFLAGS = $(LDFLAGS)
+tests_resize_filter_pixels_LDADD = $(MAGICKCORE_LIBS) $(MATH_LIBS)
+
 TESTS_XFAIL_TESTS =

 TESTS_TESTS = \
@@ -63,6 +69,7 @@ TESTS_TESTS = \
   tests/validate-montage.tap \
   tests/validate-stream.tap \
   tests/drawtest.tap \
+  tests/resize-filter-pixels.tap \
   tests/wandtest.tap

 TESTS_EXTRA_DIST = \
@@ -76,7 +83,9 @@ TESTS_EXTRA_DIST = \
   tests/input_gray.miff \
   tests/input_truecolor.miff \
   tests/sequence.miff \
+  tests/resize-filter-pixels.q16.txt \
   $(TESTS_TESTS)

 TESTS_CLEANFILES = \
-  tests/*_out.*
+  tests/*_out.* \
+  tests/resize-filter-pixels.out
diff --git a/tests/resize-filter-pixels.c b/tests/resize-filter-pixels.c
new file mode 100644
index 000000000..e6df69e23
--- /dev/null
+++ b/tests/resize-filter-pixels.c
@@ -0,0 +1,527 @@
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%                          Resize Filter Pixel Tests                          %
+%                                                                             %
+%                                                                             %
+%  Copyright 1999 ImageMagick Studio LLC, a non-profit organization           %
+%  dedicated to making software imaging solutions freely available.           %
+%                                                                             %
+%  You may not use this file except in compliance with the License.  You may  %
+%  obtain a copy of the License at                                            %
+%                                                                             %
+%    https://imagemagick.org/license/                                         %
+%                                                                             %
+%  Unless required by applicable law or agreed to in writing, software        %
+%  distributed under the License is distributed on an "AS IS" BASIS,          %
+%  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
+%  See the License for the specific language governing permissions and        %
+%  limitations under the License.                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%
+*/
+
+/*
+  Compare every Lanczos sample with the stored Q16 non-HDRI reference.
+
+  Each filter tap is pixel += weight * sample in double, then ClampToQuantum
+  adds one half and truncates. A compiler may contract that into a fused
+  multiply-add, as GCC and Clang do on arm64, and a fused and a separate
+  multiply plus add can fall on opposite sides of the half-quantum
+  boundary. A filtered sample may therefore differ by one quantum. A copied
+  channel is never filtered and must match exactly: the alpha of the copy
+  case, the write mask of the mask case, and the channels outside the
+  channel mask of the red-only and cyan-only cases.
+
+  tests/validate.c cannot express this contract. It round-trips image
+  formats and compares them with root-mean-square error, accepting a
+  normalized error of 0.003. At Q16 that is an RMSE of about 197 quanta,
+  so both a one-quantum boundary and a missed exact sample stay inside
+  the fuzz. The program clears MAGICK_CONFIGURE_PATH before initialization
+  so host policy and logging files cannot change the oracle. Other quantum
+  depths and HDRI builds exit 77 so the test harness can skip them.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <MagickCore/MagickCore.h>
+
+static Image *AcquireCanvas(const size_t columns,const size_t rows,
+  ExceptionInfo *exception)
+{
+  Image
+    *image;
+
+  ImageInfo
+    *image_info;
+
+  image_info=AcquireImageInfo();
+  image=AcquireImage(image_info,exception);
+  image_info=DestroyImageInfo(image_info);
+  if (image == (Image *) NULL)
+    return((Image *) NULL);
+  if (SetImageExtent(image,columns,rows,exception) == MagickFalse)
+    {
+      image=DestroyImage(image);
+      return((Image *) NULL);
+    }
+  return(image);
+}
+
+static MagickBooleanType FillPattern(Image *image,ExceptionInfo *exception)
+{
+  CacheView
+    *view;
+
+  ssize_t
+    y;
+
+  size_t
+    nch;
+
+  nch=GetPixelChannels(image);
+  view=AcquireAuthenticCacheView(image,exception);
+  for (y=0; y < (ssize_t) image->rows; y++)
+  {
+    Quantum
+      *q;
+
+    ssize_t
+      x;
+
+    q=QueueCacheViewAuthenticPixels(view,0,y,image->columns,1,exception);
+    if (q == (Quantum *) NULL)
+      {
+        view=DestroyCacheView(view);
+        return(MagickFalse);
+      }
+    for (x=0; x < (ssize_t) image->columns; x++)
+    {
+      ssize_t
+        c;
+
+      for (c=0; c < (ssize_t) nch; c++)
+        q[x*(ssize_t) nch+c]=(Quantum) ((x*1103+y*917+c*257) % 65536);
+    }
+    if (SyncCacheViewAuthenticPixels(view,exception) == MagickFalse)
+      {
+        view=DestroyCacheView(view);
+        return(MagickFalse);
+      }
+  }
+  view=DestroyCacheView(view);
+  return(MagickTrue);
+}
+
+static MagickBooleanType DumpResize(FILE *out,const char *name,Image *image,
+  const size_t columns,const size_t rows,ExceptionInfo *exception)
+{
+  CacheView
+    *view;
+
+  Image
+    *resized;
+
+  ssize_t
+    y;
+
+  size_t
+    nch;
+
+  resized=ResizeImage(image,columns,rows,LanczosFilter,exception);
+  if (resized == (Image *) NULL)
+    {
+      (void) fprintf(stderr,"resize failed: %s\n",name);
+      return(MagickFalse);
+    }
+  nch=GetPixelChannels(resized);
+  (void) fprintf(out,"CASE %s %lu %lu %lu\n",name,
+    (unsigned long) resized->columns,(unsigned long) resized->rows,
+    (unsigned long) nch);
+  view=AcquireVirtualCacheView(resized,exception);
+  for (y=0; y < (ssize_t) resized->rows; y++)
+  {
+    const Quantum
+      *p;
+
+    ssize_t
+      x;
+
+    p=GetCacheViewVirtualPixels(view,0,y,resized->columns,1,exception);
+    if (p == (const Quantum *) NULL)
+      {
+        view=DestroyCacheView(view);
+        resized=DestroyImage(resized);
+        return(MagickFalse);
+      }
+    for (x=0; x < (ssize_t) resized->columns; x++)
+    {
+      ssize_t
+        c;
+
+      for (c=0; c < (ssize_t) nch; c++)
+      {
+        if ((x != 0) || (c != 0))
+          (void) fputc(' ',out);
+        (void) fprintf(out,"%u",(unsigned int) p[x*(ssize_t) nch+c]);
+      }
+    }
+    (void) fputc('\n',out);
+  }
+  view=DestroyCacheView(view);
+  resized=DestroyImage(resized);
+  return(MagickTrue);
+}
+
+typedef struct _CopiedChannel
+{
+  const char
+    *name;
+
+  size_t
+    channel;
+} CopiedChannel;
+
+static const CopiedChannel
+  CopiedChannels[] =
+  {
+    { "rgba-copy-alpha", 3 },
+    { "rgb-write-mask", 3 },
+    { "rgb-red-only", 1 },
+    { "rgb-red-only", 2 },
+    { "cmyk-cyan-only", 1 },
+    { "cmyk-cyan-only", 2 },
+    { "cmyk-cyan-only", 3 }
+  };
+
+static int CaseTolerance(const char *name,const size_t channel)
+{
+  size_t
+    i;
+
+  for (i=0; i < (sizeof(CopiedChannels)/sizeof(*CopiedChannels)); i++)
+    if ((strcmp(name,CopiedChannels[i].name) == 0) &&
+        (channel == CopiedChannels[i].channel))
+      return(0);
+  return(1);
+}
+
+static const char *NextToken(char **cursor)
+{
+  char
+    *start;
+
+  while ((**cursor == ' ') || (**cursor == '\t') || (**cursor == '\r') ||
+         (**cursor == '\n'))
+    (*cursor)++;
+  if (**cursor == '\0')
+    return((const char *) NULL);
+  start=*cursor;
+  while ((**cursor != '\0') && (**cursor != ' ') && (**cursor != '\t') &&
+         (**cursor != '\r') && (**cursor != '\n'))
+    (*cursor)++;
+  if (**cursor != '\0')
+    {
+      **cursor='\0';
+      (*cursor)++;
+    }
+  return(start);
+}
+
+static MagickBooleanType ReadDumpLine(FILE *file,char *line,const size_t length)
+{
+  if (fgets(line,(int) length,file) == (char *) NULL)
+    return(MagickFalse);
+  if ((strchr(line,'\n') == (char *) NULL) && (feof(file) == 0))
+    {
+      (void) fprintf(stderr,"dump line exceeds %lu bytes\n",
+        (unsigned long) length);
+      return(MagickFalse);
+    }
+  return(MagickTrue);
+}
+
+static MagickBooleanType CompareDump(FILE *actual,FILE *reference,int *max_diff)
+{
+  char
+    actual_line[16384],
+    name[128],
+    reference_line[16384];
+
+  int
+    tolerance;
+
+  size_t
+    channels,
+    row,
+    sample;
+
+  *max_diff=0;
+  tolerance=0;
+  channels=0;
+  row=0;
+  sample=0;
+  name[0]='\0';
+  while (ReadDumpLine(actual,actual_line,sizeof(actual_line)) != MagickFalse)
+  {
+    char
+      *actual_cursor,
+      *reference_cursor;
+
+    if (ReadDumpLine(reference,reference_line,
+        sizeof(reference_line)) == MagickFalse)
+      {
+        (void) fprintf(stderr,"actual dump is longer than the reference\n");
+        return(MagickFalse);
+      }
+    if (strncmp(actual_line,"CASE ",5) == 0)
+      {
+        unsigned long
+          case_channels,
+          case_columns,
+          case_rows;
+
+        if (strcmp(actual_line,reference_line) != 0)
+          {
+            (void) fprintf(stderr,"case header mismatch:\n%s%s",actual_line,
+              reference_line);
+            return(MagickFalse);
+          }
+        if (sscanf(actual_line,"CASE %127s %lu %lu %lu",name,&case_columns,
+              &case_rows,&case_channels) != 4)
+          {
+            (void) fprintf(stderr,"malformed case header: %s",actual_line);
+            return(MagickFalse);
+          }
+        channels=(size_t) case_channels;
+        row=0;
+        continue;
+      }
+    actual_cursor=actual_line;
+    reference_cursor=reference_line;
+    sample=0;
+    for ( ; ; )
+    {
+      char
+        *end;
+
+      const char
+        *actual_token,
+        *reference_token;
+
+      long
+        actual_value,
+        reference_value;
+
+      int
+        difference;
+
+      size_t
+        channel,
+        column;
+
+      actual_token=NextToken(&actual_cursor);
+      reference_token=NextToken(&reference_cursor);
+      if ((actual_token == (const char *) NULL) &&
+          (reference_token == (const char *) NULL))
+        break;
+      if ((actual_token == (const char *) NULL) ||
+          (reference_token == (const char *) NULL))
+        {
+          (void) fprintf(stderr,"%s row %lu has a different sample count\n",
+            name,(unsigned long) row);
+          return(MagickFalse);
+        }
+      actual_value=strtol(actual_token,&end,10);
+      if (*end != '\0')
+        {
+          (void) fprintf(stderr,"%s row %lu has a non-numeric sample\n",name,
+            (unsigned long) row);
+          return(MagickFalse);
+        }
+      reference_value=strtol(reference_token,&end,10);
+      if (*end != '\0')
+        {
+          (void) fprintf(stderr,
+            "reference %s row %lu has a non-numeric sample\n",name,
+            (unsigned long) row);
+          return(MagickFalse);
+        }
+      column=0;
+      channel=sample;
+      if (channels != 0)
+        {
+          column=sample/channels;
+          channel=sample % channels;
+        }
+      tolerance=CaseTolerance(name,channel);
+      difference=(int) labs(actual_value-reference_value);
+      if (difference > *max_diff)
+        *max_diff=difference;
+      if (difference > tolerance)
+        {
+          (void) fprintf(stderr,"%s pixel %lu,%lu channel %lu differs by %d "
+            "(actual %ld, reference %ld, tolerance %d)\n",
+            name,(unsigned long) column,(unsigned long) row,
+            (unsigned long) channel,difference,actual_value,reference_value,
+            tolerance);
+          return(MagickFalse);
+        }
+      sample++;
+    }
+    row++;
+  }
+  if (ReadDumpLine(reference,reference_line,sizeof(reference_line)) !=
+      MagickFalse)
+    {
+      (void) fprintf(stderr,"reference dump is longer than the actual dump\n");
+      return(MagickFalse);
+    }
+  return(MagickTrue);
+}
+
+int main(int argc,char **argv)
+{
+  ExceptionInfo
+    *exception;
+
+  FILE
+    *out;
+
+  Image
+    *image,
+    *mask;
+
+  MagickBooleanType
+    status;
+
+  if ((argc != 2) && (argc != 3))
+    {
+      (void) fprintf(stderr,"usage: %s dump.txt [reference.txt]\n",argv[0]);
+      return(1);
+    }
+#if MAGICKCORE_QUANTUM_DEPTH != 16 || defined(MAGICKCORE_HDRI_SUPPORT)
+  (void) fprintf(stderr,"skip: Q16 non-HDRI build required\n");
+  return(77);
+#endif
+#if defined(_WIN32)
+  (void) _putenv("MAGICK_CONFIGURE_PATH=");
+#else
+  (void) unsetenv("MAGICK_CONFIGURE_PATH");
+#endif
+  MagickCoreGenesis(argv[0],MagickTrue);
+  (void) SetMagickResourceLimit(ThreadResource,1);
+  exception=AcquireExceptionInfo();
+  out=fopen(argv[1],"w");
+  if (out == (FILE *) NULL)
+    return(1);
+  status=MagickTrue;
+
+  image=AcquireCanvas(64,48,exception);
+  status&=FillPattern(image,exception);
+  status&=DumpResize(out,"rgb-down-64x48",image,16,12,exception);
+  image=DestroyImage(image);
+
+  image=AcquireCanvas(20,15,exception);
+  status&=FillPattern(image,exception);
+  status&=DumpResize(out,"rgb-up-20x15",image,50,38,exception);
+  /*
+    Shrink width more than height so the vertical pass sees 8 columns.
+    The horizontal pass runs first and uses the 4-row kernel.
+  */
+  status&=DumpResize(out,"rgb-remainder-20x15",image,8,4,exception);
+  image=DestroyImage(image);
+
+  image=AcquireCanvas(18,14,exception);
+  status&=SetImageAlphaChannel(image,ActivateAlphaChannel,exception);
+  status&=FillPattern(image,exception);
+  status&=DumpResize(out,"rgba-18x14",image,9,7,exception);
+  (void) SetPixelChannelTraits(image,AlphaPixelChannel,CopyPixelTrait);
+  status&=DumpResize(out,"rgba-copy-alpha",image,9,7,exception);
+  (void) SetPixelChannelTraits(image,AlphaPixelChannel,
+    (PixelTrait) (UpdatePixelTrait | BlendPixelTrait));
+  image->alpha_trait=BlendPixelTrait;
+  status&=DumpResize(out,"rgba-blend-alpha",image,9,7,exception);
+  image=DestroyImage(image);
+
+  image=AcquireCanvas(17,13,exception);
+  status&=SetImageColorspace(image,GRAYColorspace,exception);
+  status&=FillPattern(image,exception);
+  status&=DumpResize(out,"gray-17x13",image,8,6,exception);
+  image=DestroyImage(image);
+
+  /*
+    The 40x30 to 20x15 cases filter the 40 source columns vertically first:
+    two full 16-column tiles and an 8-column remainder.
+  */
+  image=AcquireCanvas(40,30,exception);
+  status&=SetImageColorspace(image,GRAYColorspace,exception);
+  status&=FillPattern(image,exception);
+  status&=DumpResize(out,"gray-40x30",image,20,15,exception);
+  image=DestroyImage(image);
+
+  image=AcquireCanvas(40,30,exception);
+  status&=FillPattern(image,exception);
+  (void) SetImageChannelMask(image,RedChannel);
+  status&=DumpResize(out,"rgb-red-only",image,20,15,exception);
+  image=DestroyImage(image);
+
+  image=AcquireCanvas(40,30,exception);
+  status&=SetImageColorspace(image,CMYKColorspace,exception);
+  status&=FillPattern(image,exception);
+  status&=DumpResize(out,"cmyk-40x30",image,20,15,exception);
+  (void) SetImageChannelMask(image,CyanChannel);
+  status&=DumpResize(out,"cmyk-cyan-only",image,20,15,exception);
+  image=DestroyImage(image);
+
+  image=AcquireCanvas(20,15,exception);
+  status&=FillPattern(image,exception);
+  mask=AcquireCanvas(20,15,exception);
+  status&=SetImageColorspace(mask,GRAYColorspace,exception);
+  status&=FillPattern(mask,exception);
+  status&=SetImageMask(image,WritePixelMask,mask,exception);
+  mask=DestroyImage(mask);
+  status&=DumpResize(out,"rgb-write-mask",image,10,8,exception);
+  image=DestroyImage(image);
+
+  (void) fclose(out);
+  if (exception->severity >= ErrorException)
+    CatchException(exception);
+  exception=DestroyExceptionInfo(exception);
+  MagickCoreTerminus();
+  if (status == MagickFalse)
+    return(1);
+  if (argc == 3)
+    {
+      FILE
+        *actual,
+        *reference;
+
+      int
+        max_diff;
+
+      actual=fopen(argv[1],"r");
+      reference=fopen(argv[2],"r");
+      if ((actual == (FILE *) NULL) || (reference == (FILE *) NULL))
+        {
+          (void) fprintf(stderr,"unable to open dump or reference\n");
+          if (actual != (FILE *) NULL)
+            (void) fclose(actual);
+          if (reference != (FILE *) NULL)
+            (void) fclose(reference);
+          return(1);
+        }
+      status=CompareDump(actual,reference,&max_diff);
+      (void) fclose(actual);
+      (void) fclose(reference);
+      (void) fprintf(stderr,"max_quantum_diff=%d\n",max_diff);
+      if (status == MagickFalse)
+        return(1);
+    }
+  return(0);
+}
diff --git a/tests/resize-filter-pixels.q16.txt b/tests/resize-filter-pixels.q16.txt
new file mode 100644
index 000000000..2d3c8231a
--- /dev/null
+++ b/tests/resize-filter-pixels.q16.txt
@@ -0,0 +1,161 @@
+CASE rgb-down-64x48 16 12 3
+3060 3317 3574 7383 7640 7897 11919 12176 12433 16280 16537 16794 20692 20949 21206 25104 25361 25618 29516 29773 30030 33928 34185 34442 38340 38597 38854 42751 43008 43265 47154 47408 47664 51667 51908 52168 54712 55092 55054 65535 65218 65535 38061 36997 34707 1144 1680 366
+6654 6911 7168 10977 11234 11491 15513 15770 16027 19874 20131 20388 24286 24543 24800 28698 28955 29212 33110 33367 33624 37522 37779 38036 41934 42191 42447 46335 46591 46849 50862 51129 51381 54131 54257 54323 62430 63113 65224 51801 50767 44039 4634 2488 1021 6091 6830 7934
+10425 10682 10939 14748 15005 15262 19284 19541 19798 23645 23902 24159 28057 28314 28571 32469 32726 32983 36881 37138 37395 41293 41550 41807 45699 45956 46211 50197 50462 50720 53735 53842 54071 60816 62060 62413 58921 55997 51482 6434 5080 5122 4609 5703 5950 11788 11892 12077
+14051 14308 14565 18374 18631 18888 22910 23167 23424 27271 27528 27785 31683 31940 32197 36095 36352 36609 40507 40764 41021 44917 45174 45427 49366 49625 49907 53267 53482 53616 59135 59441 59688 61599 60191 60280 14021 14016 9502 2890 3098 3451 11378 11548 11778 14549 14824 15082
+17719 17976 18233 22042 22299 22556 26578 26835 27092 30939 31196 31453 35351 35608 35865 39763 40020 40277 44174 44430 44687 48589 48853 49134 52864 53089 53143 56773 56928 58320 64664 65322 63881 24925 22013 15141 279 178 2325 10684 11109 11172 13921 14156 14409 18340 18599 18857
+21387 21644 21901 25710 25967 26224 30246 30503 30760 34607 34864 35121 39019 39276 39533 43430 43687 43944 47832 48096 48357 52307 52507 52644 55263 55847 56787 65535 65535 64293 32735 28916 25989 0 0 850 10176 10431 10381 13088 13320 13580 17686 17944 18201 21998 22255 22512
+25055 25312 25569 29378 29635 29892 33914 34171 34428 38275 38532 38789 42686 42943 43200 47089 47344 47598 51599 51841 52106 54709 55088 55114 65193 64633 65455 40546 39488 36549 774 1202 0 8673 8764 9620 12581 12821 12965 16805 17066 17325 21344 21601 21858 25666 25923 26180
+28723 28980 29237 33046 33303 33560 37582 37839 38096 41943 42200 42456 46344 46599 46857 50873 51139 51404 54122 54250 54342 62489 63165 64550 51424 50349 47405 3889 1617 649 6310 7152 8422 12177 12329 12390 16079 16339 16619 20477 20734 20991 25011 25268 25525 29334 29591 29848
+32391 32648 32905 36714 36971 37228 41250 41507 41764 45605 45862 46119 50103 50368 50620 53648 53748 53965 60727 61965 62580 58905 55994 53045 6541 5201 5217 4687 5791 6073 11747 11853 11988 15290 15565 15847 19788 20045 20298 24143 24400 24657 28679 28936 29193 33002 33259 33516
+36016 36273 36530 40339 40596 40853 44875 45131 45387 49262 49524 49795 53206 53411 53615 59193 59618 59736 61676 60322 60684 13983 14000 12596 2847 3065 3027 11232 11398 11676 14477 14751 15013 19006 19260 19515 23408 23665 23922 27768 28025 28282 32304 32561 32818 36627 36884 37141
+39787 40044 40301 44110 44367 44624 48647 48905 49171 52880 53120 53307 57270 57531 58166 64015 64561 64822 24514 21597 17827 347 266 1213 10722 11144 11388 13856 14091 14332 18363 18622 18880 22767 23024 23281 27179 27436 27693 31539 31796 32053 36075 36332 36589 40398 40655 40912
+43381 43638 43895 47704 47961 48218 52234 52483 52687 55785 56084 56695 64713 64839 63628 38407 30253 27915 0 0 538 10026 10413 10506 13081 13304 13552 17548 17807 18066 21949 22206 22463 26361 26618 26875 30773 31030 31287 35133 35390 35647 39669 39926 40183 43992 44249 44506
+CASE rgb-up-20x15 50 38 3
+0 35 292 45 208 465 364 566 823 871 1118 1375 1379 1651 1908 1817 2083 2340 2202 2457 2714 2659 2914 3171 3113 3370 3627 3519 3776 4033 4000 4257 4514 4406 4663 4920 4863 5120 5377 5319 5576 5833 5725 5982 6239 6206 6463 6720 6612 6869 7126 7069 7326 7583 7525 7782 8039 7931 8188 8445 8412 8669 8926 8818 9075 9332 9275 9532 9789 9731 9988 10245 10137 10394 10651 10618 10875 11132 11024 11281 11538 11481 11738 11995 11937 12194 12451 12343 12600 12857 12824 13081 13338 13230 13487 13744 13687 13944 14201 14143 14400 14657 14549 14806 15063 15030 15287 15544 15436 15693 15950 15893 16150 16407 16349 16606 16863 16755 17012 17269 17236 17493 17750 17642 17899 18156 18099 18356 18613 18555 18812 19069 18929 19186 19443 19361 19618 19875 19894 20151 20408 20446 20703 20960 20804 21061 21318 20977 21234 21491
+0 176 433 92 349 606 450 707 964 1002 1259 1516 1535 1792 2049 1967 2224 2481 2341 2598 2855 2798 3055 3312 3254 3511 3768 3660 3917 4174 4141 4398 4655 4547 4804 5061 5004 5261 5518 5460 5717 5974 5866 6123 6380 6347 6604 6861 6753 7010 7267 7210 7467 7724 7666 7923 8180 8072 8329 8586 8553 8810 9067 8959 9216 9473 9416 9673 9930 9872 10129 10386 10278 10535 10792 10759 11016 11273 11165 11422 11679 11622 11879 12136 12078 12335 12592 12484 12741 12998 12965 13222 13479 13371 13628 13885 13828 14085 14342 14284 14541 14798 14690 14947 15204 15171 15428 15685 15577 15834 16091 16034 16291 16548 16490 16747 17004 16896 17153 17410 17377 17634 17891 17783 18040 18297 18240 18497 18754 18696 18953 19210 19070 19327 19584 19502 19759 20016 20035 20292 20549 20587 20844 21101 20945 21202 21459 21118 21375 21632
+207 464 721 380 637 894 738 995 1252 1290 1547 1804 1823 2080 2337 2255 2512 2769 2629 2886 3143 3086 3343 3600 3542 3799 4056 3948 4205 4462 4429 4686 4943 4835 5092 5349 5292 5549 5806 5748 6005 6262 6154 6411 6668 6635 6892 7149 7041 7298 7555 7498 7755 8012 7954 8211 8468 8360 8617 8874 8841 9098 9355 9247 9504 9761 9704 9961 10218 10160 10417 10674 10566 10823 11080 11047 11304 11561 11453 11710 11967 11910 12167 12424 12366 12623 12880 12772 13029 13286 13253 13510 13767 13659 13916 14173 14116 14373 14630 14572 14829 15086 14978 15235 15492 15459 15716 15973 15865 16122 16379 16322 16579 16836 16778 17035 17292 17184 17441 17698 17665 17922 18179 18071 18328 18585 18528 18785 19042 18984 19241 19498 19358 19615 19872 19790 20047 20304 20323 20580 20837 20875 21132 21389 21233 21490 21747 21406 21663 21920
+657 914 1171 830 1087 1344 1188 1445 1702 1740 1997 2254 2273 2530 2787 2705 2962 3219 3079 3336 3593 3536 3793 4050 3992 4249 4506 4398 4655 4912 4879 5136 5393 5285 5542 5799 5742 5999 6256 6198 6455 6712 6604 6861 7118 7085 7342 7599 7491 7748 8005 7948 8205 8462 8404 8661 8918 8810 9067 9324 9291 9548 9805 9697 9954 10211 10154 10411 10668 10610 10867 11124 11016 11273 11530 11497 11754 12011 11903 12160 12417 12360 12617 12874 12816 13073 13330 13222 13479 13736 13703 13960 14217 14109 14366 14623 14566 14823 15080 15022 15279 15536 15428 15685 15942 15909 16166 16423 16315 16572 16829 16772 17029 17286 17228 17485 17742 17634 17891 18148 18115 18372 18629 18521 18778 19035 18978 19235 19492 19434 19691 19948 19808 20065 20322 20240 20497 20754 20773 21030 21287 21325 21582 21839 21683 21940 22197 21856 22113 22370
+1098 1355 1612 1271 1528 1785 1629 1886 2143 2181 2438 2695 2714 2971 3228 3146 3403 3660 3520 3777 4034 3977 4234 4491 4433 4690 4947 4839 5096 5353 5320 5577 5834 5726 5983 6240 6183 6440 6697 6639 6896 7153 7045 7302 7559 7526 7783 8040 7932 8189 8446 8389 8646 8903 8845 9102 9359 9251 9508 9765 9732 9989 10246 10138 10395 10652 10595 10852 11109 11051 11308 11565 11457 11714 11971 11938 12195 12452 12344 12601 12858 12801 13058 13315 13257 13514 13771 13663 13920 14177 14144 14401 14658 14550 14807 15064 15007 15264 15521 15463 15720 15977 15869 16126 16383 16350 16607 16864 16756 17013 17270 17213 17470 17727 17669 17926 18183 18075 18332 18589 18556 18813 19070 18962 19219 19476 19419 19676 19933 19875 20132 20389 20249 20506 20763 20681 20938 21195 21214 21471 21728 21766 22023 22280 22124 22381 22638 22297 22554 22811
+1457 1714 1971 1630 1887 2144 1988 2245 2502 2540 2797 3054 3073 3330 3587 3505 3762 4019 3879 4136 4393 4336 4593 4850 4792 5049 5306 5198 5455 5712 5679 5936 6193 6085 6342 6599 6542 6799 7056 6998 7255 7512 7404 7661 7918 7885 8142 8399 8291 8548 8805 8748 9005 9262 9204 9461 9718 9610 9867 10124 10091 10348 10605 10497 10754 11011 10954 11211 11468 11410 11667 11924 11816 12073 12330 12297 12554 12811 12703 12960 13217 13160 13417 13674 13616 13873 14130 14022 14279 14536 14503 14760 15017 14909 15166 15423 15366 15623 15880 15822 16079 16336 16228 16485 16742 16709 16966 17223 17115 17372 17629 17572 17829 18086 18028 18285 18542 18434 18691 18948 18915 19172 19429 19321 19578 19835 19778 20035 20292 20234 20491 20748 20608 20865 21122 21040 21297 21554 21573 21830 22087 22125 22382 22639 22483 22740 22997 22656 22913 23170
+1764 2021 2278 1937 2194 2451 2295 2552 2809 2847 3104 3361 3380 3637 3894 3812 4069 4326 4186 4443 4700 4643 4900 5157 5099 5356 5613 5505 5762 6019 5986 6243 6500 6392 6649 6906 6849 7106 7363 7305 7562 7819 7711 7968 8225 8192 8449 8706 8598 8855 9112 9055 9312 9569 9511 9768 10025 9917 10174 10431 10398 10655 10912 10804 11061 11318 11261 11518 11775 11717 11974 12231 12123 12380 12637 12604 12861 13118 13010 13267 13524 13467 13724 13981 13923 14180 14437 14329 14586 14843 14810 15067 15324 15216 15473 15730 15673 15930 16187 16129 16386 16643 16535 16792 17049 17016 17273 17530 17422 17679 17936 17879 18136 18393 18335 18592 18849 18741 18998 19255 19222 19479 19736 19628 19885 20142 20085 20342 20599 20541 20798 21055 20915 21172 21429 21347 21604 21861 21880 22137 22394 22432 22689 22946 22790 23047 23304 22963 23220 23477
+2131 2388 2645 2304 2561 2818 2662 2919 3176 3214 3471 3728 3747 4004 4261 4179 4436 4693 4553 4810 5067 5010 5267 5524 5466 5723 5980 5872 6129 6386 6353 6610 6867 6759 7016 7273 7216 7473 7730 7672 7929 8186 8078 8335 8592 8559 8816 9073 8965 9222 9479 9422 9679 9936 9878 10135 10392 10284 10541 10798 10765 11022 11279 11171 11428 11685 11628 11885 12142 12084 12341 12598 12490 12747 13004 12971 13228 13485 13377 13634 13891 13834 14091 14348 14290 14547 14804 14696 14953 15210 15177 15434 15691 15583 15840 16097 16040 16297 16554 16496 16753 17010 16902 17159 17416 17383 17640 17897 17789 18046 18303 18246 18503 18760 18702 18959 19216 19108 19365 19622 19589 19846 20103 19995 20252 20509 20452 20709 20966 20908 21165 21422 21282 21539 21796 21714 21971 22228 22247 22504 22761 22799 23056 23313 23157 23414 23671 23330 23587 23844
+2513 2770 3027 2686 2943 3200 3044 3301 3558 3596 3853 4110 4129 4386 4643 4561 4818 5075 4935 5192 5449 5392 5649 5906 5848 6105 6362 6254 6511 6768 6735 6992 7249 7141 7398 7655 7598 7855 8112 8054 8311 8568 8460 8717 8974 8941 9198 9455 9347 9604 9861 9804 10061 10318 10260 10517 10774 10666 10923 11180 11147 11404 11661 11553 11810 12067 12010 12267 12524 12466 12723 12980 12872 13129 13386 13353 13610 13867 13759 14016 14273 14216 14473 14730 14672 14929 15186 15078 15335 15592 15559 15816 16073 15965 16222 16479 16422 16679 16936 16878 17135 17392 17284 17541 17798 17765 18022 18279 18171 18428 18685 18628 18885 19142 19084 19341 19598 19490 19747 20004 19971 20228 20485 20377 20634 20891 20834 21091 21348 21290 21547 21804 21664 21921 22178 22096 22353 22610 22629 22886 23143 23181 23438 23695 23539 23796 24053 23712 23969 24226
+2841 3098 3355 3014 3271 3528 3372 3629 3886 3924 4181 4438 4457 4714 4971 4889 5146 5403 5263 5520 5777 5720 5977 6234 6176 6433 6690 6582 6839 7096 7063 7320 7577 7469 7726 7983 7926 8183 8440 8382 8639 8896 8788 9045 9302 9269 9526 9783 9675 9932 10189 10132 10389 10646 10588 10845 11102 10994 11251 11508 11475 11732 11989 11881 12138 12395 12338 12595 12852 12794 13051 13308 13200 13457 13714 13681 13938 14195 14087 14344 14601 14544 14801 15058 15000 15257 15514 15406 15663 15920 15887 16144 16401 16293 16550 16807 16750 17007 17264 17206 17463 17720 17612 17869 18126 18093 18350 18607 18499 18756 19013 18956 19213 19470 19412 19669 19926 19818 20075 20332 20299 20556 20813 20705 20962 21219 21162 21419 21676 21618 21875 22132 21992 22249 22506 22424 22681 22938 22957 23214 23471 23509 23766 24023 23867 24124 24381 24040 24297 24554
+3235 3492 3749 3408 3665 3922 3766 4023 4280 4318 4575 4832 4851 5108 5365 5283 5540 5797 5657 5914 6171 6114 6371 6628 6570 6827 7084 6976 7233 7490 7457 7714 7971 7863 8120 8377 8320 8577 8834 8776 9033 9290 9182 9439 9696 9663 9920 10177 10069 10326 10583 10526 10783 11040 10982 11239 11496 11388 11645 11902 11869 12126 12383 12275 12532 12789 12732 12989 13246 13188 13445 13702 13594 13851 14108 14075 14332 14589 14481 14738 14995 14938 15195 15452 15394 15651 15908 15800 16057 16314 16281 16538 16795 16687 16944 17201 17144 17401 17658 17600 17857 18114 18006 18263 18520 18487 18744 19001 18893 19150 19407 19350 19607 19864 19806 20063 20320 20212 20469 20726 20693 20950 21207 21099 21356 21613 21556 21813 22070 22012 22269 22526 22386 22643 22900 22818 23075 23332 23351 23608 23865 23903 24160 24417 24261 24518 24775 24434 24691 24948
+3577 3834 4091 3750 4007 4264 4108 4365 4622 4660 4917 5174 5193 5450 5707 5625 5882 6139 5999 6256 6513 6456 6713 6970 6912 7169 7426 7318 7575 7832 7799 8056 8313 8205 8462 8719 8662 8919 9176 9118 9375 9632 9524 9781 10038 10005 10262 10519 10411 10668 10925 10868 11125 11382 11324 11581 11838 11730 11987 12244 12211 12468 12725 12617 12874 13131 13074 13331 13588 13530 13787 14044 13936 14193 14450 14417 14674 14931 14823 15080 15337 15280 15537 15794 15736 15993 16250 16142 16399 16656 16623 16880 17137 17029 17286 17543 17486 17743 18000 17942 18199 18456 18348 18605 18862 18829 19086 19343 19235 19492 19749 19692 19949 20206 20148 20405 20662 20554 20811 21068 21035 21292 21549 21441 21698 21955 21898 22155 22412 22354 22611 22868 22728 22985 23242 23160 23417 23674 23693 23950 24207 24245 24502 24759 24603 24860 25117 24776 25033 25290
+3939 4196 4453 4112 4369 4626 4470 4727 4984 5022 5279 5536 5555 5812 6069 5987 6244 6501 6361 6618 6875 6818 7075 7332 7274 7531 7788 7680 7937 8194 8161 8418 8675 8567 8824 9081 9024 9281 9538 9480 9737 9994 9886 10143 10400 10367 10624 10881 10773 11030 11287 11230 11487 11744 11686 11943 12200 12092 12349 12606 12573 12830 13087 12979 13236 13493 13436 13693 13950 13892 14149 14406 14298 14555 14812 14779 15036 15293 15185 15442 15699 15642 15899 16156 16098 16355 16612 16504 16761 17018 16985 17242 17499 17391 17648 17905 17848 18105 18362 18304 18561 18818 18710 18967 19224 19191 19448 19705 19597 19854 20111 20054 20311 20568 20510 20767 21024 20916 21173 21430 21397 21654 21911 21803 22060 22317 22260 22517 22774 22716 22973 23230 23090 23347 23604 23522 23779 24036 24055 24312 24569 24607 24864 25121 24965 25222 25479 25138 25395 25652
+4324 4581 4838 4497 4754 5011 4855 5112 5369 5407 5664 5921 5940 6197 6454 6372 6629 6886 6746 7003 7260 7203 7460 7717 7659 7916 8173 8065 8322 8579 8546 8803 9060 8952 9209 9466 9409 9666 9923 9865 10122 10379 10271 10528 10785 10752 11009 11266 11158 11415 11672 11615 11872 12129 12071 12328 12585 12477 12734 12991 12958 13215 13472 13364 13621 13878 13821 14078 14335 14277 14534 14791 14683 14940 15197 15164 15421 15678 15570 15827 16084 16027 16284 16541 16483 16740 16997 16889 17146 17403 17370 17627 17884 17776 18033 18290 18233 18490 18747 18689 18946 19203 19095 19352 19609 19576 19833 20090 19982 20239 20496 20439 20696 20953 20895 21152 21409 21301 21558 21815 21782 22039 22296 22188 22445 22702 22645 22902 23159 23101 23358 23615 23475 23732 23989 23907 24164 24421 24440 24697 24954 24992 25249 25506 25350 25607 25864 25523 25780 26037
+4651 4908 5165 4824 5081 5338 5182 5439 5696 5734 5991 6248 6267 6524 6781 6699 6956 7213 7073 7330 7587 7530 7787 8044 7986 8243 8500 8392 8649 8906 8873 9130 9387 9279 9536 9793 9736 9993 10250 10192 10449 10706 10598 10855 11112 11079 11336 11593 11485 11742 11999 11942 12199 12456 12398 12655 12912 12804 13061 13318 13285 13542 13799 13691 13948 14205 14148 14405 14662 14604 14861 15118 15010 15267 15524 15491 15748 16005 15897 16154 16411 16354 16611 16868 16810 17067 17324 17216 17473 17730 17697 17954 18211 18103 18360 18617 18560 18817 19074 19016 19273 19530 19422 19679 19936 19903 20160 20417 20309 20566 20823 20766 21023 21280 21222 21479 21736 21628 21885 22142 22109 22366 22623 22515 22772 23029 22972 23229 23486 23428 23685 23942 23802 24059 24316 24234 24491 24748 24767 25024 25281 25319 25576 25833 25677 25934 26191 25850 26107 26364
+5042 5299 5556 5215 5472 5729 5573 5830 6087 6125 6382 6639 6658 6915 7172 7090 7347 7604 7464 7721 7978 7921 8178 8435 8377 8634 8891 8783 9040 9297 9264 9521 9778 9670 9927 10184 10127 10384 10641 10583 10840 11097 10989 11246 11503 11470 11727 11984 11876 12133 12390 12333 12590 12847 12789 13046 13303 13195 13452 13709 13676 13933 14190 14082 14339 14596 14539 14796 15053 14995 15252 15509 15401 15658 15915 15882 16139 16396 16288 16545 16802 16745 17002 17259 17201 17458 17715 17607 17864 18121 18088 18345 18602 18494 18751 19008 18951 19208 19465 19407 19664 19921 19813 20070 20327 20294 20551 20808 20700 20957 21214 21157 21414 21671 21613 21870 22127 22019 22276 22533 22500 22757 23014 22906 23163 23420 23363 23620 23877 23819 24076 24333 24193 24450 24707 24625 24882 25139 25158 25415 25672 25710 25967 26224 26068 26325 26582 26241 26498 26755
+5391 5648 5905 5564 5821 6078 5922 6179 6436 6474 6731 6988 7007 7264 7521 7439 7696 7953 7813 8070 8327 8270 8527 8784 8726 8983 9240 9132 9389 9646 9613 9870 10127 10019 10276 10533 10476 10733 10990 10932 11189 11446 11338 11595 11852 11819 12076 12333 12225 12482 12739 12682 12939 13196 13138 13395 13652 13544 13801 14058 14025 14282 14539 14431 14688 14945 14888 15145 15402 15344 15601 15858 15750 16007 16264 16231 16488 16745 16637 16894 17151 17094 17351 17608 17550 17807 18064 17956 18213 18470 18437 18694 18951 18843 19100 19357 19300 19557 19814 19756 20013 20270 20162 20419 20676 20643 20900 21157 21049 21306 21563 21506 21763 22020 21962 22219 22476 22368 22625 22882 22849 23106 23363 23255 23512 23769 23712 23969 24226 24168 24425 24682 24542 24799 25056 24974 25231 25488 25507 25764 26021 26059 26316 26573 26417 26674 26931 26590 26847 27104
+5746 6003 6260 5919 6176 6433 6277 6534 6791 6829 7086 7343 7362 7619 7876 7794 8051 8308 8168 8425 8682 8625 8882 9139 9081 9338 9595 9487 9744 10001 9968 10225 10482 10374 10631 10888 10831 11088 11345 11287 11544 11801 11693 11950 12207 12174 12431 12688 12580 12837 13094 13037 13294 13551 13493 13750 14007 13899 14156 14413 14380 14637 14894 14786 15043 15300 15243 15500 15757 15699 15956 16213 16105 16362 16619 16586 16843 17100 16992 17249 17506 17449 17706 17963 17905 18162 18419 18311 18568 18825 18792 19049 19306 19198 19455 19712 19655 19912 20169 20111 20368 20625 20517 20774 21031 20998 21255 21512 21404 21661 21918 21861 22118 22375 22317 22574 22831 22723 22980 23237 23204 23461 23718 23610 23867 24124 24067 24324 24581 24523 24780 25037 24897 25154 25411 25329 25586 25843 25862 26119 26376 26414 26671 26928 26772 27029 27286 26945 27202 27459
+6135 6392 6649 6308 6565 6822 6666 6923 7180 7218 7475 7732 7751 8008 8265 8183 8440 8697 8557 8814 9071 9014 9271 9528 9470 9727 9984 9876 10133 10390 10357 10614 10871 10763 11020 11277 11220 11477 11734 11676 11933 12190 12082 12339 12596 12563 12820 13077 12969 13226 13483 13426 13683 13940 13882 14139 14396 14288 14545 14802 14769 15026 15283 15175 15432 15689 15632 15889 16146 16088 16345 16602 16494 16751 17008 16975 17232 17489 17381 17638 17895 17838 18095 18352 18294 18551 18808 18700 18957 19214 19181 19438 19695 19587 19844 20101 20044 20301 20558 20500 20757 21014 20906 21163 21420 21387 21644 21901 21793 22050 22307 22250 22507 22764 22706 22963 23220 23112 23369 23626 23593 23850 24107 23999 24256 24513 24456 24713 24970 24912 25169 25426 25286 25543 25800 25718 25975 26232 26251 26508 26765 26803 27060 27317 27161 27418 27675 27334 27591 27848
+6461 6718 6975 6634 6891 7148 6992 7249 7506 7544 7801 8058 8077 8334 8591 8509 8766 9023 8883 9140 9397 9340 9597 9854 9796 10053 10310 10202 10459 10716 10683 10940 11197 11089 11346 11603 11546 11803 12060 12002 12259 12516 12408 12665 12922 12889 13146 13403 13295 13552 13809 13752 14009 14266 14208 14465 14722 14614 14871 15128 15095 15352 15609 15501 15758 16015 15958 16215 16472 16414 16671 16928 16820 17077 17334 17301 17558 17815 17707 17964 18221 18164 18421 18678 18620 18877 19134 19026 19283 19540 19507 19764 20021 19913 20170 20427 20370 20627 20884 20826 21083 21340 21232 21489 21746 21713 21970 22227 22119 22376 22633 22576 22833 23090 23032 23289 23546 23438 23695 23952 23919 24176 24433 24325 24582 24839 24782 25039 25296 25238 25495 25752 25612 25869 26126 26044 26301 26558 26577 26834 27091 27129 27386 27643 27487 27744 28001 27660 27917 28174
+6850 7107 7364 7023 7280 7537 7381 7638 7895 7933 8190 8447 8466 8723 8980 8898 9155 9412 9272 9529 9786 9729 9986 10243 10185 10442 10699 10591 10848 11105 11072 11329 11586 11478 11735 11992 11935 12192 12449 12391 12648 12905 12797 13054 13311 13278 13535 13792 13684 13941 14198 14141 14398 14655 14597 14854 15111 15003 15260 15517 15484 15741 15998 15890 16147 16404 16347 16604 16861 16803 17060 17317 17209 17466 17723 17690 17947 18204 18096 18353 18610 18553 18810 19067 19009 19266 19523 19415 19672 19929 19896 20153 20410 20302 20559 20816 20759 21016 21273 21215 21472 21729 21621 21878 22135 22102 22359 22616 22508 22765 23022 22965 23222 23479 23421 23678 23935 23827 24084 24341 24308 24565 24822 24714 24971 25228 25171 25428 25685 25627 25884 26141 26001 26258 26515 26433 26690 26947 26966 27223 27480 27518 27775 28032 27876 28133 28390 28049 28306 28563
+7205 7462 7719 7378 7635 7892 7736 7993 8250 8288 8545 8802 8821 9078 9335 9253 9510 9767 9627 9884 10141 10084 10341 10598 10540 10797 11054 10946 11203 11460 11427 11684 11941 11833 12090 12347 12290 12547 12804 12746 13003 13260 13152 13409 13666 13633 13890 14147 14039 14296 14553 14496 14753 15010 14952 15209 15466 15358 15615 15872 15839 16096 16353 16245 16502 16759 16702 16959 17216 17158 17415 17672 17564 17821 18078 18045 18302 18559 18451 18708 18965 18908 19165 19422 19364 19621 19878 19770 20027 20284 20251 20508 20765 20657 20914 21171 21114 21371 21628 21570 21827 22084 21976 22233 22490 22457 22714 22971 22863 23120 23377 23320 23577 23834 23776 24033 24290 24182 24439 24696 24663 24920 25177 25069 25326 25583 25526 25783 26040 25982 26239 26496 26356 26613 26870 26788 27045 27302 27321 27578 27835 27873 28130 28387 28231 28488 28745 28404 28661 28918
+7554 7811 8068 7727 7984 8241 8085 8342 8599 8637 8894 9151 9170 9427 9684 9602 9859 10116 9976 10233 10490 10433 10690 10947 10889 11146 11403 11295 11552 11809 11776 12033 12290 12182 12439 12696 12639 12896 13153 13095 13352 13609 13501 13758 14015 13982 14239 14496 14388 14645 14902 14845 15102 15359 15301 15558 15815 15707 15964 16221 16188 16445 16702 16594 16851 17108 17051 17308 17565 17507 17764 18021 17913 18170 18427 18394 18651 18908 18800 19057 19314 19257 19514 19771 19713 19970 20227 20119 20376 20633 20600 20857 21114 21006 21263 21520 21463 21720 21977 21919 22176 22433 22325 22582 22839 22806 23063 23320 23212 23469 23726 23669 23926 24183 24125 24382 24639 24531 24788 25045 25012 25269 25526 25418 25675 25932 25875 26132 26389 26331 26588 26845 26705 26962 27219 27137 27394 27651 27670 27927 28184 28222 28479 28736 28580 28837 29094 28753 29010 29267
+7945 8202 8459 8118 8375 8632 8476 8733 8990 9028 9285 9542 9561 9818 10075 9993 10250 10507 10367 10624 10881 10824 11081 11338 11280 11537 11794 11686 11943 12200 12167 12424 12681 12573 12830 13087 13030 13287 13544 13486 13743 14000 13892 14149 14406 14373 14630 14887 14779 15036 15293 15236 15493 15750 15692 15949 16206 16098 16355 16612 16579 16836 17093 16985 17242 17499 17442 17699 17956 17898 18155 18412 18304 18561 18818 18785 19042 19299 19191 19448 19705 19648 19905 20162 20104 20361 20618 20510 20767 21024 20991 21248 21505 21397 21654 21911 21854 22111 22368 22310 22567 22824 22716 22973 23230 23197 23454 23711 23603 23860 24117 24060 24317 24574 24516 24773 25030 24922 25179 25436 25403 25660 25917 25809 26066 26323 26266 26523 26780 26722 26979 27236 27096 27353 27610 27528 27785 28042 28061 28318 28575 28613 28870 29127 28971 29228 29485 29144 29401 29658
+8272 8529 8786 8445 8702 8959 8803 9060 9317 9355 9612 9869 9888 10145 10402 10320 10577 10834 10694 10951 11208 11151 11408 11665 11607 11864 12121 12013 12270 12527 12494 12751 13008 12900 13157 13414 13357 13614 13871 13813 14070 14327 14219 14476 14733 14700 14957 15214 15106 15363 15620 15563 15820 16077 16019 16276 16533 16425 16682 16939 16906 17163 17420 17312 17569 17826 17769 18026 18283 18225 18482 18739 18631 18888 19145 19112 19369 19626 19518 19775 20032 19975 20232 20489 20431 20688 20945 20837 21094 21351 21318 21575 21832 21724 21981 22238 22181 22438 22695 22637 22894 23151 23043 23300 23557 23524 23781 24038 23930 24187 24444 24387 24644 24901 24843 25100 25357 25249 25506 25763 25730 25987 26244 26136 26393 26650 26593 26850 27107 27049 27306 27563 27423 27680 27937 27855 28112 28369 28388 28645 28902 28940 29197 29454 29298 29555 29812 29471 29728 29985
+8657 8914 9171 8830 9087 9344 9188 9445 9702 9740 9997 10254 10273 10530 10787 10705 10962 11219 11079 11336 11593 11536 11793 12050 11992 12249 12506 12398 12655 12912 12879 13136 13393 13285 13542 13799 13742 13999 14256 14198 14455 14712 14604 14861 15118 15085 15342 15599 15491 15748 16005 15948 16205 16462 16404 16661 16918 16810 17067 17324 17291 17548 17805 17697 17954 18211 18154 18411 18668 18610 18867 19124 19016 19273 19530 19497 19754 20011 19903 20160 20417 20360 20617 20874 20816 21073 21330 21222 21479 21736 21703 21960 22217 22109 22366 22623 22566 22823 23080 23022 23279 23536 23428 23685 23942 23909 24166 24423 24315 24572 24829 24772 25029 25286 25228 25485 25742 25634 25891 26148 26115 26372 26629 26521 26778 27035 26978 27235 27492 27434 27691 27948 27808 28065 28322 28240 28497 28754 28773 29030 29287 29325 29582 29839 29683 29940 30197 29856 30113 30370
+9019 9276 9533 9192 9449 9706 9550 9807 10064 10102 10359 10616 10635 10892 11149 11067 11324 11581 11441 11698 11955 11898 12155 12412 12354 12611 12868 12760 13017 13274 13241 13498 13755 13647 13904 14161 14104 14361 14618 14560 14817 15074 14966 15223 15480 15447 15704 15961 15853 16110 16367 16310 16567 16824 16766 17023 17280 17172 17429 17686 17653 17910 18167 18059 18316 18573 18516 18773 19030 18972 19229 19486 19378 19635 19892 19859 20116 20373 20265 20522 20779 20722 20979 21236 21178 21435 21692 21584 21841 22098 22065 22322 22579 22471 22728 22985 22928 23185 23442 23384 23641 23898 23790 24047 24304 24271 24528 24785 24677 24934 25191 25134 25391 25648 25590 25847 26104 25996 26253 26510 26477 26734 26991 26883 27140 27397 27340 27597 27854 27796 28053 28310 28170 28427 28684 28602 28859 29116 29135 29392 29649 29687 29944 30201 30045 30302 30559 30218 30475 30732
+9361 9618 9875 9534 9791 10048 9892 10149 10406 10444 10701 10958 10977 11234 11491 11409 11666 11923 11783 12040 12297 12240 12497 12754 12696 12953 13210 13102 13359 13616 13583 13840 14097 13989 14246 14503 14446 14703 14960 14902 15159 15416 15308 15565 15822 15789 16046 16303 16195 16452 16709 16652 16909 17166 17108 17365 17622 17514 17771 18028 17995 18252 18509 18401 18658 18915 18858 19115 19372 19314 19571 19828 19720 19977 20234 20201 20458 20715 20607 20864 21121 21064 21321 21578 21520 21777 22034 21926 22183 22440 22407 22664 22921 22813 23070 23327 23270 23527 23784 23726 23983 24240 24132 24389 24646 24613 24870 25127 25019 25276 25533 25476 25733 25990 25932 26189 26446 26338 26595 26852 26819 27076 27333 27225 27482 27739 27682 27939 28196 28138 28395 28652 28512 28769 29026 28944 29201 29458 29477 29734 29991 30029 30286 30543 30387 30644 30901 30560 30817 31074
+9755 10012 10269 9928 10185 10442 10286 10543 10800 10838 11095 11352 11371 11628 11885 11803 12060 12317 12177 12434 12691 12634 12891 13148 13090 13347 13604 13496 13753 14010 13977 14234 14491 14383 14640 14897 14840 15097 15354 15296 15553 15810 15702 15959 16216 16183 16440 16697 16589 16846 17103 17046 17303 17560 17502 17759 18016 17908 18165 18422 18389 18646 18903 18795 19052 19309 19252 19509 19766 19708 19965 20222 20114 20371 20628 20595 20852 21109 21001 21258 21515 21458 21715 21972 21914 22171 22428 22320 22577 22834 22801 23058 23315 23207 23464 23721 23664 23921 24178 24120 24377 24634 24526 24783 25040 25007 25264 25521 25413 25670 25927 25870 26127 26384 26326 26583 26840 26732 26989 27246 27213 27470 27727 27619 27876 28133 28076 28333 28590 28532 28789 29046 28906 29163 29420 29338 29595 29852 29871 30128 30385 30423 30680 30937 30781 31038 31295 30954 31211 31468
+10083 10340 10597 10256 10513 10770 10614 10871 11128 11166 11423 11680 11699 11956 12213 12131 12388 12645 12505 12762 13019 12962 13219 13476 13418 13675 13932 13824 14081 14338 14305 14562 14819 14711 14968 15225 15168 15425 15682 15624 15881 16138 16030 16287 16544 16511 16768 17025 16917 17174 17431 17374 17631 17888 17830 18087 18344 18236 18493 18750 18717 18974 19231 19123 19380 19637 19580 19837 20094 20036 20293 20550 20442 20699 20956 20923 21180 21437 21329 21586 21843 21786 22043 22300 22242 22499 22756 22648 22905 23162 23129 23386 23643 23535 23792 24049 23992 24249 24506 24448 24705 24962 24854 25111 25368 25335 25592 25849 25741 25998 26255 26198 26455 26712 26654 26911 27168 27060 27317 27574 27541 27798 28055 27947 28204 28461 28404 28661 28918 28860 29117 29374 29234 29491 29748 29666 29923 30180 30199 30456 30713 30751 31008 31265 31109 31366 31623 31282 31539 31796
+10465 10722 10979 10638 10895 11152 10996 11253 11510 11548 11805 12062 12081 12338 12595 12513 12770 13027 12887 13144 13401 13344 13601 13858 13800 14057 14314 14206 14463 14720 14687 14944 15201 15093 15350 15607 15550 15807 16064 16006 16263 16520 16412 16669 16926 16893 17150 17407 17299 17556 17813 17756 18013 18270 18212 18469 18726 18618 18875 19132 19099 19356 19613 19505 19762 20019 19962 20219 20476 20418 20675 20932 20824 21081 21338 21305 21562 21819 21711 21968 22225 22168 22425 22682 22624 22881 23138 23030 23287 23544 23511 23768 24025 23917 24174 24431 24374 24631 24888 24830 25087 25344 25236 25493 25750 25717 25974 26231 26123 26380 26637 26580 26837 27094 27036 27293 27550 27442 27699 27956 27923 28180 28437 28329 28586 28843 28786 29043 29300 29242 29499 29756 29616 29873 30130 30048 30305 30562 30581 30838 31095 31133 31390 31647 31491 31748 32005 31664 31921 32178
+10832 11089 11346 11005 11262 11519 11363 11620 11877 11915 12172 12429 12448 12705 12962 12880 13137 13394 13254 13511 13768 13711 13968 14225 14167 14424 14681 14573 14830 15087 15054 15311 15568 15460 15717 15974 15917 16174 16431 16373 16630 16887 16779 17036 17293 17260 17517 17774 17666 17923 18180 18123 18380 18637 18579 18836 19093 18985 19242 19499 19466 19723 19980 19872 20129 20386 20329 20586 20843 20785 21042 21299 21191 21448 21705 21672 21929 22186 22078 22335 22592 22535 22792 23049 22991 23248 23505 23397 23654 23911 23878 24135 24392 24284 24541 24798 24741 24998 25255 25197 25454 25711 25603 25860 26117 26084 26341 26598 26490 26747 27004 26947 27204 27461 27403 27660 27917 27809 28066 28323 28290 28547 28804 28696 28953 29210 29153 29410 29667 29609 29866 30123 29983 30240 30497 30415 30672 30929 30948 31205 31462 31500 31757 32014 31858 32115 32372 32031 32288 32545
+11139 11396 11653 11312 11569 11826 11670 11927 12184 12222 12479 12736 12755 13012 13269 13187 13444 13701 13561 13818 14075 14018 14275 14532 14474 14731 14988 14880 15137 15394 15361 15618 15875 15767 16024 16281 16224 16481 16738 16680 16937 17194 17086 17343 17600 17567 17824 18081 17973 18230 18487 18430 18687 18944 18886 19143 19400 19292 19549 19806 19773 20030 20287 20179 20436 20693 20636 20893 21150 21092 21349 21606 21498 21755 22012 21979 22236 22493 22385 22642 22899 22842 23099 23356 23298 23555 23812 23704 23961 24218 24185 24442 24699 24591 24848 25105 25048 25305 25562 25504 25761 26018 25910 26167 26424 26391 26648 26905 26797 27054 27311 27254 27511 27768 27710 27967 28224 28116 28373 28630 28597 28854 29111 29003 29260 29517 29460 29717 29974 29916 30173 30430 30290 30547 30804 30722 30979 31236 31255 31512 31769 31807 32064 32321 32165 32422 32679 32338 32595 32852
+11498 11755 12012 11671 11928 12185 12029 12286 12543 12581 12838 13095 13114 13371 13628 13546 13803 14060 13920 14177 14434 14377 14634 14891 14833 15090 15347 15239 15496 15753 15720 15977 16234 16126 16383 16640 16583 16840 17097 17039 17296 17553 17445 17702 17959 17926 18183 18440 18332 18589 18846 18789 19046 19303 19245 19502 19759 19651 19908 20165 20132 20389 20646 20538 20795 21052 20995 21252 21509 21451 21708 21965 21857 22114 22371 22338 22595 22852 22744 23001 23258 23201 23458 23715 23657 23914 24171 24063 24320 24577 24544 24801 25058 24950 25207 25464 25407 25664 25921 25863 26120 26377 26269 26526 26783 26750 27007 27264 27156 27413 27670 27613 27870 28127 28069 28326 28583 28475 28732 28989 28956 29213 29470 29362 29619 29876 29819 30076 30333 30275 30532 30789 30649 30906 31163 31081 31338 31595 31614 31871 32128 32166 32423 32680 32524 32781 33038 32697 32954 33211
+11939 12196 12453 12112 12369 12626 12470 12727 12984 13022 13279 13536 13555 13812 14069 13987 14244 14501 14361 14618 14875 14818 15075 15332 15274 15531 15788 15680 15937 16194 16161 16418 16675 16567 16824 17081 17024 17281 17538 17480 17737 17994 17886 18143 18400 18367 18624 18881 18773 19030 19287 19230 19487 19744 19686 19943 20200 20092 20349 20606 20573 20830 21087 20979 21236 21493 21436 21693 21950 21892 22149 22406 22298 22555 22812 22779 23036 23293 23185 23442 23699 23642 23899 24156 24098 24355 24612 24504 24761 25018 24985 25242 25499 25391 25648 25905 25848 26105 26362 26304 26561 26818 26710 26967 27224 27191 27448 27705 27597 27854 28111 28054 28311 28568 28510 28767 29024 28916 29173 29430 29397 29654 29911 29803 30060 30317 30260 30517 30774 30716 30973 31230 31090 31347 31604 31522 31779 32036 32055 32312 32569 32607 32864 33121 32965 33222 33479 33138 33395 33652
+12389 12646 12903 12562 12819 13076 12920 13177 13434 13472 13729 13986 14005 14262 14519 14437 14694 14951 14811 15068 15325 15268 15525 15782 15724 15981 16238 16130 16387 16644 16611 16868 17125 17017 17274 17531 17474 17731 17988 17930 18187 18444 18336 18593 18850 18817 19074 19331 19223 19480 19737 19680 19937 20194 20136 20393 20650 20542 20799 21056 21023 21280 21537 21429 21686 21943 21886 22143 22400 22342 22599 22856 22748 23005 23262 23229 23486 23743 23635 23892 24149 24092 24349 24606 24548 24805 25062 24954 25211 25468 25435 25692 25949 25841 26098 26355 26298 26555 26812 26754 27011 27268 27160 27417 27674 27641 27898 28155 28047 28304 28561 28504 28761 29018 28960 29217 29474 29366 29623 29880 29847 30104 30361 30253 30510 30767 30710 30967 31224 31166 31423 31680 31540 31797 32054 31972 32229 32486 32505 32762 33019 33057 33314 33571 33415 33672 33929 33588 33845 34102
+12677 12934 13191 12850 13107 13364 13208 13465 13722 13760 14017 14274 14293 14550 14807 14725 14982 15239 15099 15356 15613 15556 15813 16070 16012 16269 16526 16418 16675 16932 16899 17156 17413 17305 17562 17819 17762 18019 18276 18218 18475 18732 18624 18881 19138 19105 19362 19619 19511 19768 20025 19968 20225 20482 20424 20681 20938 20830 21087 21344 21311 21568 21825 21717 21974 22231 22174 22431 22688 22630 22887 23144 23036 23293 23550 23517 23774 24031 23923 24180 24437 24380 24637 24894 24836 25093 25350 25242 25499 25756 25723 25980 26237 26129 26386 26643 26586 26843 27100 27042 27299 27556 27448 27705 27962 27929 28186 28443 28335 28592 28849 28792 29049 29306 29248 29505 29762 29654 29911 30168 30135 30392 30649 30541 30798 31055 30998 31255 31512 31454 31711 31968 31828 32085 32342 32260 32517 32774 32793 33050 33307 33345 33602 33859 33703 33960 34217 33876 34133 34390
+12818 13075 13332 12991 13248 13505 13349 13606 13863 13901 14158 14415 14434 14691 14948 14866 15123 15380 15240 15497 15754 15697 15954 16211 16153 16410 16667 16559 16816 17073 17040 17297 17554 17446 17703 17960 17903 18160 18417 18359 18616 18873 18765 19022 19279 19246 19503 19760 19652 19909 20166 20109 20366 20623 20565 20822 21079 20971 21228 21485 21452 21709 21966 21858 22115 22372 22315 22572 22829 22771 23028 23285 23177 23434 23691 23658 23915 24172 24064 24321 24578 24521 24778 25035 24977 25234 25491 25383 25640 25897 25864 26121 26378 26270 26527 26784 26727 26984 27241 27183 27440 27697 27589 27846 28103 28070 28327 28584 28476 28733 28990 28933 29190 29447 29389 29646 29903 29795 30052 30309 30276 30533 30790 30682 30939 31196 31139 31396 31653 31595 31852 32109 31969 32226 32483 32401 32658 32915 32934 33191 33448 33486 33743 34000 33844 34101 34358 34017 34274 34531
+CASE rgb-remainder-20x15 8 4 3
+2110 2367 2624 4816 5073 5330 7645 7902 8159 10376 10633 10890 13129 13386 13643 15860 16117 16374 18689 18946 19203 21395 21652 21909
+5440 5697 5954 8146 8403 8660 10975 11232 11489 13706 13963 14220 16459 16716 16973 19190 19447 19704 22019 22276 22533 24725 24982 25239
+9070 9327 9584 11776 12033 12290 14605 14862 15119 17336 17593 17850 20089 20346 20603 22820 23077 23334 25649 25906 26163 28355 28612 28869
+12400 12657 12914 15106 15363 15620 17935 18192 18449 20666 20923 21180 23419 23676 23933 26150 26407 26664 28979 29236 29493 31685 31942 32199
+CASE rgba-18x14 9 7 4
+1157 1414 1671 1793 3213 3470 3727 3959 5444 5701 5958 6221 7645 7902 8159 8405 9849 10106 10363 10611 12053 12310 12567 12817 14226 14483 14740 15000 16497 16754 17011 17262 18669 18926 19183 19428
+2862 3119 3376 3594 4988 5245 5502 5760 7233 7490 7747 8022 9434 9691 9948 10206 11640 11897 12154 12412 13845 14102 14359 14618 16021 16278 16535 16801 18292 18549 18806 19063 20465 20722 20979 21229
+4712 4969 5226 5474 6857 7114 7371 7640 9108 9365 9622 9902 11307 11564 11821 12086 13514 13771 14028 14292 15721 15978 16235 16498 17898 18155 18412 18681 20168 20425 20682 20943 22340 22597 22854 23109
+6539 6796 7053 7290 8685 8942 9199 9456 10935 11192 11449 11718 13131 13388 13645 13902 15337 15594 15851 16108 17543 17800 18057 18314 19719 19976 20233 20497 21988 22245 22502 22759 24160 24417 24674 24925
+8339 8596 8853 9105 10491 10748 11005 11271 12745 13002 13259 13533 14939 15196 15453 15717 17146 17403 17660 17923 19352 19609 19866 20129 21530 21787 22044 22312 23799 24056 24313 24574 25970 26227 26484 26740
+10227 10484 10741 10985 12380 12637 12894 13151 14633 14890 15147 15413 16826 17083 17340 17597 19032 19289 19546 19803 21238 21495 21752 22009 23415 23672 23929 24192 25683 25940 26197 26454 27854 28111 28368 28620
+12034 12291 12548 12786 14187 14444 14701 14952 16441 16698 16955 17214 18632 18889 19146 19398 20837 21094 21351 21604 23042 23299 23556 23810 25221 25478 25735 25993 27488 27745 28002 28255 29657 29914 30171 30421
+CASE rgba-copy-alpha 9 7 4
+1157 1414 1671 1793 3213 3470 3727 3959 5444 5701 5958 6221 7645 7902 8159 8405 9849 10106 10363 10611 12053 12310 12567 12817 14226 14483 14740 15000 16497 16754 17011 17262 18669 18926 19183 19428
+2862 3119 3376 3594 4988 5245 5502 5760 7233 7490 7747 8022 9434 9691 9948 10206 11640 11897 12154 12412 13845 14102 14359 14618 16021 16278 16535 16801 18292 18549 18806 19063 20465 20722 20979 21229
+4712 4969 5226 5474 6857 7114 7371 7640 9108 9365 9622 9902 11307 11564 11821 12086 13514 13771 14028 14292 15721 15978 16235 16498 17898 18155 18412 18681 20168 20425 20682 20943 22340 22597 22854 23109
+6539 6796 7053 7290 8685 8942 9199 9456 10935 11192 11449 11718 13131 13388 13645 13902 15337 15594 15851 16108 17543 17800 18057 18314 19719 19976 20233 20497 21988 22245 22502 22759 24160 24417 24674 24925
+8339 8596 8853 9105 10491 10748 11005 11271 12745 13002 13259 13533 14939 15196 15453 15717 17146 17403 17660 17923 19352 19609 19866 20129 21530 21787 22044 22312 23799 24056 24313 24574 25970 26227 26484 26740
+10227 10484 10741 10985 12380 12637 12894 13151 14633 14890 15147 15413 16826 17083 17340 17597 19032 19289 19546 19803 21238 21495 21752 22009 23415 23672 23929 24192 25683 25940 26197 26454 27854 28111 28368 28620
+12034 12291 12548 12786 14187 14444 14701 14952 16441 16698 16955 17214 18632 18889 19146 19398 20837 21094 21351 21604 23042 23299 23556 23810 25221 25478 25735 25993 27488 27745 28002 28255 29657 29914 30171 30421
+CASE rgba-blend-alpha 9 7 4
+1157 1414 1671 1793 3213 3470 3727 3959 5444 5701 5958 6221 7645 7902 8159 8405 9849 10106 10363 10611 12053 12310 12567 12817 14226 14483 14740 15000 16497 16754 17011 17262 18669 18926 19183 19428
+2862 3119 3376 3594 4988 5245 5502 5760 7233 7490 7747 8022 9434 9691 9948 10206 11640 11897 12154 12412 13845 14102 14359 14618 16021 16278 16535 16801 18292 18549 18806 19063 20465 20722 20979 21229
+4712 4969 5226 5474 6857 7114 7371 7640 9108 9365 9622 9902 11307 11564 11821 12086 13514 13771 14028 14292 15721 15978 16235 16498 17898 18155 18412 18681 20168 20425 20682 20943 22340 22597 22854 23109
+6539 6796 7053 7290 8685 8942 9199 9456 10935 11192 11449 11718 13131 13388 13645 13902 15337 15594 15851 16108 17543 17800 18057 18314 19719 19976 20233 20497 21988 22245 22502 22759 24160 24417 24674 24925
+8339 8596 8853 9105 10491 10748 11005 11271 12745 13002 13259 13533 14939 15196 15453 15717 17146 17403 17660 17923 19352 19609 19866 20129 21530 21787 22044 22312 23799 24056 24313 24574 25970 26227 26484 26740
+10227 10484 10741 10985 12380 12637 12894 13151 14633 14890 15147 15413 16826 17083 17340 17597 19032 19289 19546 19803 21238 21495 21752 22009 23415 23672 23929 24192 25683 25940 26197 26454 27854 28111 28368 28620
+12034 12291 12548 12786 14187 14444 14701 14952 16441 16698 16955 17214 18632 18889 19146 19398 20837 21094 21351 21604 23042 23299 23556 23810 25221 25478 25735 25993 27488 27745 28002 28255 29657 29914 30171 30421
+CASE gray-17x13 8 6 1
+1170 3469 5872 8192 10538 12858 15261 17560
+3119 5418 7821 10141 12487 14807 17210 19509
+5158 7457 9860 12180 14526 16846 19249 21548
+7104 9403 11806 14126 16472 18792 21195 23494
+9143 11442 13845 16165 18511 20831 23234 25533
+11092 13391 15794 18114 20460 22780 25183 27482
+CASE gray-40x30 20 15 1
+1022 3188 5450 7634 9840 12046 14252 16458 18664 20870 23076 25282 27488 29694 31900 34106 36312 38495 40757 42923
+2823 4989 7251 9435 11641 13847 16053 18259 20465 22671 24877 27083 29289 31495 33701 35907 38113 40296 42558 44724
+4703 6869 9131 11315 13521 15727 17933 20139 22345 24551 26757 28963 31169 33375 35581 37787 39993 42176 44438 46604
+6519 8685 10947 13131 15337 17543 19749 21955 24161 26367 28573 30779 32985 35191 37397 39603 41809 43992 46254 48420
+8353 10519 12781 14965 17171 19377 21583 23789 25995 28201 30407 32613 34819 37025 39231 41437 43643 45826 48088 50254
+10187 12353 14615 16799 19005 21211 23417 25623 27829 30035 32241 34447 36653 38859 41065 43271 45477 47660 49922 52088
+12021 14187 16449 18633 20839 23045 25251 27457 29663 31869 34075 36281 38487 40693 42899 45105 47311 49494 51756 53922
+13855 16021 18283 20467 22673 24879 27085 29291 31497 33703 35909 38115 40321 42527 44733 46939 49145 51328 53590 55756
+15689 17855 20117 22301 24507 26713 28919 31125 33331 35537 37743 39949 42155 44361 46567 48773 50979 53162 55424 57590
+17523 19689 21951 24135 26341 28547 30753 32959 35165 37371 39577 41783 43989 46195 48401 50607 52813 54996 57258 59424
+19357 21523 23785 25969 28175 30381 32587 34793 36999 39205 41411 43617 45823 48029 50235 52441 54646 56820 59140 60564
+21191 23357 25619 27803 30009 32215 34421 36627 38833 41039 43245 45451 47657 49863 52069 54275 56466 58741 60395 64276
+23006 25172 27434 29618 31824 34030 36236 38442 40648 42854 45060 47266 49472 51678 53884 56086 58351 59811 65011 48355
+24886 27052 29314 31498 33704 35910 38116 40322 42528 44734 46940 49146 51352 53558 55764 57975 59395 65535 46792 875
+26687 28853 31115 33299 35505 37711 39917 42123 44329 46535 48741 50947 53153 55359 57565 59656 61774 65535 18727 0
+CASE rgb-red-only 20 15 3
+1022 2277 2534 3188 4483 4740 5450 6689 6946 7634 8895 9152 9840 11101 11358 12046 13307 13564 14252 15513 15770 16458 17719 17976 18664 19925 20182 20870 22131 22388 23076 24337 24594 25282 26543 26800 27488 28749 29006 29694 30955 31212 31900 33161 33418 34106 35367 35624 36312 37573 37830 38495 39779 40036 40757 41985 42242 42923 44191 44448
+2823 4111 4368 4989 6317 6574 7251 8523 8780 9435 10729 10986 11641 12935 13192 13847 15141 15398 16053 17347 17604 18259 19553 19810 20465 21759 22016 22671 23965 24222 24877 26171 26428 27083 28377 28634 29289 30583 30840 31495 32789 33046 33701 34995 35252 35907 37201 37458 38113 39407 39664 40296 41613 41870 42558 43819 44076 44724 46025 46282
+4703 5945 6202 6869 8151 8408 9131 10357 10614 11315 12563 12820 13521 14769 15026 15727 16975 17232 17933 19181 19438 20139 21387 21644 22345 23593 23850 24551 25799 26056 26757 28005 28262 28963 30211 30468 31169 32417 32674 33375 34623 34880 35581 36829 37086 37787 39035 39292 39993 41241 41498 42176 43447 43704 44438 45653 45910 46604 47859 48116
+6519 7779 8036 8685 9985 10242 10947 12191 12448 13131 14397 14654 15337 16603 16860 17543 18809 19066 19749 21015 21272 21955 23221 23478 24161 25427 25684 26367 27633 27890 28573 29839 30096 30779 32045 32302 32985 34251 34508 35191 36457 36714 37397 38663 38920 39603 40869 41126 41809 43075 43332 43992 45281 45538 46254 47487 47744 48420 49693 49950
+8353 9613 9870 10519 11819 12076 12781 14025 14282 14965 16231 16488 17171 18437 18694 19377 20643 20900 21583 22849 23106 23789 25055 25312 25995 27261 27518 28201 29467 29724 30407 31673 31930 32613 33879 34136 34819 36085 36342 37025 38291 38548 39231 40497 40754 41437 42703 42960 43643 44909 45166 45826 47115 47372 48088 49321 49578 50254 51527 51784
+10187 11447 11704 12353 13653 13910 14615 15859 16116 16799 18065 18322 19005 20271 20528 21211 22477 22734 23417 24683 24940 25623 26889 27146 27829 29095 29352 30035 31301 31558 32241 33507 33764 34447 35713 35970 36653 37919 38176 38859 40125 40382 41065 42331 42588 43271 44537 44794 45477 46743 47000 47660 48949 49206 49922 51155 51412 52088 53361 53618
+12021 13281 13538 14187 15487 15744 16449 17693 17950 18633 19899 20156 20839 22105 22362 23045 24311 24568 25251 26517 26774 27457 28723 28980 29663 30929 31186 31869 33135 33392 34075 35341 35598 36281 37547 37804 38487 39753 40010 40693 41959 42216 42899 44165 44422 45105 46371 46628 47311 48577 48834 49494 50783 51040 51756 52989 53246 53922 55195 55452
+13855 15115 15372 16021 17321 17578 18283 19527 19784 20467 21733 21990 22673 23939 24196 24879 26145 26402 27085 28351 28608 29291 30557 30814 31497 32763 33020 33703 34969 35226 35909 37175 37432 38115 39381 39638 40321 41587 41844 42527 43793 44050 44733 45999 46256 46939 48205 48462 49145 50411 50668 51328 52617 52874 53590 54823 55080 55756 57029 57286
+15689 16949 17206 17855 19155 19412 20117 21361 21618 22301 23567 23824 24507 25773 26030 26713 27979 28236 28919 30185 30442 31125 32391 32648 33331 34597 34854 35537 36803 37060 37743 39009 39266 39949 41215 41472 42155 43421 43678 44361 45627 45884 46567 47833 48090 48773 50039 50296 50979 52245 52502 53162 54451 54708 55424 56657 56914 57590 58863 59120
+17523 18783 19040 19689 20989 21246 21951 23195 23452 24135 25401 25658 26341 27607 27864 28547 29813 30070 30753 32019 32276 32959 34225 34482 35165 36431 36688 37371 38637 38894 39577 40843 41100 41783 43049 43306 43989 45255 45512 46195 47461 47718 48401 49667 49924 50607 51873 52130 52813 54079 54336 54996 56285 56542 57258 58491 58748 59424 60697 60954
+19357 20617 20874 21523 22823 23080 23785 25029 25286 25969 27235 27492 28175 29441 29698 30381 31647 31904 32587 33853 34110 34793 36059 36316 36999 38265 38522 39205 40471 40728 41411 42677 42934 43617 44883 45140 45823 47089 47346 48029 49295 49552 50235 51501 51758 52441 53707 53964 54646 55913 56170 56820 58119 58376 59140 60325 60582 60564 62531 62788
+21191 22451 22708 23357 24657 24914 25619 26863 27120 27803 29069 29326 30009 31275 31532 32215 33481 33738 34421 35687 35944 36627 37893 38150 38833 40099 40356 41039 42305 42562 43245 44511 44768 45451 46717 46974 47657 48923 49180 49863 51129 51386 52069 53335 53592 54275 55541 55798 56466 57747 58004 58741 59953 60210 60395 62159 62416 64276 64365 64622
+23006 24285 24542 25172 26491 26748 27434 28697 28954 29618 30903 31160 31824 33109 33366 34030 35315 35572 36236 37521 37778 38442 39727 39984 40648 41933 42190 42854 44139 44396 45060 46345 46602 47266 48551 48808 49472 50757 51014 51678 52963 53220 53884 55169 55426 56086 57375 57632 58351 59581 59838 59811 61787 62044 65011 63993 64250 48355 663 920
+24886 26119 26376 27052 28325 28582 29314 30531 30788 31498 32737 32994 33704 34943 35200 35910 37149 37406 38116 39355 39612 40322 41561 41818 42528 43767 44024 44734 45973 46230 46940 48179 48436 49146 50385 50642 51352 52591 52848 53558 54797 55054 55764 57003 57260 57975 59209 59466 59395 61415 61672 65535 63621 63878 46792 291 548 875 2497 2754
+26687 27953 28210 28853 30159 30416 31115 32365 32622 33299 34571 34828 35505 36777 37034 37711 38983 39240 39917 41189 41446 42123 43395 43652 44329 45601 45858 46535 47807 48064 48741 50013 50270 50947 52219 52476 53153 54425 54682 55359 56631 56888 57565 58837 59094 59656 61043 61300 61774 63249 63506 65535 65455 176 18727 2125 2382 0 4331 4588
+CASE cmyk-40x30 20 15 4
+1022 1279 1536 1793 3188 3445 3702 3959 5450 5707 5964 6221 7634 7891 8148 8405 9840 10097 10354 10611 12046 12303 12560 12817 14252 14509 14766 15023 16458 16715 16972 17229 18664 18921 19178 19435 20870 21127 21384 21641 23076 23333 23590 23847 25282 25539 25796 26053 27488 27745 28002 28259 29694 29951 30208 30465 31900 32157 32414 32671 34106 34363 34620 34877 36312 36569 36826 37083 38495 38752 39009 39266 40757 41014 41271 41528 42923 43180 43437 43694
+2823 3080 3337 3594 4989 5246 5503 5760 7251 7508 7765 8022 9435 9692 9949 10206 11641 11898 12155 12412 13847 14104 14361 14618 16053 16310 16567 16824 18259 18516 18773 19030 20465 20722 20979 21236 22671 22928 23185 23442 24877 25134 25391 25648 27083 27340 27597 27854 29289 29546 29803 30060 31495 31752 32009 32266 33701 33958 34215 34472 35907 36164 36421 36678 38113 38370 38627 38884 40296 40553 40810 41067 42558 42815 43072 43329 44724 44981 45238 45495
+4703 4960 5217 5474 6869 7126 7383 7640 9131 9388 9645 9902 11315 11572 11829 12086 13521 13778 14035 14292 15727 15984 16241 16498 17933 18190 18447 18704 20139 20396 20653 20910 22345 22602 22859 23116 24551 24808 25065 25322 26757 27014 27271 27528 28963 29220 29477 29734 31169 31426 31683 31940 33375 33632 33889 34146 35581 35838 36095 36352 37787 38044 38301 38558 39993 40250 40507 40764 42176 42433 42690 42947 44438 44695 44952 45209 46604 46861 47118 47375
+6519 6776 7033 7290 8685 8942 9199 9456 10947 11204 11461 11718 13131 13388 13645 13902 15337 15594 15851 16108 17543 17800 18057 18314 19749 20006 20263 20520 21955 22212 22469 22726 24161 24418 24675 24932 26367 26624 26881 27138 28573 28830 29087 29344 30779 31036 31293 31550 32985 33242 33499 33756 35191 35448 35705 35962 37397 37654 37911 38168 39603 39860 40117 40374 41809 42066 42323 42580 43992 44249 44506 44763 46254 46511 46768 47025 48420 48677 48934 49191
+8353 8610 8867 9124 10519 10776 11033 11290 12781 13038 13295 13552 14965 15222 15479 15736 17171 17428 17685 17942 19377 19634 19891 20148 21583 21840 22097 22354 23789 24046 24303 24560 25995 26252 26509 26766 28201 28458 28715 28972 30407 30664 30921 31178 32613 32870 33127 33384 34819 35076 35333 35590 37025 37282 37539 37796 39231 39488 39745 40002 41437 41694 41951 42208 43643 43900 44157 44414 45826 46083 46340 46597 48088 48345 48602 48859 50254 50511 50768 51025
+10187 10444 10701 10958 12353 12610 12867 13124 14615 14872 15129 15386 16799 17056 17313 17570 19005 19262 19519 19776 21211 21468 21725 21982 23417 23674 23931 24188 25623 25880 26137 26394 27829 28086 28343 28600 30035 30292 30549 30806 32241 32498 32755 33012 34447 34704 34961 35218 36653 36910 37167 37424 38859 39116 39373 39630 41065 41322 41579 41836 43271 43528 43785 44042 45477 45734 45991 46248 47660 47917 48174 48431 49922 50179 50436 50693 52088 52345 52602 52859
+12021 12278 12535 12792 14187 14444 14701 14958 16449 16706 16963 17220 18633 18890 19147 19404 20839 21096 21353 21610 23045 23302 23559 23816 25251 25508 25765 26022 27457 27714 27971 28228 29663 29920 30177 30434 31869 32126 32383 32640 34075 34332 34589 34846 36281 36538 36795 37052 38487 38744 39001 39258 40693 40950 41207 41464 42899 43156 43413 43670 45105 45362 45619 45876 47311 47568 47825 48082 49494 49751 50008 50265 51756 52013 52270 52527 53922 54179 54436 54693
+13855 14112 14369 14626 16021 16278 16535 16792 18283 18540 18797 19054 20467 20724 20981 21238 22673 22930 23187 23444 24879 25136 25393 25650 27085 27342 27599 27856 29291 29548 29805 30062 31497 31754 32011 32268 33703 33960 34217 34474 35909 36166 36423 36680 38115 38372 38629 38886 40321 40578 40835 41092 42527 42784 43041 43298 44733 44990 45247 45504 46939 47196 47453 47710 49145 49402 49659 49916 51328 51585 51842 52099 53590 53847 54104 54361 55756 56013 56270 56527
+15689 15946 16203 16460 17855 18112 18369 18626 20117 20374 20631 20888 22301 22558 22815 23072 24507 24764 25021 25278 26713 26970 27227 27484 28919 29176 29433 29690 31125 31382 31639 31896 33331 33588 33845 34102 35537 35794 36051 36308 37743 38000 38257 38514 39949 40206 40463 40720 42155 42412 42669 42926 44361 44618 44875 45132 46567 46824 47081 47338 48773 49030 49287 49544 50979 51236 51493 51750 53162 53419 53676 53933 55424 55681 55938 56195 57590 57847 58104 58361
+17523 17780 18037 18294 19689 19946 20203 20460 21951 22208 22465 22722 24135 24392 24649 24906 26341 26598 26855 27112 28547 28804 29061 29318 30753 31010 31267 31524 32959 33216 33473 33730 35165 35422 35679 35936 37371 37628 37885 38142 39577 39834 40091 40348 41783 42040 42297 42554 43989 44246 44503 44760 46195 46452 46709 46966 48401 48658 48915 49172 50607 50864 51121 51378 52813 53070 53327 53584 54996 55253 55506 55763 57258 57515 57788 58045 59424 59681 59824 60081
+19357 19614 19871 20128 21523 21780 22037 22294 23785 24042 24299 24556 25969 26226 26483 26740 28175 28432 28689 28946 30381 30638 30895 31152 32587 32844 33101 33358 34793 35050 35307 35564 36999 37256 37513 37770 39205 39462 39719 39976 41411 41668 41925 42182 43617 43874 44131 44388 45823 46080 46337 46594 48029 48286 48543 48800 50235 50492 50749 51006 52441 52698 52955 53212 54646 54903 55160 55413 56820 57077 57367 57658 59140 59397 59508 59634 60564 60821 62129 61920
+21191 21448 21705 21962 23357 23614 23871 24128 25619 25876 26133 26390 27803 28060 28317 28574 30009 30266 30523 30780 32215 32472 32729 32986 34421 34678 34935 35192 36627 36884 37141 37398 38833 39090 39347 39604 41039 41296 41553 41810 43245 43502 43759 44016 45451 45708 45965 46222 47657 47914 48171 48428 49863 50120 50377 50634 52069 52326 52583 52840 54275 54531 54788 55045 56466 56731 56988 57249 58741 58961 59140 59356 60395 60563 61157 61577 64276 64429 62261 63092
+23006 23263 23520 23777 25172 25429 25686 25943 27434 27691 27948 28205 29618 29875 30132 30389 31824 32081 32338 32595 34030 34287 34544 34801 36236 36493 36750 37007 38442 38699 38956 39213 40648 40905 41162 41419 42854 43111 43368 43625 45060 45317 45574 45831 47266 47523 47780 48037 49472 49729 49986 50243 51678 51935 52192 52449 53884 54141 54398 54655 56086 56351 56593 56850 58351 58528 58848 58992 59811 60389 59776 61052 65011 65535 65535 64302 48355 48417 34824 21194
+24886 25143 25400 25657 27052 27309 27566 27823 29314 29571 29828 30085 31498 31755 32012 32269 33704 33961 34218 34475 35910 36167 36424 36681 38116 38373 38630 38887 40322 40579 40836 41093 42528 42785 43042 43299 44734 44991 45248 45505 46940 47197 47454 47711 49146 49403 49660 49917 51352 51609 51866 52123 53558 53815 54072 54329 55764 56021 56278 56535 57975 58210 58499 58752 59395 59854 59972 60228 65535 65333 65535 65535 46792 44452 44917 44480 875 1429 2122 59
+26687 26944 27201 27458 28853 29110 29367 29624 31115 31372 31629 31886 33299 33556 33813 34070 35505 35762 36019 36276 37711 37968 38225 38482 39917 40174 40431 40688 42123 42380 42637 42894 44329 44586 44843 45100 46535 46792 47049 47306 48741 48998 49255 49512 50947 51204 51461 51718 53153 53410 53667 53924 55359 55616 55873 56130 57565 57822 58079 58336 59656 59799 59591 59848 61774 63078 65391 65535 65535 61805 48213 48407 18727 5280 1367 1825 0 1867 2706 4037
+CASE cmyk-cyan-only 20 15 4
+1022 2277 2534 2791 3188 4483 4740 4997 5450 6689 6946 7203 7634 8895 9152 9409 9840 11101 11358 11615 12046 13307 13564 13821 14252 15513 15770 16027 16458 17719 17976 18233 18664 19925 20182 20439 20870 22131 22388 22645 23076 24337 24594 24851 25282 26543 26800 27057 27488 28749 29006 29263 29694 30955 31212 31469 31900 33161 33418 33675 34106 35367 35624 35881 36312 37573 37830 38087 38495 39779 40036 40293 40757 41985 42242 42499 42923 44191 44448 44705
+2823 4111 4368 4625 4989 6317 6574 6831 7251 8523 8780 9037 9435 10729 10986 11243 11641 12935 13192 13449 13847 15141 15398 15655 16053 17347 17604 17861 18259 19553 19810 20067 20465 21759 22016 22273 22671 23965 24222 24479 24877 26171 26428 26685 27083 28377 28634 28891 29289 30583 30840 31097 31495 32789 33046 33303 33701 34995 35252 35509 35907 37201 37458 37715 38113 39407 39664 39921 40296 41613 41870 42127 42558 43819 44076 44333 44724 46025 46282 46539
+4703 5945 6202 6459 6869 8151 8408 8665 9131 10357 10614 10871 11315 12563 12820 13077 13521 14769 15026 15283 15727 16975 17232 17489 17933 19181 19438 19695 20139 21387 21644 21901 22345 23593 23850 24107 24551 25799 26056 26313 26757 28005 28262 28519 28963 30211 30468 30725 31169 32417 32674 32931 33375 34623 34880 35137 35581 36829 37086 37343 37787 39035 39292 39549 39993 41241 41498 41755 42176 43447 43704 43961 44438 45653 45910 46167 46604 47859 48116 48373
+6519 7779 8036 8293 8685 9985 10242 10499 10947 12191 12448 12705 13131 14397 14654 14911 15337 16603 16860 17117 17543 18809 19066 19323 19749 21015 21272 21529 21955 23221 23478 23735 24161 25427 25684 25941 26367 27633 27890 28147 28573 29839 30096 30353 30779 32045 32302 32559 32985 34251 34508 34765 35191 36457 36714 36971 37397 38663 38920 39177 39603 40869 41126 41383 41809 43075 43332 43589 43992 45281 45538 45795 46254 47487 47744 48001 48420 49693 49950 50207
+8353 9613 9870 10127 10519 11819 12076 12333 12781 14025 14282 14539 14965 16231 16488 16745 17171 18437 18694 18951 19377 20643 20900 21157 21583 22849 23106 23363 23789 25055 25312 25569 25995 27261 27518 27775 28201 29467 29724 29981 30407 31673 31930 32187 32613 33879 34136 34393 34819 36085 36342 36599 37025 38291 38548 38805 39231 40497 40754 41011 41437 42703 42960 43217 43643 44909 45166 45423 45826 47115 47372 47629 48088 49321 49578 49835 50254 51527 51784 52041
+10187 11447 11704 11961 12353 13653 13910 14167 14615 15859 16116 16373 16799 18065 18322 18579 19005 20271 20528 20785 21211 22477 22734 22991 23417 24683 24940 25197 25623 26889 27146 27403 27829 29095 29352 29609 30035 31301 31558 31815 32241 33507 33764 34021 34447 35713 35970 36227 36653 37919 38176 38433 38859 40125 40382 40639 41065 42331 42588 42845 43271 44537 44794 45051 45477 46743 47000 47257 47660 48949 49206 49463 49922 51155 51412 51669 52088 53361 53618 53875
+12021 13281 13538 13795 14187 15487 15744 16001 16449 17693 17950 18207 18633 19899 20156 20413 20839 22105 22362 22619 23045 24311 24568 24825 25251 26517 26774 27031 27457 28723 28980 29237 29663 30929 31186 31443 31869 33135 33392 33649 34075 35341 35598 35855 36281 37547 37804 38061 38487 39753 40010 40267 40693 41959 42216 42473 42899 44165 44422 44679 45105 46371 46628 46885 47311 48577 48834 49091 49494 50783 51040 51297 51756 52989 53246 53503 53922 55195 55452 55709
+13855 15115 15372 15629 16021 17321 17578 17835 18283 19527 19784 20041 20467 21733 21990 22247 22673 23939 24196 24453 24879 26145 26402 26659 27085 28351 28608 28865 29291 30557 30814 31071 31497 32763 33020 33277 33703 34969 35226 35483 35909 37175 37432 37689 38115 39381 39638 39895 40321 41587 41844 42101 42527 43793 44050 44307 44733 45999 46256 46513 46939 48205 48462 48719 49145 50411 50668 50925 51328 52617 52874 53131 53590 54823 55080 55337 55756 57029 57286 57543
+15689 16949 17206 17463 17855 19155 19412 19669 20117 21361 21618 21875 22301 23567 23824 24081 24507 25773 26030 26287 26713 27979 28236 28493 28919 30185 30442 30699 31125 32391 32648 32905 33331 34597 34854 35111 35537 36803 37060 37317 37743 39009 39266 39523 39949 41215 41472 41729 42155 43421 43678 43935 44361 45627 45884 46141 46567 47833 48090 48347 48773 50039 50296 50553 50979 52245 52502 52759 53162 54451 54708 54965 55424 56657 56914 57171 57590 58863 59120 59377
+17523 18783 19040 19297 19689 20989 21246 21503 21951 23195 23452 23709 24135 25401 25658 25915 26341 27607 27864 28121 28547 29813 30070 30327 30753 32019 32276 32533 32959 34225 34482 34739 35165 36431 36688 36945 37371 38637 38894 39151 39577 40843 41100 41357 41783 43049 43306 43563 43989 45255 45512 45769 46195 47461 47718 47975 48401 49667 49924 50181 50607 51873 52130 52387 52813 54079 54336 54593 54996 56285 56542 56799 57258 58491 58748 59005 59424 60697 60954 61211
+19357 20617 20874 21131 21523 22823 23080 23337 23785 25029 25286 25543 25969 27235 27492 27749 28175 29441 29698 29955 30381 31647 31904 32161 32587 33853 34110 34367 34793 36059 36316 36573 36999 38265 38522 38779 39205 40471 40728 40985 41411 42677 42934 43191 43617 44883 45140 45397 45823 47089 47346 47603 48029 49295 49552 49809 50235 51501 51758 52015 52441 53707 53964 54221 54646 55913 56170 56427 56820 58119 58376 58633 59140 60325 60582 60839 60564 62531 62788 63045
+21191 22451 22708 22965 23357 24657 24914 25171 25619 26863 27120 27377 27803 29069 29326 29583 30009 31275 31532 31789 32215 33481 33738 33995 34421 35687 35944 36201 36627 37893 38150 38407 38833 40099 40356 40613 41039 42305 42562 42819 43245 44511 44768 45025 45451 46717 46974 47231 47657 48923 49180 49437 49863 51129 51386 51643 52069 53335 53592 53849 54275 55541 55798 56055 56466 57747 58004 58261 58741 59953 60210 60467 60395 62159 62416 62673 64276 64365 64622 64879
+23006 24285 24542 24799 25172 26491 26748 27005 27434 28697 28954 29211 29618 30903 31160 31417 31824 33109 33366 33623 34030 35315 35572 35829 36236 37521 37778 38035 38442 39727 39984 40241 40648 41933 42190 42447 42854 44139 44396 44653 45060 46345 46602 46859 47266 48551 48808 49065 49472 50757 51014 51271 51678 52963 53220 53477 53884 55169 55426 55683 56086 57375 57632 57889 58351 59581 59838 60095 59811 61787 62044 62301 65011 63993 64250 64507 48355 663 920 1177
+24886 26119 26376 26633 27052 28325 28582 28839 29314 30531 30788 31045 31498 32737 32994 33251 33704 34943 35200 35457 35910 37149 37406 37663 38116 39355 39612 39869 40322 41561 41818 42075 42528 43767 44024 44281 44734 45973 46230 46487 46940 48179 48436 48693 49146 50385 50642 50899 51352 52591 52848 53105 53558 54797 55054 55311 55764 57003 57260 57517 57975 59209 59466 59723 59395 61415 61672 61929 65535 63621 63878 64135 46792 291 548 805 875 2497 2754 3011
+26687 27953 28210 28467 28853 30159 30416 30673 31115 32365 32622 32879 33299 34571 34828 35085 35505 36777 37034 37291 37711 38983 39240 39497 39917 41189 41446 41703 42123 43395 43652 43909 44329 45601 45858 46115 46535 47807 48064 48321 48741 50013 50270 50527 50947 52219 52476 52733 53153 54425 54682 54939 55359 56631 56888 57145 57565 58837 59094 59351 59656 61043 61300 61557 61774 63249 63506 63763 65535 65455 176 433 18727 2125 2382 2639 0 4331 4588 4845
+CASE rgb-write-mask 10 8 4
+2020 2277 2534 2020 4226 4483 4740 4226 6432 6689 6946 6432 8638 8895 9152 8638 10844 11101 11358 10844 13050 13307 13564 13050 15256 15513 15770 15256 17462 17719 17976 17462 19668 19925 20182 19668 21874 22131 22388 21874
+3854 4111 4368 3854 6060 6317 6574 6060 8266 8523 8780 8266 10472 10729 10986 10472 12678 12935 13192 12678 14884 15141 15398 14884 17090 17347 17604 17090 19296 19553 19810 19296 21502 21759 22016 21502 23708 23965 24222 23708
+5688 5945 6202 5688 7894 8151 8408 7894 10100 10357 10614 10100 12306 12563 12820 12306 14512 14769 15026 14512 16718 16975 17232 16718 18924 19181 19438 18924 21130 21387 21644 21130 23336 23593 23850 23336 25542 25799 26056 25542
+7522 7779 8036 7522 9728 9985 10242 9728 11934 12191 12448 11934 14140 14397 14654 14140 16346 16603 16860 16346 18552 18809 19066 18552 20758 21015 21272 20758 22964 23221 23478 22964 25170 25427 25684 25170 27376 27633 27890 27376
+8439 8696 8953 8439 10645 10902 11159 10645 12851 13108 13365 12851 15057 15314 15571 15057 17263 17520 17777 17263 19469 19726 19983 19469 21675 21932 22189 21675 23881 24138 24395 23881 26087 26344 26601 26087 28293 28550 28807 28293
+10273 10530 10787 10273 12479 12736 12993 12479 14685 14942 15199 14685 16891 17148 17405 16891 19097 19354 19611 19097 21303 21560 21817 21303 23509 23766 24023 23509 25715 25972 26229 25715 27921 28178 28435 27921 30127 30384 30641 30127
+12107 12364 12621 12107 14313 14570 14827 14313 16519 16776 17033 16519 18725 18982 19239 18725 20931 21188 21445 20931 23137 23394 23651 23137 25343 25600 25857 25343 27549 27806 28063 27549 29755 30012 30269 29755 31961 32218 32475 31961
+13941 14198 14455 13941 16147 16404 16661 16147 18353 18610 18867 18353 20559 20816 21073 20559 22765 23022 23279 22765 24971 25228 25485 24971 27177 27434 27691 27177 29383 29640 29897 29383 31589 31846 32103 31589 33045 33302 33559 33795
diff --git a/tests/resize-filter-pixels.tap b/tests/resize-filter-pixels.tap
new file mode 100755
index 000000000..73796c095
--- /dev/null
+++ b/tests/resize-filter-pixels.tap
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+#  Copyright 1999 ImageMagick Studio LLC, a non-profit organization
+#  dedicated to making software imaging solutions freely available.
+#
+#  You may not use this file except in compliance with the License.  You may
+#  obtain a copy of the License at
+#
+#    https://imagemagick.org/license/
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+. ./common.shi
+. ${srcdir}/tests/common.shi
+
+actual=resize-filter-pixels.out
+reference="${SRCDIR}/resize-filter-pixels.q16.txt"
+rm -f "${actual}"
+
+./resize-filter-pixels "${actual}" "${reference}"
+status=$?
+if [ "${status}" -eq 77 ]; then
+  echo "1..0 # SKIP Q16 non-HDRI build required"
+  exit 0
+fi
+
+echo "1..1"
+if [ "${status}" -eq 0 ]; then
+  echo "ok"
+else
+  echo "not ok"
+  echo "# resize filter pixels differ from the Q16 reference"
+fi
+: