Repository: pyqtgraph/pyqtgraph

Issue:
Test failure on test_PolyLineROI on arm64 
CI is failing for `test_PolyLineROI` and in one case results in a segfault.  The test failure can be replicated locally.

When setting `export PYQTGRAPH_AUDIT=1` we get an image demonstrating the failure.

<img width="1312" alt="image" src="https://github.com/pyqtgraph/pyqtgraph/assets/646398/7bd7fa0f-0cb4-42fa-8c20-91ae823ae1f0">


Note: the segfault is avoided when running `pytest tests -k "not test_PolyLineROI"` 


Discussion:

Resolving patch:
diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py
--- a/pyqtgraph/functions.py
+++ b/pyqtgraph/functions.py
@@ -4,8 +4,6 @@
 Distributed under MIT/X11 license. See license.txt for more information.
 """
 
-from __future__ import division
-
 import decimal
 import math
 import re
@@ -1407,6 +1405,7 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False, maskNans=Tr
         nanMask = xp.isnan(data)
         if data.ndim > 2:
             nanMask = xp.any(nanMask, axis=-1)
+    
     # Apply levels if given
     if levels is not None:
         if isinstance(levels, xp.ndarray) and levels.ndim == 2:
@@ -1458,7 +1457,7 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False, maskNans=Tr
         dst_order = [2, 1, 0, 3]    # B,G,R,A (ARGB32 little endian)
     else:
         dst_order = [1, 2, 3, 0]    # A,R,G,B (ARGB32 big endian)
-        
+
     # copy data into image array
     fastpath = try_fastpath_argb(xp, data, imgData, useRGBA)
 
@@ -1478,7 +1477,7 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False, maskNans=Tr
             imgData[..., dst_order[i]] = data[..., i]
         
     profile('reorder channels')
-    
+
     # add opaque alpha channel if needed
     if data.ndim == 3 and data.shape[2] == 4:
         alpha = True
diff --git a/pyqtgraph/graphicsItems/ROI.py b/pyqtgraph/graphicsItems/ROI.py
--- a/pyqtgraph/graphicsItems/ROI.py
+++ b/pyqtgraph/graphicsItems/ROI.py
@@ -105,6 +105,10 @@ class ROI(GraphicsObject):
                      an option to remove the ROI. The ROI emits
                      sigRemoveRequested when this menu action is selected.
                      Default is False.
+    antialias        (bool) If True, the ROI will render using AntiAliasing,
+                     this is what is desired in almost all cases, the option is
+                     added for testing purposes.
+                     Default is True
     ================ ===========================================================
     
     
@@ -143,7 +147,7 @@ def __init__(self, pos, size=Point(1, 1), angle=0.0, invertible=False,
                  translateSnap=False, rotateSnap=False, parent=None, pen=None,
                  hoverPen=None, handlePen=None, handleHoverPen=None,
                  movable=True, rotatable=True, resizable=True, removable=False,
-                 aspectLocked=False):
+                 aspectLocked=False, antialias=True):
         GraphicsObject.__init__(self, parent)
         self.setAcceptedMouseButtons(QtCore.Qt.MouseButton.NoButton)
         pos = Point(pos)
@@ -154,6 +158,7 @@ def __init__(self, pos, size=Point(1, 1), angle=0.0, invertible=False,
         self.resizable = resizable
         self.removable = removable
         self.menu = None
+        self._antialias = antialias
         
         self.freeHandleMoved = False ## keep track of whether free handles have moved since last change signal was emitted.
         self.mouseHovering = False
@@ -611,7 +616,7 @@ def addHandle(self, info, index=None):
         ## If a Handle was not supplied, create it now
         if 'item' not in info or info['item'] is None:
             h = Handle(self.handleSize, typ=info['type'], pen=self.handlePen,
-                       hoverPen=self.handleHoverPen, parent=self)
+                       hoverPen=self.handleHoverPen, parent=self, antialias=self._antialias)
             info['item'] = h
         else:
             h = info['item']
@@ -1067,8 +1072,10 @@ def boundingRect(self):
     def paint(self, p, opt, widget):
         # Note: don't use self.boundingRect here, because subclasses may need to redefine it.
         r = QtCore.QRectF(0, 0, self.state['size'][0], self.state['size'][1]).normalized()
-        
-        p.setRenderHint(QtGui.QPainter.RenderHint.Antialiasing)
+        p.setRenderHint(
+            QtGui.QPainter.RenderHint.Antialiasing,
+            self._antialias
+        )
         p.setPen(self.currentPen)
         p.translate(r.left(), r.top())
         p.scale(r.width(), r.height())
@@ -1335,7 +1342,7 @@ class Handle(UIGraphicsItem):
     sigRemoveRequested = QtCore.Signal(object)   # self
     
     def __init__(self, radius, typ=None, pen=(200, 200, 220),
-                 hoverPen=(255, 255, 0), parent=None, deletable=False):
+                 hoverPen=(255, 255, 0), parent=None, deletable=False, antialias=True):
         self.rois = []
         self.radius = radius
         self.typ = typ
@@ -1346,6 +1353,7 @@ def __init__(self, radius, typ=None, pen=(200, 200, 220),
         self.sides, self.startAng = self.types[typ]
         self.buildPath()
         self._shape = None
+        self._antialias = antialias
         self.menu = self.buildMenu()
         
         UIGraphicsItem.__init__(self, parent=parent)
@@ -1477,9 +1485,11 @@ def buildPath(self):
         self.path.closeSubpath()
             
     def paint(self, p, opt, widget):
-        p.setRenderHints(p.RenderHint.Antialiasing, True)
+        p.setRenderHint(
+            p.RenderHint.Antialiasing,
+            self._antialias
+        )
         p.setPen(self.currentPen)
-        
         p.drawPath(self.shape())
             
     def shape(self):
@@ -1488,7 +1498,9 @@ def shape(self):
             if s is None:
                 return self.path
             self._shape = s
-            self.prepareGeometryChange()  ## beware--this can cause the view to adjust, which would immediately invalidate the shape.
+            # beware--this can cause the view to adjust,
+            # which would immediately invalidate the shape.
+            self.prepareGeometryChange()  
         return self._shape
     
     def boundingRect(self):
@@ -1839,12 +1851,14 @@ def _clearPath(self):
         
     def paint(self, p, opt, widget):
         r = self.boundingRect()
-        p.setRenderHint(QtGui.QPainter.RenderHint.Antialiasing)
+
+        p.setRenderHint(
+            QtGui.QPainter.RenderHint.Antialiasing,
+            self._antialias
+        )
         p.setPen(self.currentPen)
-        
         p.scale(r.width(), r.height())## workaround for GL bug
         r = QtCore.QRectF(r.x()/r.width(), r.y()/r.height(), 1,1)
-        
         p.drawEllipse(r)
         
     def getArrayRegion(self, arr, img=None, axes=(0, 1), returnMappedCoords=False, **kwds):
@@ -2017,7 +2031,7 @@ def setState(self, state):
         
     def addSegment(self, h1, h2, index=None):
         seg = _PolyLineSegment(handles=(h1, h2), pen=self.pen, hoverPen=self.hoverPen,
-                               parent=self, movable=False)
+                               parent=self, movable=False, antialias=self._antialias)
         if index is None:
             self.segments.append(seg)
         else:
@@ -2162,7 +2176,10 @@ def setState(self, state):
         self.movePoint(self.getHandles()[1], p2)
             
     def paint(self, p, *args):
-        p.setRenderHint(QtGui.QPainter.RenderHint.Antialiasing)
+        p.setRenderHint(
+            QtGui.QPainter.RenderHint.Antialiasing,
+            self._antialias
+        )
         p.setPen(self.currentPen)
         h1 = self.endpoints[0].pos()
         h2 = self.endpoints[1].pos()
@@ -2278,9 +2295,11 @@ def shape(self):
     
     def paint(self, p, *args):
         radius = self.getState()['size'][1]
-        p.setRenderHint(QtGui.QPainter.RenderHint.Antialiasing)
+        p.setRenderHint(
+            QtGui.QPainter.RenderHint.Antialiasing,
+            self._antialias
+        )
         p.setPen(self.currentPen)
-        
         p.drawLine(Point(0, -radius), Point(0, radius))
         p.drawLine(Point(-radius, 0), Point(radius, 0))
         
@@ -2337,7 +2356,10 @@ def __init__(self, pos, size, **args):
 
     def paint(self, p, *args):
         r = self.boundingRect()
-        p.setRenderHint(QtGui.QPainter.RenderHint.Antialiasing)
+        p.setRenderHint(
+            QtGui.QPainter.RenderHint.Antialiasing,
+            self._antialias
+        )
         p.scale(r.width(), r.height())
         p.setPen(self.currentPen)
         p.drawPolygon(self.poly)


Test patch:
diff --git a/tests/graphicsItems/test_ROI.py b/tests/graphicsItems/test_ROI.py
--- a/tests/graphicsItems/test_ROI.py
+++ b/tests/graphicsItems/test_ROI.py
@@ -14,52 +14,55 @@
 pg.setConfigOption("mouseRateLimit", 0)
 
 
-def test_getArrayRegion(transpose=False):
-    pr = pg.PolyLineROI([[0, 0], [27, 0], [0, 28]], closed=True)
-    pr.setPos(1, 1)
-    rois = [
-        (pg.ROI([1, 1], [27, 28], pen='y'), 'baseroi'),
-        (pg.RectROI([1, 1], [27, 28], pen='y'), 'rectroi'),
-        (pg.EllipseROI([1, 1], [27, 28], pen='y'), 'ellipseroi'),
-        (pr, 'polylineroi'),
+@pytest.mark.parametrize("roi, name", [
+        (pg.ROI([1, 1],        [27, 28], pen='y', antialias=False), 'baseroi'),
+        (pg.RectROI([1, 1],    [27, 28], pen='y', antialias=False), 'rectroi'),
+        (pg.EllipseROI([1, 1], [27, 28], pen='y', antialias=False), 'ellipseroi'),
+        (
+            pg.PolyLineROI(
+                [[0, 0], [27, 0], [0, 28]],
+                closed=True,
+                pos=(1, 1),
+                antialias=False
+            ),'polylineroi'
+        ),
     ]
-    for roi, name in rois:
-        # For some ROIs, resize should not be used.
-        testResize = not isinstance(roi, pg.PolyLineROI)
-
-        origMode = pg.getConfigOption('imageAxisOrder')
-        try:
-            if transpose:
-                pg.setConfigOptions(imageAxisOrder='row-major')
-                check_getArrayRegion(roi, 'roi/' + name, testResize,
-                                     transpose=True)
-            else:
-                pg.setConfigOptions(imageAxisOrder='col-major')
-                check_getArrayRegion(roi, 'roi/' + name, testResize)
-        finally:
-            pg.setConfigOptions(imageAxisOrder=origMode)
-
-
-def test_getArrayRegion_axisorder():
-    test_getArrayRegion(transpose=True)
+)
+@pytest.mark.parametrize("transpose", [True, False])
+def test_getArrayRegion(roi, name, transpose):    
+    # For some ROIs, resize should not be used.
+    testResize = not isinstance(roi, pg.PolyLineROI)
+
+    origMode = pg.getConfigOption('imageAxisOrder')
+    try:
+        pg.setConfigOptions(
+            imageAxisOrder='row-major' if transpose else 'col-major'
+        )
+        check_getArrayRegion(
+            roi, f"roi/{name}",
+            testResize,
+            transpose=transpose
+        )
+    finally:
+        pg.setConfigOptions(imageAxisOrder=origMode)
 
 
 def check_getArrayRegion(roi, name, testResize=True, transpose=False):
-    # on windows, edges corner pixels seem to be slightly different from
-    # other platforms giving a pxCount=2 for a fudge factor
-    if (isinstance(roi, (pg.ROI, pg.RectROI))
-            and platform.system() == "Windows"):
-        pxCount = 2
+    # edges corner pixels seem to be slightly different on windows
+    if (
+        isinstance(roi, (pg.ROI, pg.RectROI))
+        and platform.system() == "Windows"
+    ):
+        pxCount = 1
     else:
         pxCount = -1
 
     initState = roi.getState()
-
     win = pg.GraphicsView()
     win.show()
     resizeWindow(win, 200, 400)
     # Don't use Qt's layouts for testing--these generate unpredictable results.
-    # Instead, place the viewboxes manually
+    # Instead, manually place the ViewBoxes
     vb1 = pg.ViewBox()
     win.scene().addItem(vb1)
     vb1.setPos(6, 6)
@@ -94,12 +97,13 @@ def check_getArrayRegion(roi, name, testResize=True, transpose=False):
     vb1.addItem(roi)
 
     if isinstance(roi, pg.RectROI):
-        if transpose:
-            assert roi.getAffineSliceParams(data, img1, axes=(1, 2)) == (
-                [28.0, 27.0], ((1.0, 0.0), (0.0, 1.0)), (1.0, 1.0))
-        else:
-            assert roi.getAffineSliceParams(data, img1, axes=(1, 2)) == (
-                [27.0, 28.0], ((1.0, 0.0), (0.0, 1.0)), (1.0, 1.0))
+        first_arg = [28.0, 27.0] if transpose else [27.0, 28.0]
+        assert roi.getAffineSliceParams(
+            data,
+            img1,
+            axes=(1, 2)
+        ) == (first_arg, ((1.0, 0.0), (0.0, 1.0)), (1.0, 1.0))
+
 
     rgn = roi.getArrayRegion(data, img1, axes=(1, 2))
     # assert np.all((rgn == data[:, 1:-2, 1:-2, :]) | (rgn == 0))
@@ -108,8 +112,12 @@ def check_getArrayRegion(roi, name, testResize=True, transpose=False):
     vb2.enableAutoRange(True, True)
 
     app.processEvents()
-    assertImageApproved(win, name + '/roi_getarrayregion',
-                        'Simple ROI region selection.', pxCount=pxCount)
+    assertImageApproved(
+        win,
+        f'{name}/roi_getarrayregion',
+        'Simple ROI region selection.',
+        pxCount=pxCount
+    )
 
     with pytest.raises(TypeError):
         roi.setPos(0, False)
@@ -118,44 +126,59 @@ def check_getArrayRegion(roi, name, testResize=True, transpose=False):
     rgn = roi.getArrayRegion(data, img1, axes=(1, 2))
     img2.setImage(rgn[0, ..., 0])
     app.processEvents()
-    assertImageApproved(win, name + '/roi_getarrayregion_halfpx',
-                        'Simple ROI region selection, 0.5 pixel shift.',
-                        pxCount=pxCount)
+    assertImageApproved(
+        win, 
+        f'{name}/roi_getarrayregion_halfpx',
+        'Simple ROI region selection, 0.5 pixel shift.',
+        pxCount=pxCount
+    )
 
     roi.setAngle(45)
     roi.setPos([3, 0])
     rgn = roi.getArrayRegion(data, img1, axes=(1, 2))
     img2.setImage(rgn[0, ..., 0])
     app.processEvents()
-    assertImageApproved(win, name + '/roi_getarrayregion_rotate',
-                        'Simple ROI region selection, rotation.',
-                        pxCount=pxCount)
+    assertImageApproved(
+        win, 
+        f'{name}/roi_getarrayregion_rotate',
+        'Simple ROI region selection, rotation.',
+        pxCount=pxCount
+    )
 
     if testResize:
         roi.setSize([60, 60])
         rgn = roi.getArrayRegion(data, img1, axes=(1, 2))
         img2.setImage(rgn[0, ..., 0])
         app.processEvents()
-        assertImageApproved(win, name + '/roi_getarrayregion_resize',
-                            'Simple ROI region selection, resized.',
-                            pxCount=pxCount)
+        assertImageApproved(
+            win, 
+            f'{name}/roi_getarrayregion_resize',
+            'Simple ROI region selection, resized.',
+            pxCount=pxCount
+        )
 
     img1.setPos(0, img1.height())
     img1.setTransform(QtGui.QTransform().scale(1, -1).rotate(20), True)
     rgn = roi.getArrayRegion(data, img1, axes=(1, 2))
     img2.setImage(rgn[0, ..., 0])
     app.processEvents()
-    assertImageApproved(win, name + '/roi_getarrayregion_img_trans',
-                        'Simple ROI region selection, image transformed.',
-                        pxCount=pxCount)
+    assertImageApproved(
+        win,
+        f'{name}/roi_getarrayregion_img_trans',
+        'Simple ROI region selection, image transformed.',
+        pxCount=pxCount
+    )
 
     vb1.invertY()
     rgn = roi.getArrayRegion(data, img1, axes=(1, 2))
     img2.setImage(rgn[0, ..., 0])
     app.processEvents()
-    assertImageApproved(win, name + '/roi_getarrayregion_inverty',
-                        'Simple ROI region selection, view inverted.',
-                        pxCount=pxCount)
+    assertImageApproved(
+        win, 
+        f'{name}/roi_getarrayregion_inverty',
+        'Simple ROI region selection, view inverted.',
+        pxCount=pxCount
+    )
 
     roi.setState(initState)
     img1.setPos(0, 0)
@@ -164,13 +187,13 @@ def check_getArrayRegion(roi, name, testResize=True, transpose=False):
     img2.setImage(rgn[0, ..., 0])
     app.processEvents()
     assertImageApproved(
-        win, name + '/roi_getarrayregion_anisotropic',
+        win, 
+        f'{name}/roi_getarrayregion_anisotropic',
         'Simple ROI region selection, image scaled anisotropically.',
-        pxCount=pxCount)
-
+        pxCount=pxCount
+    )
     # allow the roi to be re-used
     roi.scene().removeItem(roi)
-
     win.hide()
 
 
@@ -188,11 +211,15 @@ def test_mouseClickEvent():
     vb.addItem(roi)
     app.processEvents()
 
-    mouseClick(plt, roi.mapToScene(pg.Point(2, 2)),
-               QtCore.Qt.MouseButton.LeftButton)
+    mouseClick(
+        plt,
+        roi.mapToScene(pg.Point(2, 2)),
+        QtCore.Qt.MouseButton.LeftButton
+    )
 
 
 def test_mouseDragEventSnap():
+    pg.setConfigOptions(antialias=False)
     plt = pg.GraphicsView()
     plt.show()
     resizeWindow(plt, 200, 200)
@@ -205,8 +232,14 @@ def test_mouseDragEventSnap():
     # A Rectangular roi with scaleSnap enabled
     initial_x = 20
     initial_y = 20
-    roi = pg.RectROI((initial_x, initial_y), (20, 20), scaleSnap=True,
-                     translateSnap=True, snapSize=1.0, movable=True)
+    roi = pg.RectROI(
+        (initial_x, initial_y),
+        (20, 20),
+        scaleSnap=True,
+        translateSnap=True,
+        snapSize=1.0,
+        movable=True
+    )
     vb.addItem(roi)
     app.processEvents()
 
@@ -223,28 +256,53 @@ def test_mouseDragEventSnap():
 
     # Only drag in y direction
     roi_position = roi.mapToView(pg.Point(initial_x, initial_y))
-    mouseDrag(plt, roi_position, roi_position + pg.Point(0, 10),
-              QtCore.Qt.MouseButton.LeftButton)
+    mouseDrag(
+        plt,
+        roi_position,
+        roi_position + pg.Point(0, 10),
+        QtCore.Qt.MouseButton.LeftButton
+    )
     assert roi.pos() == pg.Point(initial_x, 19)
 
-    mouseDrag(plt, roi_position, roi_position + pg.Point(0, 10),
-              QtCore.Qt.MouseButton.LeftButton)
+    mouseDrag(
+        plt,
+        roi_position,
+        roi_position + pg.Point(0, 10),
+        QtCore.Qt.MouseButton.LeftButton
+    )
     assert roi.pos() == pg.Point(initial_x, 18)
 
     # Only drag in x direction
-    mouseDrag(plt, roi_position, roi_position + pg.Point(10, 0),
-              QtCore.Qt.MouseButton.LeftButton)
+    mouseDrag(
+        plt,
+        roi_position,
+        roi_position + pg.Point(10, 0),
+        QtCore.Qt.MouseButton.LeftButton
+    )
     assert roi.pos() == pg.Point(21, 18)
 
-
-def test_PolyLineROI():
-    rois = [
-        (pg.PolyLineROI([[0, 0], [10, 0], [0, 15]], closed=True, pen=0.3),
-         'closed'),
-        (pg.PolyLineROI([[0, 0], [10, 0], [0, 15]], closed=False, pen=0.3),
-         'open')
+@pytest.mark.parametrize("roi, name", [
+        (
+            pg.PolyLineROI(
+                [[0, 0], [10, 0], [0, 15]],
+                closed=True,
+                pen=0.3,
+                antialias=False
+            ),
+            'closed'
+        ),
+        (
+            pg.PolyLineROI(
+                [[0, 0], [10, 0], [0, 15]],
+                closed=False,
+                pen=0.3,
+                antialias=False 
+            ),
+            'open'
+        )
     ]
-
+)
+def test_PolyLineROI(roi, name):
     plt = pg.GraphicsView()
     plt.show()
     resizeWindow(plt, 200, 200)
@@ -262,84 +320,130 @@ def test_PolyLineROI():
     QtTest.QTest.qWaitForWindowExposed(plt)
     QtTest.QTest.qWait(100)
 
-    for r, name in rois:
-        vb.clear()
-        vb.addItem(r)
-        vb.autoRange()
-        app.processEvents()
+    vb.clear()
+    vb.addItem(roi)
+    vb.autoRange()
+    app.processEvents()
 
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_init',
-                            'Init %s polyline.' % name)
-        initState = r.getState()
-        assert len(r.getState()['points']) == 3
-
-        # hover over center
-        center = r.mapToScene(pg.Point(3, 3))
-        mouseMove(plt, center)
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_hover_roi',
-                            'Hover mouse over center of ROI.')
-
-        # drag ROI
-        mouseDrag(plt, center, center + pg.Point(10, -10),
-                  QtCore.Qt.MouseButton.LeftButton)
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_drag_roi',
-                            'Drag mouse over center of ROI.')
-
-        # hover over handle
-        pt = r.mapToScene(pg.Point(r.getState()['points'][2]))
-        mouseMove(plt, pt)
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_hover_handle',
-                            'Hover mouse over handle.')
-
-        # drag handle
-        mouseDrag(plt, pt, pt + pg.Point(5, 20),
-                  QtCore.Qt.MouseButton.LeftButton)
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_drag_handle',
-                            'Drag mouse over handle.')
-
-        # hover over segment
-        pt = r.mapToScene((pg.Point(r.getState()['points'][2]) + pg.Point(
-            r.getState()['points'][1])) * 0.5)
-        mouseMove(plt, pt + pg.Point(0, 2))
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_hover_segment',
-                            'Hover mouse over diagonal segment.')
-
-        # click segment
-        mouseClick(plt, pt, QtCore.Qt.MouseButton.LeftButton)
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_click_segment',
-                            'Click mouse over segment.')
-
-        # drag new handle
-        mouseMove(plt, pt + pg.Point(10,
-                                     -10))
-        # pg bug: have to move the mouse off/on again to register hover
-        mouseDrag(plt, pt, pt + pg.Point(10, -10),
-                  QtCore.Qt.MouseButton.LeftButton)
-        assertImageApproved(plt,
-                            'roi/polylineroi/' + name + '_drag_new_handle',
-                            'Drag mouse over created handle.')
-
-        # clear all points
-        r.clearPoints()
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_clear',
-                            'All points cleared.')
-        assert len(r.getState()['points']) == 0
-
-        # call setPoints
-        r.setPoints(initState['points'])
-        assertImageApproved(
-            plt,
-            f'roi/polylineroi/{name}_setpoints',
-            'Reset points to initial state.',
-            pxCount=1 if platform.system() == "Darwin" and parse(platform.mac_ver()[0]) >= Version("13.0") else 0
-        )
-        assert len(r.getState()['points']) == 3
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_init',
+        f'Init {name} polyline.'
+    )
+    initState = roi.getState()
+    assert len(roi.getState()['points']) == 3
+
+    # hover over center
+    center = roi.mapToScene(pg.Point(3, 3))
+    mouseMove(plt, center)
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_hover_roi',
+        'Hover mouse over center of ROI.'
+    )
+
+    # drag ROI
+    mouseDrag(
+        plt,
+        center, center + pg.Point(10, -10),
+        QtCore.Qt.MouseButton.LeftButton
+    )
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_drag_roi',
+        'Drag mouse over center of ROI.'
+    )
+
+    # hover over handle
+    pt = roi.mapToScene(
+        pg.Point(roi.getState()['points'][2])
+    )
+    mouseMove(plt, pt)
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_hover_handle',
+        'Hover mouse over handle.'
+    )
+
+    # drag handle
+    mouseDrag(plt,
+        pt,
+        pt + pg.Point(5, 20),
+        QtCore.Qt.MouseButton.LeftButton
+    )
+    
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_drag_handle',
+        'Drag mouse over handle.'
+    )
+
+    # hover over segment
+    pt = roi.mapToScene(
+        (
+            pg.Point(roi.getState()['points'][2]) + 
+            pg.Point(roi.getState()['points'][1])
+        ) * 0.5
+    )
+
+    mouseMove(plt, pt + pg.Point(0, 2))
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_hover_segment',
+        'Hover mouse over diagonal segment.'
+    )
+
+    # click segment
+    mouseClick(plt, pt, QtCore.Qt.MouseButton.LeftButton)
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_click_segment',
+        'Click mouse over segment.',
+        pxCount=3
+    )
+
+    # drag new handle
+    mouseMove(plt, pt + pg.Point(10, -10))
+    # pg bug: have to move the mouse off/on again to register hover
+    mouseDrag(
+        plt,
+        pt, pt + pg.Point(10, -10),
+        QtCore.Qt.MouseButton.LeftButton
+    )
+
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_drag_new_handle',
+        'Drag mouse over created handle.',
+        pxCount=2
+    )
+
+    # clear all points
+    roi.clearPoints()
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_clear',
+        'All points cleared.'
+    )
+    assert len(roi.getState()['points']) == 0
+
+    # call setPoints
+    roi.setPoints(initState['points'])
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_setpoints',
+        'Reset points to initial state.',
+    )
+    assert len(roi.getState()['points']) == 3
 
-        # call setState
-        r.setState(initState)
-        assertImageApproved(plt, 'roi/polylineroi/' + name + '_setstate',
-                            'Reset ROI to initial state.')
-        assert len(r.getState()['points']) == 3
+    # call setState
+    roi.setState(initState)
+    assertImageApproved(
+        plt,
+        f'roi/polylineroi/{name}_setstate',
+        'Reset ROI to initial state.'
+    )
+    assert len(roi.getState()['points']) == 3
 
     plt.hide()
 
@@ -351,6 +455,7 @@ def test_PolyLineROI():
     ((-2, 1), (-4, -8)),
 ])
 def test_LineROI_coords(p1, p2):
+    pg.setConfigOptions(antialias=False)
     pw = pg.PlotWidget()
     pw.show()
 
@@ -358,8 +463,10 @@ def test_LineROI_coords(p1, p2):
     pw.addItem(lineroi)
 
     # first two handles are the scale-rotate handles positioned by pos1, pos2
-    for expected, (name, scenepos) in zip([p1, p2],
-                                          lineroi.getSceneHandlePositions()):
+    for expected, (_, scenepos) in zip(
+        [p1, p2],
+        lineroi.getSceneHandlePositions()
+    ):
         got = lineroi.mapSceneToParent(scenepos)
         assert math.isclose(got.x(), expected[0])
         assert math.isclose(got.y(), expected[1])
diff --git a/tests/image_testing.py b/tests/image_testing.py
--- a/tests/image_testing.py
+++ b/tests/image_testing.py
@@ -223,7 +223,7 @@ def assertImageMatch(im1, im2, minCorr=None, pxThreshold=50.,
     pxdiff = diff.max(axis=2)  # largest value difference per pixel
     mask = np.abs(pxdiff) >= pxThreshold
     if pxCount is not None:
-        assert mask.sum() <= pxCount
+        assert mask.sum() <= pxCount, f"allowed {pxCount=}, actual was {mask.sum()}"
 
     maskedDiff = diff[mask]
     if maxPxDiff is not None and maskedDiff.size > 0:
@@ -237,7 +237,21 @@ def assertImageMatch(im1, im2, minCorr=None, pxThreshold=50.,
         assert corr >= minCorr
 
 
-def saveFailedTest(data, expect, filename):
+def saveFailedTest(data, expect, filename, save_comparison=False):
+    directory = os.path.dirname(filename)
+    if not os.path.isdir(directory):
+        os.makedirs(directory)
+    base, ext = os.path.splitext(filename)
+    if ext != ".png":
+        filename += ".png"
+
+    png = makePng(data)
+    with open(filename, "wb") as png_file:
+        png_file.write(png)
+    
+    if not save_comparison:
+        return None
+
     # concatenate data, expect, and diff into a single image
     ds = data.shape
     es = expect.shape
@@ -253,15 +267,10 @@ def saveFailedTest(data, expect, filename):
     diff = makeDiffImage(data, expect)
     img[2:2+diff.shape[0], -diff.shape[1]-2:-2] = diff
 
-    png = makePng(data)  # change `img` to `data` to save just the failed image
-    directory = os.path.dirname(filename)
-    if not os.path.isdir(directory):
-        os.makedirs(directory)
-    with open(filename + ".png", "wb") as png_file:
+    png = makePng(img)
+    with open(f"{base}_comparison.png", "wb") as png_file:
         png_file.write(png)
-    print("\nImage comparison failed. Test result: %s %s   Expected result: "
-        "%s %s" % (data.shape, data.dtype, expect.shape, expect.dtype))
-
+    return None
 
 def makePng(img):
     """Given an array like (H, W, 4), return a PNG-encoded byte string.
@@ -297,7 +306,7 @@ def __init__(self):
         
         QtWidgets.QWidget.__init__(self)
         self.resize(1200, 800)
-        #self.showFullScreen()
+        self.setWindowTitle("ImageTester")
         
         self.layout = QtWidgets.QGridLayout()
         self.setLayout(self.layout)
@@ -308,33 +317,45 @@ def __init__(self):
         self.label = QtWidgets.QLabel()
         self.layout.addWidget(self.label, 1, 0, 1, 2)
         self.label.setWordWrap(True)
-        font = QtGui.QFont("monospace", 14, QtGui.QFont.Weight.Bold)
+        font = QtGui.QFont("monospace", 14)
+        font.setStyleHint(QtGui.QFont.StyleHint.Monospace)
         self.label.setFont(font)
 
         self.passBtn = QtWidgets.QPushButton('Pass')
         self.failBtn = QtWidgets.QPushButton('Fail')
-        self.layout.addWidget(self.passBtn, 2, 0)
-        self.layout.addWidget(self.failBtn, 2, 1)
+        self.saveBtn = QtWidgets.QPushButton('Save Test Result Image')
+
+        self.btnBox = QtWidgets.QDialogButtonBox()
+        self.btnBox.addButton(self.passBtn, QtWidgets.QDialogButtonBox.ButtonRole.YesRole)
+        self.btnBox.addButton(self.failBtn, QtWidgets.QDialogButtonBox.ButtonRole.NoRole)
+        self.btnBox.addButton(self.saveBtn, QtWidgets.QDialogButtonBox.ButtonRole.AcceptRole)
         self.passBtn.clicked.connect(self.passTest)
         self.failBtn.clicked.connect(self.failTest)
-
-        self.views = (self.view.addViewBox(row=0, col=0),
-                      self.view.addViewBox(row=0, col=1),
-                      self.view.addViewBox(row=0, col=2))
-        labelText = ['test output', 'standard', 'diff']
-        for i, v in enumerate(self.views):
+        self.saveBtn.clicked.connect(self.saveImage)
+        self.layout.addWidget(self.btnBox, 2, 0, 1, -1)
+
+        self.plots = (
+            self.view.addPlot(title="Result", row=0, col=0),
+            self.view.addPlot(title="Baseline", row=0, col=1),
+            self.view.addPlot(title="Difference", row=0, col=2)
+        )
+
+        for plot in self.plots:
+            plot.hideButtons()
+            for axis in ['left', 'bottom', 'right', 'top']:
+                plot.hideAxis(axis)
+            v = plot.getViewBox()
             v.setAspectLocked(1)
             v.invertY()
             v.image = ImageItem(axisOrder='row-major')
             v.image.setAutoDownsample(True)
             v.addItem(v.image)
-            v.label = TextItem(labelText[i])
             v.setBackgroundColor(0.5)
 
-        self.views[1].setXLink(self.views[0])
-        self.views[1].setYLink(self.views[0])
-        self.views[2].setXLink(self.views[0])
-        self.views[2].setYLink(self.views[0])
+        self.plots[1].setXLink(self.plots[0])
+        self.plots[1].setYLink(self.plots[0])
+        self.plots[2].setXLink(self.plots[0])
+        self.plots[2].setYLink(self.plots[0])
 
     def test(self, im1, im2, message):
         """Ask the user to decide whether an image test passes or fails.
@@ -345,32 +366,42 @@ def test(self, im1, im2, message):
         then an exception is raised.
         """
         self.show()
+        message = f"Test Message: {message}"
         if im2 is None:
-            message += '\nImage1: %s %s   Image2: [no standard]' % (im1.shape, im1.dtype)
+            message += (
+                "\n"
+                + f"Result:   Dimensions={im1.shape}\tDType={im1.dtype}\n"
+                + "Baseline: [no standard]"
+            )
             im2 = np.zeros((1, 1, 3), dtype=np.ubyte)
         else:
-            message += '\nImage1: %s %s   Image2: %s %s' % (im1.shape, im1.dtype, im2.shape, im2.dtype)
+            message += (
+                "\n"
+                + f"Result:   Dimensions={im1.shape}\tDType={im1.dtype}\n"
+                + f"Baseline: Dimensions={im2.shape}\tDType={im2.dtype}"
+            )
         self.label.setText(message)
-        
-        self.views[0].image.setImage(im1)
-        self.views[1].image.setImage(im2)
+
+        self.plots[0].getViewBox().image.setImage(im1)
+        self.plots[1].getViewBox().image.setImage(im2)
         diff = makeDiffImage(im1, im2)
 
-        self.views[2].image.setImage(diff)
-        self.views[0].autoRange()
+        self.plots[2].getViewBox().image.setImage(diff)
+        self.plots[0].autoRange()
 
         while True:
             QtWidgets.QApplication.processEvents()
             lastKey = self.lastKey
-            
+
             self.lastKey = None
             if lastKey in ('f', 'esc') or not self.isVisible():
-                raise Exception("User rejected test result.")
+                raise ValueError("User rejected test result.")
             elif lastKey == 'p':
                 break
             time.sleep(0.03)
 
-        for v in self.views:
+        for plot in self.plots:
+            v = plot.getViewBox()
             v.image.setImage(np.zeros((1, 1, 3), dtype=np.ubyte))
 
     def keyPressEvent(self, event):
@@ -385,6 +416,24 @@ def passTest(self):
     def failTest(self):
         self.lastKey = 'f'
 
+    def saveImage(self):
+        filename, _ = QtWidgets.QFileDialog.getSaveFileName(
+            self,
+            "Save Test Image",
+            filter="Images (*png)",
+            options=QtWidgets.QFileDialog.Option.ReadOnly
+        )
+        if not filename:
+            # user cancelled out of the dialog
+            return None
+
+        _, ext = os.path.splitext(filename)
+        if ext != ".png":
+            filename = f"{filename}.png"
+        result = self.plots[0].getViewBox().image.image
+        expected = self.plots[1].getViewBox().image.image
+        saveFailedTest(result, expected, filename, save_comparison=True)
+        return None
 
 def getTestDataDirectory():
     dataPath = Path(__file__).absolute().parent / "images"
@@ -406,9 +455,9 @@ def scenegraphState(view, name):
 def itemState(root):
     state = str(root) + '\n'
     from pyqtgraph import ViewBox
-    state += 'bounding rect: ' + str(root.boundingRect()) + '\n'
+    state += f'bounding rect: {str(root.boundingRect())}' + '\n'
     if isinstance(root, ViewBox):
-        state += "view range: " + str(root.viewRange()) + '\n'
+        state += f"view range: {str(root.viewRange())}" + '\n'
     state += "transform:\n" + indent(transformStr(root.transform()).strip(), "  ") + '\n'
     for item in root.childItems():
         state += indent(itemState(item).strip(), "    ") + '\n'
diff --git a/tests/images/roi/baseroi/roi_getarrayregion.png b/tests/images/roi/baseroi/roi_getarrayregion.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion.png and b/tests/images/roi/baseroi/roi_getarrayregion.png differ
diff --git a/tests/images/roi/baseroi/roi_getarrayregion_anisotropic.png b/tests/images/roi/baseroi/roi_getarrayregion_anisotropic.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion_anisotropic.png and b/tests/images/roi/baseroi/roi_getarrayregion_anisotropic.png differ
diff --git a/tests/images/roi/baseroi/roi_getarrayregion_halfpx.png b/tests/images/roi/baseroi/roi_getarrayregion_halfpx.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion_halfpx.png and b/tests/images/roi/baseroi/roi_getarrayregion_halfpx.png differ
diff --git a/tests/images/roi/baseroi/roi_getarrayregion_img_trans.png b/tests/images/roi/baseroi/roi_getarrayregion_img_trans.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion_img_trans.png and b/tests/images/roi/baseroi/roi_getarrayregion_img_trans.png differ
diff --git a/tests/images/roi/baseroi/roi_getarrayregion_inverty.png b/tests/images/roi/baseroi/roi_getarrayregion_inverty.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion_inverty.png and b/tests/images/roi/baseroi/roi_getarrayregion_inverty.png differ
diff --git a/tests/images/roi/baseroi/roi_getarrayregion_resize.png b/tests/images/roi/baseroi/roi_getarrayregion_resize.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion_resize.png and b/tests/images/roi/baseroi/roi_getarrayregion_resize.png differ
diff --git a/tests/images/roi/baseroi/roi_getarrayregion_rotate.png b/tests/images/roi/baseroi/roi_getarrayregion_rotate.png
Binary files a/tests/images/roi/baseroi/roi_getarrayregion_rotate.png and b/tests/images/roi/baseroi/roi_getarrayregion_rotate.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion.png b/tests/images/roi/ellipseroi/roi_getarrayregion.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion.png and b/tests/images/roi/ellipseroi/roi_getarrayregion.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion_anisotropic.png b/tests/images/roi/ellipseroi/roi_getarrayregion_anisotropic.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion_anisotropic.png and b/tests/images/roi/ellipseroi/roi_getarrayregion_anisotropic.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion_halfpx.png b/tests/images/roi/ellipseroi/roi_getarrayregion_halfpx.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion_halfpx.png and b/tests/images/roi/ellipseroi/roi_getarrayregion_halfpx.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion_img_trans.png b/tests/images/roi/ellipseroi/roi_getarrayregion_img_trans.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion_img_trans.png and b/tests/images/roi/ellipseroi/roi_getarrayregion_img_trans.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion_inverty.png b/tests/images/roi/ellipseroi/roi_getarrayregion_inverty.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion_inverty.png and b/tests/images/roi/ellipseroi/roi_getarrayregion_inverty.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion_resize.png b/tests/images/roi/ellipseroi/roi_getarrayregion_resize.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion_resize.png and b/tests/images/roi/ellipseroi/roi_getarrayregion_resize.png differ
diff --git a/tests/images/roi/ellipseroi/roi_getarrayregion_rotate.png b/tests/images/roi/ellipseroi/roi_getarrayregion_rotate.png
Binary files a/tests/images/roi/ellipseroi/roi_getarrayregion_rotate.png and b/tests/images/roi/ellipseroi/roi_getarrayregion_rotate.png differ
diff --git a/tests/images/roi/polylineroi/closed_click_segment.png b/tests/images/roi/polylineroi/closed_click_segment.png
Binary files a/tests/images/roi/polylineroi/closed_click_segment.png and b/tests/images/roi/polylineroi/closed_click_segment.png differ
diff --git a/tests/images/roi/polylineroi/closed_drag_handle.png b/tests/images/roi/polylineroi/closed_drag_handle.png
Binary files a/tests/images/roi/polylineroi/closed_drag_handle.png and b/tests/images/roi/polylineroi/closed_drag_handle.png differ
diff --git a/tests/images/roi/polylineroi/closed_drag_new_handle.png b/tests/images/roi/polylineroi/closed_drag_new_handle.png
Binary files a/tests/images/roi/polylineroi/closed_drag_new_handle.png and b/tests/images/roi/polylineroi/closed_drag_new_handle.png differ
diff --git a/tests/images/roi/polylineroi/closed_drag_roi.png b/tests/images/roi/polylineroi/closed_drag_roi.png
Binary files a/tests/images/roi/polylineroi/closed_drag_roi.png and b/tests/images/roi/polylineroi/closed_drag_roi.png differ
diff --git a/tests/images/roi/polylineroi/closed_hover_handle.png b/tests/images/roi/polylineroi/closed_hover_handle.png
Binary files a/tests/images/roi/polylineroi/closed_hover_handle.png and b/tests/images/roi/polylineroi/closed_hover_handle.png differ
diff --git a/tests/images/roi/polylineroi/closed_hover_roi.png b/tests/images/roi/polylineroi/closed_hover_roi.png
Binary files a/tests/images/roi/polylineroi/closed_hover_roi.png and b/tests/images/roi/polylineroi/closed_hover_roi.png differ
diff --git a/tests/images/roi/polylineroi/closed_hover_segment.png b/tests/images/roi/polylineroi/closed_hover_segment.png
Binary files a/tests/images/roi/polylineroi/closed_hover_segment.png and b/tests/images/roi/polylineroi/closed_hover_segment.png differ
diff --git a/tests/images/roi/polylineroi/closed_init.png b/tests/images/roi/polylineroi/closed_init.png
Binary files a/tests/images/roi/polylineroi/closed_init.png and b/tests/images/roi/polylineroi/closed_init.png differ
diff --git a/tests/images/roi/polylineroi/closed_setpoints.png b/tests/images/roi/polylineroi/closed_setpoints.png
Binary files a/tests/images/roi/polylineroi/closed_setpoints.png and b/tests/images/roi/polylineroi/closed_setpoints.png differ
diff --git a/tests/images/roi/polylineroi/closed_setstate.png b/tests/images/roi/polylineroi/closed_setstate.png
Binary files a/tests/images/roi/polylineroi/closed_setstate.png and b/tests/images/roi/polylineroi/closed_setstate.png differ
diff --git a/tests/images/roi/polylineroi/open_click_segment.png b/tests/images/roi/polylineroi/open_click_segment.png
Binary files a/tests/images/roi/polylineroi/open_click_segment.png and b/tests/images/roi/polylineroi/open_click_segment.png differ
diff --git a/tests/images/roi/polylineroi/open_drag_handle.png b/tests/images/roi/polylineroi/open_drag_handle.png
Binary files a/tests/images/roi/polylineroi/open_drag_handle.png and b/tests/images/roi/polylineroi/open_drag_handle.png differ
diff --git a/tests/images/roi/polylineroi/open_drag_new_handle.png b/tests/images/roi/polylineroi/open_drag_new_handle.png
Binary files a/tests/images/roi/polylineroi/open_drag_new_handle.png and b/tests/images/roi/polylineroi/open_drag_new_handle.png differ
diff --git a/tests/images/roi/polylineroi/open_drag_roi.png b/tests/images/roi/polylineroi/open_drag_roi.png
Binary files a/tests/images/roi/polylineroi/open_drag_roi.png and b/tests/images/roi/polylineroi/open_drag_roi.png differ
diff --git a/tests/images/roi/polylineroi/open_hover_handle.png b/tests/images/roi/polylineroi/open_hover_handle.png
Binary files a/tests/images/roi/polylineroi/open_hover_handle.png and b/tests/images/roi/polylineroi/open_hover_handle.png differ
diff --git a/tests/images/roi/polylineroi/open_hover_roi.png b/tests/images/roi/polylineroi/open_hover_roi.png
Binary files a/tests/images/roi/polylineroi/open_hover_roi.png and b/tests/images/roi/polylineroi/open_hover_roi.png differ
diff --git a/tests/images/roi/polylineroi/open_hover_segment.png b/tests/images/roi/polylineroi/open_hover_segment.png
Binary files a/tests/images/roi/polylineroi/open_hover_segment.png and b/tests/images/roi/polylineroi/open_hover_segment.png differ
diff --git a/tests/images/roi/polylineroi/open_init.png b/tests/images/roi/polylineroi/open_init.png
Binary files a/tests/images/roi/polylineroi/open_init.png and b/tests/images/roi/polylineroi/open_init.png differ
diff --git a/tests/images/roi/polylineroi/open_setpoints.png b/tests/images/roi/polylineroi/open_setpoints.png
Binary files a/tests/images/roi/polylineroi/open_setpoints.png and b/tests/images/roi/polylineroi/open_setpoints.png differ
diff --git a/tests/images/roi/polylineroi/open_setstate.png b/tests/images/roi/polylineroi/open_setstate.png
Binary files a/tests/images/roi/polylineroi/open_setstate.png and b/tests/images/roi/polylineroi/open_setstate.png differ
diff --git a/tests/images/roi/polylineroi/roi_getarrayregion.png b/tests/images/roi/polylineroi/roi_getarrayregion.png
Binary files a/tests/images/roi/polylineroi/roi_getarrayregion.png and b/tests/images/roi/polylineroi/roi_getarrayregion.png differ
diff --git a/tests/images/roi/polylineroi/roi_getarrayregion_anisotropic.png b/tests/images/roi/polylineroi/roi_getarrayregion_anisotropic.png
Binary files a/tests/images/roi/polylineroi/roi_getarrayregion_anisotropic.png and b/tests/images/roi/polylineroi/roi_getarrayregion_anisotropic.png differ
diff --git a/tests/images/roi/polylineroi/roi_getarrayregion_halfpx.png b/tests/images/roi/polylineroi/roi_getarrayregion_halfpx.png
Binary files a/tests/images/roi/polylineroi/roi_getarrayregion_halfpx.png and b/tests/images/roi/polylineroi/roi_getarrayregion_halfpx.png differ
diff --git a/tests/images/roi/polylineroi/roi_getarrayregion_img_trans.png b/tests/images/roi/polylineroi/roi_getarrayregion_img_trans.png
Binary files a/tests/images/roi/polylineroi/roi_getarrayregion_img_trans.png and b/tests/images/roi/polylineroi/roi_getarrayregion_img_trans.png differ
diff --git a/tests/images/roi/polylineroi/roi_getarrayregion_inverty.png b/tests/images/roi/polylineroi/roi_getarrayregion_inverty.png
Binary files a/tests/images/roi/polylineroi/roi_getarrayregion_inverty.png and b/tests/images/roi/polylineroi/roi_getarrayregion_inverty.png differ
diff --git a/tests/images/roi/polylineroi/roi_getarrayregion_rotate.png b/tests/images/roi/polylineroi/roi_getarrayregion_rotate.png
Binary files a/tests/images/roi/polylineroi/roi_getarrayregion_rotate.png and b/tests/images/roi/polylineroi/roi_getarrayregion_rotate.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion.png b/tests/images/roi/rectroi/roi_getarrayregion.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion.png and b/tests/images/roi/rectroi/roi_getarrayregion.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion_anisotropic.png b/tests/images/roi/rectroi/roi_getarrayregion_anisotropic.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion_anisotropic.png and b/tests/images/roi/rectroi/roi_getarrayregion_anisotropic.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion_halfpx.png b/tests/images/roi/rectroi/roi_getarrayregion_halfpx.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion_halfpx.png and b/tests/images/roi/rectroi/roi_getarrayregion_halfpx.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion_img_trans.png b/tests/images/roi/rectroi/roi_getarrayregion_img_trans.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion_img_trans.png and b/tests/images/roi/rectroi/roi_getarrayregion_img_trans.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion_inverty.png b/tests/images/roi/rectroi/roi_getarrayregion_inverty.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion_inverty.png and b/tests/images/roi/rectroi/roi_getarrayregion_inverty.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion_resize.png b/tests/images/roi/rectroi/roi_getarrayregion_resize.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion_resize.png and b/tests/images/roi/rectroi/roi_getarrayregion_resize.png differ
diff --git a/tests/images/roi/rectroi/roi_getarrayregion_rotate.png b/tests/images/roi/rectroi/roi_getarrayregion_rotate.png
Binary files a/tests/images/roi/rectroi/roi_getarrayregion_rotate.png and b/tests/images/roi/rectroi/roi_getarrayregion_rotate.png differ
diff --git a/tests/makeARGB_test_data.py b/tests/makeARGB_test_data.py
new file mode 100644
--- /dev/null
+++ b/tests/makeARGB_test_data.py
@@ -0,0 +1,4268 @@
+import sys
+from typing import Optional, Union
+
+import numpy as np
+import numpy.typing as npt
+
+from pyqtgraph.functions import makeARGB
+
+
+
+
+IN_2D_INT8 = np.array([[173, 48, 122, 41], [210, 192, 0, 5], [104, 56, 102, 115], [78, 19, 255, 6]], dtype=np.uint8)
+IN_RGB_INT8 = np.array(
+    [
+        [[16, 69, 62], [66, 132, 135], [220, 80, 36], [53, 34, 68]],
+        [[140, 23, 113], [0, 63, 206], [96, 255, 100], [226, 182, 155]],
+        [[28, 237, 223], [215, 232, 209], [17, 16, 50], [96, 187, 93]],
+        [[220, 193, 232], [134, 168, 150], [55, 64, 221], [96, 108, 227]],
+    ],
+    dtype=np.uint8,
+)
+IN_RGBA_INT8 = np.array(
+    [
+        [[151, 252, 73, 107], [28, 221, 35, 0], [87, 122, 126, 114], [47, 59, 24, 200]],
+        [[189, 246, 242, 255], [123, 255, 29, 14], [201, 208, 133, 32], [118, 203, 141, 245]],
+        [[133, 131, 248, 81], [4, 84, 99, 40], [40, 167, 119, 150], [13, 158, 108, 21]],
+        [[156, 221, 166, 250], [77, 188, 13, 166], [0, 1, 185, 25], [83, 35, 103, 120]],
+    ],
+    dtype=np.uint8,
+)
+IN_2D_INT16 = np.array(
+    [
+        [13364, 55041, 40746, 40937],
+        [57612, 34247, 34132, 0],
+        [10109, 56950, 41856, 21479],
+        [14881, 65535, 48079, 11372],
+    ],
+    dtype=np.uint16,
+)
+IN_RGB_INT16 = np.array(
+    [
+        [[55626, 45263, 0], [19468, 39208, 36391], [33255, 8664, 56991], [37588, 31212, 38295]],
+        [[58933, 16402, 36905], [9928, 23928, 12418], [16461, 47738, 18189], [17004, 39307, 59941]],
+        [[43717, 49573, 9843], [35967, 3891, 39618], [53542, 58151, 29112], [53667, 4092, 35267]],
+        [[15957, 21648, 45238], [65535, 47107, 52049], [6342, 34547, 19902], [43386, 37301, 35095]],
+    ],
+    dtype=np.uint16,
+)
+IN_RGBA_INT16 = np.array(
+    [
+        [
+            [13060, 40847, 29621, 46719],
+            [0, 36509, 33525, 56649],
+            [48328, 23093, 47186, 26801],
+            [57336, 12247, 30996, 11691],
+        ],
+        [
+            [4863, 41121, 32045, 25250],
+            [27779, 65098, 59921, 47771],
+            [8906, 18280, 5066, 48587],
+            [65535, 25758, 27250, 17284],
+        ],
+        [
+            [52005, 65535, 40746, 65535],
+            [33, 57630, 27750, 42371],
+            [50176, 35079, 19220, 63662],
+            [17702, 5506, 36216, 48303],
+        ],
+        [
+            [61592, 27692, 37436, 7249],
+            [54653, 39986, 58441, 12819],
+            [20887, 56588, 32440, 85],
+            [13457, 14661, 58972, 48779],
+        ],
+    ],
+    dtype=np.uint16,
+)
+IN_2D_FLOAT = np.array(
+    [
+        [np.inf, 0.53662884, np.nan, 0.8853132],
+        [0.8496698, 0.88006145, 1.0, 0.06621328],
+        [0.99158293, 0.8476984, 0.16672458, 0.9887786],
+        [0.07076367, 0.66354364, 0.8781082, 0.988832],
+    ],
+    dtype=np.float32,
+)
+IN_RGB_FLOAT = np.array(
+    [
+        [
+            [0.23317624, 0.39086635, 0.12795302],
+            [0.40659714, 0.9079258, 0.28431135],
+            [0.91651599, 0.46082205, 0.16928465],
+            [0.29368765, 0.97987488, 0.72257988],
+        ],
+        [
+            [np.nan, 0.72908475, 0.54018012],
+            [0.91277435, 0.2842577, 0.73481915],
+            [0.33844504, 0.22060913, 0.9802894],
+            [0.13995676, 0.34752838, 0.39652277],
+        ],
+        [
+            [0.85315026, 0.19330797, 0.0],
+            [0.48584232, 0.04943356, 0.59906953],
+            [np.inf, 0.32614581, 0.1483722],
+            [0.37340863, 0.35432855, 0.08973532],
+        ],
+        [
+            [0.69666134, 0.52481322, 0.49057305],
+            [0.93366339, 0.1428689, 0.6845513],
+            [0.27681383, 0.69472673, 0.06750892],
+            [0.26349886, 0.25841691, 0.86171104],
+        ],
+    ]
+)
+IN_RGBA_FLOAT = np.array(
+    [
+        [
+            [0.97383172, 0.62680971, 0.02285016, np.nan],
+            [0.85295433, 0.93014834, 0.59482999, np.inf],
+            [0.4017482, 0.79809183, 0.22407464, 0.17327807],
+            [0.95953263, 0.69535086, 0.28846483, 0.76970823],
+        ],
+        [
+            [0.11487603, 0.7447609, 0.06767498, 0.98054729],
+            [0.66071068, 0.73931366, 0.33155686, 0.81827122],
+            [0.78035892, 0.52920802, 0.5671388, 0.31783899],
+            [0.81709002, 0.82204682, 0.82584029, 0.49434749],
+        ],
+        [
+            [0.03142089, 0.8322058, 0.31646922, 0.94636969],
+            [0.62381573, 0.60052138, 0.50244611, 0.92886007],
+            [np.nan, np.nan, 0.02940048, 0.52529675],
+            [0.9786162, 0.54928697, 0.2409731, 0.34705397],
+        ],
+        [
+            [0.68922233, np.inf, 0.85027734, 0.35388624],
+            [0.16489042, 0.29860162, 0.09349833, 0.67714667],
+            [0.25351483, 0.25596098, 0.80461891, 0.99952403],
+            [0.0, 1.0, 0.58084746, 0.46211944],
+        ],
+    ]
+)
+INPUTS: dict[tuple[npt.DTypeLike, str], np.ndarray] = {
+    (np.uint8, "2D"): IN_2D_INT8,
+    (np.uint8, "RGB"): IN_RGB_INT8,
+    (np.uint8, "RGBA"): IN_RGBA_INT8,
+    (np.uint16, "2D"): IN_2D_INT16,
+    (np.uint16, "RGB"): IN_RGB_INT16,
+    (np.uint16, "RGBA"): IN_RGBA_INT16,
+    (np.float32, "2D"): IN_2D_FLOAT,
+    (np.float32, "RGB"): IN_RGB_FLOAT,
+    (np.float32, "RGBA"): IN_RGBA_FLOAT,
+}
+LUT8 = np.zeros((255,), dtype=np.uint8)
+LUT8[::2] = 255
+LUT16 = np.zeros((65535,), dtype=np.uint8)
+LUT16[::3] = 255
+LUTS: dict[npt.DTypeLike, np.ndarray] = {
+    np.uint8: LUT8,
+    np.uint16: LUT16,
+}
+LEVELS = {
+    "SIMPLE": (0, 1),
+    "RGB": ((0, 255), (1, 250), (100, 160)),
+    "RGBA": ((255, 11111), (100, 10000), (0, 255), (127, 255)),
+}
+
+EXPECTED_OUTPUTS: dict[
+    tuple[npt.DTypeLike, str, Optional[str], Optional[npt.DTypeLike], Optional[int], bool],
+    Union[type(Exception), np.ndarray]
+] = {
+    (np.uint8, "2D", None, None, None, True): np.array(
+        [
+            [[173, 173, 173, 255], [48, 48, 48, 255], [122, 122, 122, 255], [41, 41, 41, 255]],
+            [[210, 210, 210, 255], [192, 192, 192, 255], [0, 0, 0, 255], [5, 5, 5, 255]],
+            [[104, 104, 104, 255], [56, 56, 56, 255], [102, 102, 102, 255], [115, 115, 115, 255]],
+            [[78, 78, 78, 255], [19, 19, 19, 255], [255, 255, 255, 255], [6, 6, 6, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, None, None, False): np.array(
+        [
+            [[173, 173, 173, 255], [48, 48, 48, 255], [122, 122, 122, 255], [41, 41, 41, 255]],
+            [[210, 210, 210, 255], [192, 192, 192, 255], [0, 0, 0, 255], [5, 5, 5, 255]],
+            [[104, 104, 104, 255], [56, 56, 56, 255], [102, 102, 102, 255], [115, 115, 115, 255]],
+            [[78, 78, 78, 255], [19, 19, 19, 255], [255, 255, 255, 255], [6, 6, 6, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, None, 232, True): np.array(
+        [
+            [[157, 157, 157, 255], [43, 43, 43, 255], [110, 110, 110, 255], [37, 37, 37, 255]],
+            [[191, 191, 191, 255], [174, 174, 174, 255], [0, 0, 0, 255], [4, 4, 4, 255]],
+            [[94, 94, 94, 255], [50, 50, 50, 255], [92, 92, 92, 255], [104, 104, 104, 255]],
+            [[70, 70, 70, 255], [17, 17, 17, 255], [232, 232, 232, 255], [5, 5, 5, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, None, 232, False): np.array(
+        [
+            [[157, 157, 157, 255], [43, 43, 43, 255], [110, 110, 110, 255], [37, 37, 37, 255]],
+            [[191, 191, 191, 255], [174, 174, 174, 255], [0, 0, 0, 255], [4, 4, 4, 255]],
+            [[94, 94, 94, 255], [50, 50, 50, 255], [92, 92, 92, 255], [104, 104, 104, 255]],
+            [[70, 70, 70, 255], [17, 17, 17, 255], [232, 232, 232, 255], [5, 5, 5, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint8, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint8, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint8, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint8, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", None, np.uint16, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGB", None, None, True): Exception,
+    (np.uint8, "2D", "RGB", None, None, False): Exception,
+    (np.uint8, "2D", "RGB", None, 232, True): Exception,
+    (np.uint8, "2D", "RGB", None, 232, False): Exception,
+    (np.uint8, "2D", "RGB", None, 13333, True): Exception,
+    (np.uint8, "2D", "RGB", None, 13333, False): Exception,
+    (np.uint8, "2D", "RGB", np.uint8, None, True): Exception,
+    (np.uint8, "2D", "RGB", np.uint8, None, False): Exception,
+    (np.uint8, "2D", "RGB", np.uint8, 232, True): Exception,
+    (np.uint8, "2D", "RGB", np.uint8, 232, False): Exception,
+    (np.uint8, "2D", "RGB", np.uint8, 13333, True): Exception,
+    (np.uint8, "2D", "RGB", np.uint8, 13333, False): Exception,
+    (np.uint8, "2D", "RGB", np.uint16, None, True): Exception,
+    (np.uint8, "2D", "RGB", np.uint16, None, False): Exception,
+    (np.uint8, "2D", "RGB", np.uint16, 232, True): Exception,
+    (np.uint8, "2D", "RGB", np.uint16, 232, False): Exception,
+    (np.uint8, "2D", "RGB", np.uint16, 13333, True): Exception,
+    (np.uint8, "2D", "RGB", np.uint16, 13333, False): Exception,
+    (np.uint8, "2D", "RGBA", None, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [122, 122, 122, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [102, 102, 102, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", None, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [122, 122, 122, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [102, 102, 102, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", None, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [110, 110, 110, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [92, 92, 92, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [232, 232, 232, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", None, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [110, 110, 110, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [92, 92, 92, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [232, 232, 232, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", None, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [123, 123, 123, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", None, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [123, 123, 123, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint16, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint16, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint16, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "2D", "RGBA", np.uint16, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, None, None, True): np.array(
+        [
+            [[16, 69, 62, 255], [66, 132, 135, 255], [220, 80, 36, 255], [53, 34, 68, 255]],
+            [[140, 23, 113, 255], [0, 63, 206, 255], [96, 255, 100, 255], [226, 182, 155, 255]],
+            [[28, 237, 223, 255], [215, 232, 209, 255], [17, 16, 50, 255], [96, 187, 93, 255]],
+            [[220, 193, 232, 255], [134, 168, 150, 255], [55, 64, 221, 255], [96, 108, 227, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, None, None, False): np.array(
+        [
+            [[62, 69, 16, 255], [135, 132, 66, 255], [36, 80, 220, 255], [68, 34, 53, 255]],
+            [[113, 23, 140, 255], [206, 63, 0, 255], [100, 255, 96, 255], [155, 182, 226, 255]],
+            [[223, 237, 28, 255], [209, 232, 215, 255], [50, 16, 17, 255], [93, 187, 96, 255]],
+            [[232, 193, 220, 255], [150, 168, 134, 255], [221, 64, 55, 255], [227, 108, 96, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, None, 232, True): np.array(
+        [
+            [[14, 62, 56, 255], [60, 120, 122, 255], [200, 72, 32, 255], [48, 30, 61, 255]],
+            [[127, 20, 102, 255], [0, 57, 187, 255], [87, 232, 90, 255], [205, 165, 141, 255]],
+            [[25, 215, 202, 255], [195, 211, 190, 255], [15, 14, 45, 255], [87, 170, 84, 255]],
+            [[200, 175, 211, 255], [121, 152, 136, 255], [50, 58, 201, 255], [87, 98, 206, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, None, 232, False): np.array(
+        [
+            [[56, 62, 14, 255], [122, 120, 60, 255], [32, 72, 200, 255], [61, 30, 48, 255]],
+            [[102, 20, 127, 255], [187, 57, 0, 255], [90, 232, 87, 255], [141, 165, 205, 255]],
+            [[202, 215, 25, 255], [190, 211, 195, 255], [45, 14, 15, 255], [84, 170, 87, 255]],
+            [[211, 175, 200, 255], [136, 152, 121, 255], [201, 58, 50, 255], [206, 98, 87, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint8, None, True): np.array(
+        [
+            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[255, 0, 0, 255], [0, 255, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255]],
+            [[255, 0, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint8, None, False): np.array(
+        [
+            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[0, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 0, 255, 255], [0, 255, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255]],
+            [[255, 0, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[0, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
+            [[255, 0, 0, 255], [0, 255, 255, 255], [255, 255, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 0, 255], [0, 0, 255, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
+            [[255, 0, 0, 255], [255, 0, 0, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
+            [[0, 0, 255, 255], [255, 255, 0, 255], [0, 255, 255, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint16, None, True): np.array(
+        [
+            [[0, 255, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint16, None, False): np.array(
+        [
+            [[0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
+            [[0, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255], [0, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
+            [[255, 0, 0, 255], [0, 255, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255]],
+            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 0, 255]],
+            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 0, 255]],
+            [[255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", None, np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 0, 255]],
+            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 255, 0, 255]],
+            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255], [0, 255, 255, 255]],
+            [[0, 0, 255, 255], [255, 255, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 255, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", None, None, True): np.array(
+        [
+            [[16, 69, 0, 255], [66, 134, 148, 255], [220, 80, 0, 255], [53, 33, 0, 255]],
+            [[140, 22, 55, 255], [0, 63, 255, 255], [96, 255, 0, 255], [226, 185, 233, 255]],
+            [[28, 241, 255, 255], [215, 236, 255, 255], [17, 15, 0, 255], [96, 190, 0, 255]],
+            [[220, 196, 255, 255], [134, 171, 212, 255], [55, 64, 255, 255], [96, 109, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", None, None, False): np.array(
+        [
+            [[0, 69, 16, 255], [148, 134, 66, 255], [0, 80, 220, 255], [0, 33, 53, 255]],
+            [[55, 22, 140, 255], [255, 63, 0, 255], [0, 255, 96, 255], [233, 185, 226, 255]],
+            [[255, 241, 28, 255], [255, 236, 215, 255], [0, 15, 17, 255], [0, 190, 96, 255]],
+            [[255, 196, 220, 255], [212, 171, 134, 255], [255, 64, 55, 255], [255, 109, 96, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", None, 232, True): np.array(
+        [
+            [[14, 63, 0, 255], [60, 122, 135, 255], [200, 73, 0, 255], [48, 30, 0, 255]],
+            [[127, 20, 50, 255], [0, 57, 255, 255], [87, 236, 0, 255], [205, 168, 212, 255]],
+            [[25, 219, 255, 255], [195, 215, 255, 255], [15, 13, 0, 255], [87, 173, 0, 255]],
+            [[200, 178, 255, 255], [121, 155, 193, 255], [50, 58, 255, 255], [87, 99, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", None, 232, False): np.array(
+        [
+            [[0, 63, 14, 255], [135, 122, 60, 255], [0, 73, 200, 255], [0, 30, 48, 255]],
+            [[50, 20, 127, 255], [255, 57, 0, 255], [0, 236, 87, 255], [212, 168, 205, 255]],
+            [[255, 219, 25, 255], [255, 215, 195, 255], [0, 13, 15, 255], [0, 173, 87, 255]],
+            [[255, 178, 200, 255], [193, 155, 121, 255], [255, 58, 50, 255], [255, 99, 87, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", None, 13333, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", None, 13333, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint8, None, True): np.array(
+        [
+            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
+            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
+            [[255, 0, 255, 255], [0, 255, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint8, None, False): np.array(
+        [
+            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
+            [[0, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
+            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint8, 232, True): np.array(
+        [
+            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[0, 255, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint8, 232, False): np.array(
+        [
+            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 255, 255], [255, 0, 0, 255], [0, 0, 255, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint16, None, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 255, 255], [255, 0, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [0, 255, 255, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint16, 232, True): np.array(
+        [
+            [[0, 255, 255, 255], [255, 0, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
+            [[0, 255, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
+            [[0, 255, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGB", np.uint16, 13333, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[0, 0, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGB", "RGBA", None, None, True): Exception,
+    (np.uint8, "RGB", "RGBA", None, None, False): Exception,
+    (np.uint8, "RGB", "RGBA", None, 232, True): Exception,
+    (np.uint8, "RGB", "RGBA", None, 232, False): Exception,
+    (np.uint8, "RGB", "RGBA", None, 13333, True): Exception,
+    (np.uint8, "RGB", "RGBA", None, 13333, False): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint8, None, True): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint8, None, False): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint8, 232, True): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint8, 232, False): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint8, 13333, True): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint8, 13333, False): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint16, None, True): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint16, None, False): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint16, 232, True): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint16, 232, False): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint16, 13333, True): Exception,
+    (np.uint8, "RGB", "RGBA", np.uint16, 13333, False): Exception,
+    (np.uint8, "RGBA", None, None, None, True): np.array(
+        [
+            [[151, 252, 73, 107], [28, 221, 35, 0], [87, 122, 126, 114], [47, 59, 24, 200]],
+            [[189, 246, 242, 255], [123, 255, 29, 14], [201, 208, 133, 32], [118, 203, 141, 245]],
+            [[133, 131, 248, 81], [4, 84, 99, 40], [40, 167, 119, 150], [13, 158, 108, 21]],
+            [[156, 221, 166, 250], [77, 188, 13, 166], [0, 1, 185, 25], [83, 35, 103, 120]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, None, None, False): np.array(
+        [
+            [[73, 252, 151, 107], [35, 221, 28, 0], [126, 122, 87, 114], [24, 59, 47, 200]],
+            [[242, 246, 189, 255], [29, 255, 123, 14], [133, 208, 201, 32], [141, 203, 118, 245]],
+            [[248, 131, 133, 81], [99, 84, 4, 40], [119, 167, 40, 150], [108, 158, 13, 21]],
+            [[166, 221, 156, 250], [13, 188, 77, 166], [185, 1, 0, 25], [103, 35, 83, 120]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, None, 232, True): np.array(
+        [
+            [[137, 229, 66, 97], [25, 201, 31, 0], [79, 110, 114, 103], [42, 53, 21, 181]],
+            [[171, 223, 220, 232], [111, 232, 26, 12], [182, 189, 121, 29], [107, 184, 128, 222]],
+            [[121, 119, 225, 73], [3, 76, 90, 36], [36, 151, 108, 136], [11, 143, 98, 19]],
+            [[141, 201, 151, 227], [70, 171, 11, 151], [0, 0, 168, 22], [75, 31, 93, 109]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, None, 232, False): np.array(
+        [
+            [[66, 229, 137, 97], [31, 201, 25, 0], [114, 110, 79, 103], [21, 53, 42, 181]],
+            [[220, 223, 171, 232], [26, 232, 111, 12], [121, 189, 182, 29], [128, 184, 107, 222]],
+            [[225, 119, 121, 73], [90, 76, 3, 36], [108, 151, 36, 136], [98, 143, 11, 19]],
+            [[151, 201, 141, 227], [11, 171, 70, 151], [168, 0, 0, 22], [93, 31, 75, 109]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [209, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 52, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 209, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 52, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint8, None, True): np.array(
+        [
+            [[0, 255, 0, 0], [255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 0, 255], [0, 255, 0, 255], [255, 0, 0, 0]],
+            [[0, 0, 255, 0], [255, 255, 0, 255], [255, 0, 0, 255], [0, 255, 255, 0]],
+            [[255, 0, 255, 255], [0, 255, 0, 255], [255, 0, 0, 0], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint8, None, False): np.array(
+        [
+            [[0, 255, 0, 0], [0, 0, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
+            [[255, 255, 0, 255], [0, 255, 0, 255], [0, 255, 0, 255], [0, 0, 255, 0]],
+            [[255, 0, 0, 0], [0, 255, 255, 255], [0, 0, 255, 255], [255, 255, 0, 0]],
+            [[255, 0, 255, 255], [0, 255, 0, 255], [0, 0, 255, 0], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint8, 232, True): np.array(
+        [
+            [[0, 0, 255, 0], [0, 0, 0, 255], [0, 255, 255, 0], [255, 0, 0, 0]],
+            [[0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 0, 0], [0, 255, 255, 255]],
+            [[0, 0, 0, 0], [0, 255, 255, 255], [255, 0, 255, 255], [0, 0, 255, 0]],
+            [[0, 0, 0, 0], [255, 0, 0, 0], [255, 255, 255, 255], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint8, 232, False): np.array(
+        [
+            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 255, 0, 0], [0, 0, 255, 0]],
+            [[255, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 0], [255, 255, 0, 255]],
+            [[0, 0, 0, 0], [255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 255, 0], [255, 255, 255, 255], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint16, None, True): np.array(
+        [
+            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 0]],
+            [[255, 255, 0, 0], [255, 0, 0, 0], [255, 0, 0, 0], [0, 0, 255, 0]],
+            [[0, 0, 0, 255], [0, 255, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255]],
+            [[255, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint16, None, False): np.array(
+        [
+            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 0]],
+            [[0, 255, 255, 0], [0, 0, 255, 0], [0, 0, 255, 0], [255, 0, 0, 0]],
+            [[0, 0, 0, 255], [255, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 255, 0], [0, 255, 0, 255], [0, 0, 255, 0], [255, 0, 255, 0]],
+            [[255, 0, 0, 0], [255, 0, 0, 255], [0, 255, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 255, 0], [255, 0, 255, 255], [255, 0, 255, 0], [0, 0, 0, 0]],
+            [[255, 255, 0, 0], [0, 255, 0, 0], [255, 255, 255, 0], [255, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint16, 232, False): np.array(
+        [
+            [[255, 0, 0, 0], [0, 255, 0, 255], [255, 0, 0, 0], [255, 0, 255, 0]],
+            [[0, 0, 255, 0], [0, 0, 255, 255], [0, 255, 0, 0], [0, 0, 0, 255]],
+            [[255, 0, 0, 0], [255, 0, 255, 255], [255, 0, 255, 0], [0, 0, 0, 0]],
+            [[0, 255, 255, 0], [0, 255, 0, 0], [255, 255, 255, 0], [255, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint16, 13333, True): np.array(
+        [
+            [[0, 255, 255, 0], [255, 0, 255, 255], [255, 255, 255, 0], [255, 255, 255, 0]],
+            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 255, 255, 0], [0, 255, 0, 255]],
+            [[255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 255, 255], [255, 0, 0, 255], [255, 0, 255, 0], [0, 255, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", None, np.uint16, 13333, False): np.array(
+        [
+            [[255, 255, 0, 0], [255, 0, 255, 255], [255, 255, 255, 0], [255, 255, 255, 0]],
+            [[0, 0, 255, 0], [0, 0, 0, 255], [255, 255, 255, 0], [0, 255, 0, 255]],
+            [[255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
+            [[255, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 0], [255, 255, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 232, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 232, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 0]],
+            [[255, 255, 0, 255], [255, 255, 0, 0], [255, 0, 0, 0], [0, 0, 255, 0]],
+            [[0, 0, 0, 255], [0, 255, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255]],
+            [[255, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 0]],
+            [[0, 255, 255, 255], [0, 255, 255, 0], [0, 0, 255, 0], [255, 0, 0, 0]],
+            [[0, 0, 0, 255], [255, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGB", None, None, True): Exception,
+    (np.uint8, "RGBA", "RGB", None, None, False): Exception,
+    (np.uint8, "RGBA", "RGB", None, 232, True): Exception,
+    (np.uint8, "RGBA", "RGB", None, 232, False): Exception,
+    (np.uint8, "RGBA", "RGB", None, 13333, True): Exception,
+    (np.uint8, "RGBA", "RGB", None, 13333, False): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint8, None, True): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint8, None, False): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint8, 232, True): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint8, 232, False): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint8, 13333, True): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint8, 13333, False): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint16, None, True): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint16, None, False): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint16, 232, True): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint16, 232, False): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint16, 13333, True): Exception,
+    (np.uint8, "RGBA", "RGB", np.uint16, 13333, False): Exception,
+    (np.uint8, "RGBA", "RGBA", None, None, True): np.array(
+        [
+            [[0, 3, 73, 0], [0, 3, 35, 0], [0, 0, 126, 0], [0, 0, 24, 145]],
+            [[0, 3, 242, 255], [0, 3, 29, 0], [0, 2, 133, 0], [0, 2, 141, 235]],
+            [[0, 0, 248, 0], [0, 0, 99, 0], [0, 1, 119, 45], [0, 1, 108, 0]],
+            [[0, 3, 166, 245], [0, 2, 13, 77], [0, 0, 185, 0], [0, 0, 103, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", None, None, False): np.array(
+        [
+            [[73, 3, 0, 0], [35, 3, 0, 0], [126, 0, 0, 0], [24, 0, 0, 145]],
+            [[242, 3, 0, 255], [29, 3, 0, 0], [133, 2, 0, 0], [141, 2, 0, 235]],
+            [[248, 0, 0, 0], [99, 0, 0, 0], [119, 1, 0, 45], [108, 1, 0, 0]],
+            [[166, 3, 0, 245], [13, 2, 0, 77], [185, 0, 0, 0], [103, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", None, 232, True): np.array(
+        [
+            [[0, 3, 66, 0], [0, 2, 31, 0], [0, 0, 114, 0], [0, 0, 21, 132]],
+            [[0, 3, 220, 232], [0, 3, 26, 0], [0, 2, 121, 0], [0, 2, 128, 213]],
+            [[0, 0, 225, 0], [0, 0, 90, 0], [0, 1, 108, 41], [0, 1, 98, 0]],
+            [[0, 2, 151, 222], [0, 2, 11, 70], [0, 0, 168, 0], [0, 0, 93, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", None, 232, False): np.array(
+        [
+            [[66, 3, 0, 0], [31, 2, 0, 0], [114, 0, 0, 0], [21, 0, 0, 132]],
+            [[220, 3, 0, 232], [26, 3, 0, 0], [121, 2, 0, 0], [128, 2, 0, 213]],
+            [[225, 0, 0, 0], [90, 0, 0, 0], [108, 1, 0, 41], [98, 1, 0, 0]],
+            [[151, 2, 0, 222], [11, 2, 0, 70], [168, 0, 0, 0], [93, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", None, 13333, True): np.array(
+        [
+            [[0, 204, 255, 0], [0, 162, 255, 0], [0, 29, 255, 0], [0, 0, 255, 255]],
+            [[0, 196, 255, 255], [0, 208, 255, 0], [0, 145, 255, 0], [0, 138, 255, 255]],
+            [[0, 41, 255, 0], [0, 0, 255, 0], [0, 90, 255, 255], [0, 78, 255, 0]],
+            [[0, 162, 255, 255], [0, 118, 255, 255], [0, 0, 255, 0], [0, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", None, 13333, False): np.array(
+        [
+            [[255, 204, 0, 0], [255, 162, 0, 0], [255, 29, 0, 0], [255, 0, 0, 255]],
+            [[255, 196, 0, 255], [255, 208, 0, 0], [255, 145, 0, 0], [255, 138, 0, 255]],
+            [[255, 41, 0, 0], [255, 0, 0, 0], [255, 90, 0, 255], [255, 78, 0, 0]],
+            [[255, 162, 0, 255], [255, 118, 0, 255], [255, 0, 0, 0], [255, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint8, None, True): np.array(
+        [
+            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0]],
+            [[255, 0, 255, 255], [255, 0, 0, 255], [255, 255, 0, 255], [255, 255, 0, 0]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 0, 0, 0], [255, 0, 255, 255]],
+            [[255, 0, 255, 0], [255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint8, None, False): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0]],
+            [[255, 0, 255, 255], [0, 0, 255, 255], [0, 255, 255, 255], [0, 255, 255, 0]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 0, 255, 0], [255, 0, 255, 255]],
+            [[255, 0, 255, 0], [0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint8, 232, True): np.array(
+        [
+            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 0]],
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 0, 255, 0], [255, 0, 255, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint8, 232, False): np.array(
+        [
+            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 0, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 0]],
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 0], [255, 0, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint16, None, True): np.array(
+        [
+            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
+            [[255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 255, 0]],
+            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
+            [[255, 0, 0, 0], [255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
+            [[0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 0]],
+            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 0, 255, 0], [0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint16, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 0, 0], [255, 255, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 0], [255, 0, 0, 255]],
+            [[255, 0, 0, 255], [255, 0, 0, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 255, 255, 0], [0, 255, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 0], [0, 0, 255, 255]],
+            [[0, 0, 255, 255], [0, 0, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
+            [[255, 0, 0, 0], [255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 0, 255]],
+            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint8, "RGBA", "RGBA", np.uint16, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
+            [[0, 0, 255, 0], [0, 0, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255]],
+            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [0, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, None, None, True): np.array(
+        [
+            [[52, 52, 52, 255], [214, 214, 214, 255], [158, 158, 158, 255], [159, 159, 159, 255]],
+            [[224, 224, 224, 255], [133, 133, 133, 255], [132, 132, 132, 255], [0, 0, 0, 255]],
+            [[39, 39, 39, 255], [221, 221, 221, 255], [162, 162, 162, 255], [83, 83, 83, 255]],
+            [[57, 57, 57, 255], [255, 255, 255, 255], [187, 187, 187, 255], [44, 44, 44, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, None, None, False): np.array(
+        [
+            [[52, 52, 52, 255], [214, 214, 214, 255], [158, 158, 158, 255], [159, 159, 159, 255]],
+            [[224, 224, 224, 255], [133, 133, 133, 255], [132, 132, 132, 255], [0, 0, 0, 255]],
+            [[39, 39, 39, 255], [221, 221, 221, 255], [162, 162, 162, 255], [83, 83, 83, 255]],
+            [[57, 57, 57, 255], [255, 255, 255, 255], [187, 187, 187, 255], [44, 44, 44, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, None, 232, True): np.array(
+        [
+            [[47, 47, 47, 255], [194, 194, 194, 255], [144, 144, 144, 255], [144, 144, 144, 255]],
+            [[203, 203, 203, 255], [121, 121, 121, 255], [120, 120, 120, 255], [0, 0, 0, 255]],
+            [[35, 35, 35, 255], [201, 201, 201, 255], [148, 148, 148, 255], [76, 76, 76, 255]],
+            [[52, 52, 52, 255], [232, 232, 232, 255], [170, 170, 170, 255], [40, 40, 40, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, None, 232, False): np.array(
+        [
+            [[47, 47, 47, 255], [194, 194, 194, 255], [144, 144, 144, 255], [144, 144, 144, 255]],
+            [[203, 203, 203, 255], [121, 121, 121, 255], [120, 120, 120, 255], [0, 0, 0, 255]],
+            [[35, 35, 35, 255], [201, 201, 201, 255], [148, 148, 148, 255], [76, 76, 76, 255]],
+            [[52, 52, 52, 255], [232, 232, 232, 255], [170, 170, 170, 255], [40, 40, 40, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint8, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint8, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", None, np.uint16, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGB", None, None, True): Exception,
+    (np.uint16, "2D", "RGB", None, None, False): Exception,
+    (np.uint16, "2D", "RGB", None, 232, True): Exception,
+    (np.uint16, "2D", "RGB", None, 232, False): Exception,
+    (np.uint16, "2D", "RGB", None, 13333, True): Exception,
+    (np.uint16, "2D", "RGB", None, 13333, False): Exception,
+    (np.uint16, "2D", "RGB", np.uint8, None, True): Exception,
+    (np.uint16, "2D", "RGB", np.uint8, None, False): Exception,
+    (np.uint16, "2D", "RGB", np.uint8, 232, True): Exception,
+    (np.uint16, "2D", "RGB", np.uint8, 232, False): Exception,
+    (np.uint16, "2D", "RGB", np.uint8, 13333, True): Exception,
+    (np.uint16, "2D", "RGB", np.uint8, 13333, False): Exception,
+    (np.uint16, "2D", "RGB", np.uint16, None, True): Exception,
+    (np.uint16, "2D", "RGB", np.uint16, None, False): Exception,
+    (np.uint16, "2D", "RGB", np.uint16, 232, True): Exception,
+    (np.uint16, "2D", "RGB", np.uint16, 232, False): Exception,
+    (np.uint16, "2D", "RGB", np.uint16, 13333, True): Exception,
+    (np.uint16, "2D", "RGB", np.uint16, 13333, False): Exception,
+    (np.uint16, "2D", "RGBA", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[231, 231, 231, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[231, 231, 231, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[210, 210, 210, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[210, 210, 210, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "2D", "RGBA", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, None, None, True): np.array(
+        [
+            [[216, 176, 0, 255], [75, 152, 141, 255], [129, 33, 221, 255], [146, 121, 149, 255]],
+            [[229, 63, 143, 255], [38, 93, 48, 255], [64, 185, 70, 255], [66, 152, 233, 255]],
+            [[170, 192, 38, 255], [139, 15, 154, 255], [208, 226, 113, 255], [208, 15, 137, 255]],
+            [[62, 84, 176, 255], [255, 183, 202, 255], [24, 134, 77, 255], [168, 145, 136, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, None, None, False): np.array(
+        [
+            [[0, 176, 216, 255], [141, 152, 75, 255], [221, 33, 129, 255], [149, 121, 146, 255]],
+            [[143, 63, 229, 255], [48, 93, 38, 255], [70, 185, 64, 255], [233, 152, 66, 255]],
+            [[38, 192, 170, 255], [154, 15, 139, 255], [113, 226, 208, 255], [137, 15, 208, 255]],
+            [[176, 84, 62, 255], [202, 183, 255, 255], [77, 134, 24, 255], [136, 145, 168, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, None, 232, True): np.array(
+        [
+            [[196, 160, 0, 255], [68, 138, 128, 255], [117, 30, 201, 255], [133, 110, 135, 255]],
+            [[208, 58, 130, 255], [35, 84, 43, 255], [58, 168, 64, 255], [60, 139, 212, 255]],
+            [[154, 175, 34, 255], [127, 13, 140, 255], [189, 205, 103, 255], [189, 14, 124, 255]],
+            [[56, 76, 160, 255], [232, 166, 184, 255], [22, 122, 70, 255], [153, 132, 124, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, None, 232, False): np.array(
+        [
+            [[0, 160, 196, 255], [128, 138, 68, 255], [201, 30, 117, 255], [135, 110, 133, 255]],
+            [[130, 58, 208, 255], [43, 84, 35, 255], [64, 168, 58, 255], [212, 139, 60, 255]],
+            [[34, 175, 154, 255], [140, 13, 127, 255], [103, 205, 189, 255], [124, 14, 189, 255]],
+            [[160, 76, 56, 255], [184, 166, 232, 255], [70, 122, 22, 255], [124, 132, 153, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, None, 13333, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, None, 13333, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
+            [[255, 255, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [0, 255, 0, 255]],
+            [[255, 255, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
+            [[255, 0, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [0, 255, 0, 255]],
+            [[255, 255, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
+            [[255, 0, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint16, None, True): np.array(
+        [
+            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
+            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint16, None, False): np.array(
+        [
+            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
+            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 255, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint16, 232, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", None, np.uint16, 13333, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
+            [[0, 255, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 255, 255, 255], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", None, None, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", None, 232, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", None, None, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", None, None, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", None, 232, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", None, 232, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", None, 13333, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", None, 13333, False): np.array(
+        [
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint16, None, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint16, 232, True): np.array(
+        [
+            [[0, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 255, 255, 255], [0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGB", np.uint16, 13333, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGB", "RGBA", None, None, True): Exception,
+    (np.uint16, "RGB", "RGBA", None, None, False): Exception,
+    (np.uint16, "RGB", "RGBA", None, 232, True): Exception,
+    (np.uint16, "RGB", "RGBA", None, 232, False): Exception,
+    (np.uint16, "RGB", "RGBA", None, 13333, True): Exception,
+    (np.uint16, "RGB", "RGBA", None, 13333, False): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint8, None, True): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint8, None, False): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint8, 232, True): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint8, 232, False): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint8, 13333, True): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint8, 13333, False): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint16, None, True): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint16, None, False): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint16, 232, True): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint16, 232, False): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint16, 13333, True): Exception,
+    (np.uint16, "RGB", "RGBA", np.uint16, 13333, False): Exception,
+    (np.uint16, "RGBA", None, None, None, True): np.array(
+        [
+            [[50, 158, 115, 181], [0, 142, 130, 220], [188, 89, 183, 104], [223, 47, 120, 45]],
+            [[18, 160, 124, 98], [108, 253, 233, 185], [34, 71, 19, 189], [255, 100, 106, 67]],
+            [[202, 255, 158, 255], [0, 224, 107, 164], [195, 136, 74, 247], [68, 21, 140, 187]],
+            [[239, 107, 145, 28], [212, 155, 227, 49], [81, 220, 126, 0], [52, 57, 229, 189]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, None, None, False): np.array(
+        [
+            [[115, 158, 50, 181], [130, 142, 0, 220], [183, 89, 188, 104], [120, 47, 223, 45]],
+            [[124, 160, 18, 98], [233, 253, 108, 185], [19, 71, 34, 189], [106, 100, 255, 67]],
+            [[158, 255, 202, 255], [107, 224, 0, 164], [74, 136, 195, 247], [140, 21, 68, 187]],
+            [[145, 107, 239, 28], [227, 155, 212, 49], [126, 220, 81, 0], [229, 57, 52, 189]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, None, 232, True): np.array(
+        [
+            [[46, 144, 104, 165], [0, 129, 118, 200], [171, 81, 167, 94], [202, 43, 109, 41]],
+            [[17, 145, 113, 89], [98, 230, 212, 169], [31, 64, 17, 172], [232, 91, 96, 61]],
+            [[184, 232, 144, 232], [0, 204, 98, 149], [177, 124, 68, 225], [62, 19, 128, 170]],
+            [[218, 98, 132, 25], [193, 141, 206, 45], [73, 200, 114, 0], [47, 51, 208, 172]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, None, 232, False): np.array(
+        [
+            [[104, 144, 46, 165], [118, 129, 0, 200], [167, 81, 171, 94], [109, 43, 202, 41]],
+            [[113, 145, 17, 89], [212, 230, 98, 169], [17, 64, 31, 172], [96, 91, 232, 61]],
+            [[144, 232, 184, 232], [98, 204, 0, 149], [68, 124, 177, 225], [128, 19, 62, 170]],
+            [[132, 98, 218, 25], [206, 141, 193, 45], [114, 200, 73, 0], [208, 51, 47, 172]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [6, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 17], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 6, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 17], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint8, None, True): np.array(
+        [
+            [[255, 255, 0, 0], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 255, 0]],
+            [[255, 255, 255, 255], [255, 0, 0, 0], [255, 0, 0, 0], [255, 255, 255, 0]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [0, 255, 255, 0], [255, 0, 255, 0]],
+            [[0, 0, 0, 255], [255, 0, 0, 0], [0, 255, 255, 255], [255, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint8, None, False): np.array(
+        [
+            [[0, 255, 255, 0], [255, 255, 255, 255], [0, 0, 255, 255], [255, 0, 0, 0]],
+            [[255, 255, 255, 255], [0, 0, 255, 0], [0, 0, 255, 0], [255, 255, 255, 0]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 0, 0], [255, 0, 255, 0]],
+            [[0, 0, 0, 255], [0, 0, 255, 0], [255, 255, 0, 255], [0, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 0, 255, 255], [0, 0, 0, 255], [255, 0, 0, 0]],
+            [[0, 0, 0, 0], [255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 0]],
+            [[255, 255, 255, 255], [255, 255, 255, 0], [0, 255, 255, 0], [255, 0, 255, 255]],
+            [[255, 255, 255, 0], [0, 0, 255, 0], [0, 255, 255, 255], [0, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 0, 255, 255], [0, 0, 0, 255], [0, 0, 255, 0]],
+            [[0, 0, 0, 0], [255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 0]],
+            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 0, 0], [255, 0, 255, 255]],
+            [[255, 255, 255, 0], [255, 0, 0, 0], [255, 255, 0, 255], [255, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 0], [255, 0, 255, 255]],
+            [[255, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 255, 0, 0]],
+            [[255, 0, 255, 0], [255, 255, 255, 0], [0, 255, 0, 0], [0, 0, 255, 255]],
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 255, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 0], [255, 0, 255, 255]],
+            [[0, 255, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 255, 0, 0]],
+            [[255, 0, 255, 0], [255, 255, 255, 0], [0, 255, 0, 0], [255, 0, 0, 255]],
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 255, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint16, 232, True): np.array(
+        [
+            [[0, 255, 0, 255], [255, 255, 0, 0], [255, 255, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0]],
+            [[0, 0, 255, 0], [255, 255, 0, 0], [255, 0, 0, 255], [0, 0, 0, 0]],
+            [[0, 0, 255, 0], [0, 255, 0, 255], [0, 0, 255, 255], [0, 255, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint16, 232, False): np.array(
+        [
+            [[0, 255, 0, 255], [0, 255, 255, 0], [0, 255, 255, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0]],
+            [[255, 0, 0, 0], [0, 255, 255, 0], [0, 0, 255, 255], [0, 0, 0, 0]],
+            [[255, 0, 0, 0], [0, 255, 0, 255], [255, 0, 0, 255], [0, 255, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint16, 13333, True): np.array(
+        [
+            [[0, 255, 0, 255], [255, 0, 0, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
+            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 255, 0], [255, 255, 0, 0], [0, 0, 0, 255], [0, 0, 255, 0]],
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", None, np.uint16, 13333, False): np.array(
+        [
+            [[0, 255, 0, 255], [0, 0, 255, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
+            [[255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[255, 0, 0, 0], [0, 255, 255, 0], [0, 0, 0, 255], [255, 0, 0, 0]],
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGB", None, None, True): Exception,
+    (np.uint16, "RGBA", "RGB", None, None, False): Exception,
+    (np.uint16, "RGBA", "RGB", None, 232, True): Exception,
+    (np.uint16, "RGBA", "RGB", None, 232, False): Exception,
+    (np.uint16, "RGBA", "RGB", None, 13333, True): Exception,
+    (np.uint16, "RGBA", "RGB", None, 13333, False): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint8, None, True): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint8, None, False): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint8, 232, True): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint8, 232, False): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint8, 13333, True): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint8, 13333, False): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint16, None, True): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint16, None, False): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint16, 232, True): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint16, 232, False): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint16, 13333, True): Exception,
+    (np.uint16, "RGBA", "RGB", np.uint16, 13333, False): Exception,
+    (np.uint16, "RGBA", "RGBA", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[108, 255, 255, 255], [255, 255, 255, 255], [203, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 139, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 108, 255], [255, 255, 255, 255], [255, 255, 203, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 139, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[98, 255, 255, 255], [255, 255, 255, 255], [184, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 126, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 98, 255], [255, 255, 255, 255], [255, 255, 184, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 126, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint16, 232, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 0, 255, 0], [0, 0, 255, 0], [0, 0, 255, 0]],
+            [[0, 0, 255, 0], [255, 0, 255, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
+            [[0, 255, 0, 0], [255, 0, 0, 0], [0, 255, 0, 0], [255, 255, 255, 0]],
+            [[0, 0, 255, 0], [0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 0, 255, 0], [255, 0, 0, 0], [255, 0, 0, 0]],
+            [[255, 0, 0, 0], [255, 0, 255, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
+            [[0, 255, 0, 0], [0, 0, 255, 0], [0, 255, 0, 0], [255, 255, 255, 0]],
+            [[255, 0, 0, 0], [255, 0, 0, 255], [255, 255, 0, 255], [255, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 0, 0], [255, 0, 0, 0], [0, 255, 0, 0], [0, 255, 0, 0]],
+            [[0, 255, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [255, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.uint16, "RGBA", "RGBA", np.uint16, 13333, False): np.array(
+        [
+            [[0, 255, 255, 0], [0, 0, 255, 0], [0, 255, 0, 0], [0, 255, 0, 0]],
+            [[0, 255, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 255, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [136, 136, 136, 255], [0, 0, 0, 0], [225, 225, 225, 255]],
+            [[216, 216, 216, 255], [224, 224, 224, 255], [255, 255, 255, 255], [16, 16, 16, 255]],
+            [[252, 252, 252, 255], [216, 216, 216, 255], [42, 42, 42, 255], [252, 252, 252, 255]],
+            [[18, 18, 18, 255], [169, 169, 169, 255], [223, 223, 223, 255], [252, 252, 252, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [136, 136, 136, 255], [0, 0, 0, 0], [225, 225, 225, 255]],
+            [[216, 216, 216, 255], [224, 224, 224, 255], [255, 255, 255, 255], [16, 16, 16, 255]],
+            [[252, 252, 252, 255], [216, 216, 216, 255], [42, 42, 42, 255], [252, 252, 252, 255]],
+            [[18, 18, 18, 255], [169, 169, 169, 255], [223, 223, 223, 255], [252, 252, 252, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [124, 124, 124, 255], [0, 0, 0, 0], [205, 205, 205, 255]],
+            [[197, 197, 197, 255], [204, 204, 204, 255], [232, 232, 232, 255], [15, 15, 15, 255]],
+            [[230, 230, 230, 255], [196, 196, 196, 255], [38, 38, 38, 255], [229, 229, 229, 255]],
+            [[16, 16, 16, 255], [153, 153, 153, 255], [203, 203, 203, 255], [229, 229, 229, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [124, 124, 124, 255], [0, 0, 0, 0], [205, 205, 205, 255]],
+            [[197, 197, 197, 255], [204, 204, 204, 255], [232, 232, 232, 255], [15, 15, 15, 255]],
+            [[230, 230, 230, 255], [196, 196, 196, 255], [38, 38, 38, 255], [229, 229, 229, 255]],
+            [[16, 16, 16, 255], [153, 153, 153, 255], [203, 203, 203, 255], [229, 229, 229, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGB", None, None, True): Exception,
+    (np.float32, "2D", "RGB", None, None, False): Exception,
+    (np.float32, "2D", "RGB", None, 232, True): Exception,
+    (np.float32, "2D", "RGB", None, 232, False): Exception,
+    (np.float32, "2D", "RGB", None, 13333, True): Exception,
+    (np.float32, "2D", "RGB", None, 13333, False): Exception,
+    (np.float32, "2D", "RGB", np.uint8, None, True): Exception,
+    (np.float32, "2D", "RGB", np.uint8, None, False): Exception,
+    (np.float32, "2D", "RGB", np.uint8, 232, True): Exception,
+    (np.float32, "2D", "RGB", np.uint8, 232, False): Exception,
+    (np.float32, "2D", "RGB", np.uint8, 13333, True): Exception,
+    (np.float32, "2D", "RGB", np.uint8, 13333, False): Exception,
+    (np.float32, "2D", "RGB", np.uint16, None, True): Exception,
+    (np.float32, "2D", "RGB", np.uint16, None, False): Exception,
+    (np.float32, "2D", "RGB", np.uint16, 232, True): Exception,
+    (np.float32, "2D", "RGB", np.uint16, 232, False): Exception,
+    (np.float32, "2D", "RGB", np.uint16, 13333, True): Exception,
+    (np.float32, "2D", "RGB", np.uint16, 13333, False): Exception,
+    (np.float32, "2D", "RGBA", None, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [1, 1, 1, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", None, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [1, 1, 1, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", None, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", None, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [52, 52, 52, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [8, 8, 8, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [45, 45, 45, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [52, 52, 52, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [8, 8, 8, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [45, 45, 45, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint16, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint16, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint16, 13333, True): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "2D", "RGBA", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", None, None, True): np.array(
+        [
+            [[59, 99, 32, 255], [103, 231, 72, 255], [233, 117, 43, 255], [74, 249, 184, 255]],
+            [[0, 185, 137, 0], [232, 72, 187, 255], [86, 56, 249, 255], [35, 88, 101, 255]],
+            [[217, 49, 0, 255], [123, 12, 152, 255], [255, 83, 37, 255], [95, 90, 22, 255]],
+            [[177, 133, 125, 255], [238, 36, 174, 255], [70, 177, 17, 255], [67, 65, 219, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", None, None, False): np.array(
+        [
+            [[32, 99, 59, 255], [72, 231, 103, 255], [43, 117, 233, 255], [184, 249, 74, 255]],
+            [[137, 185, 0, 0], [187, 72, 232, 255], [249, 56, 86, 255], [101, 88, 35, 255]],
+            [[0, 49, 217, 255], [152, 12, 123, 255], [37, 83, 255, 255], [22, 90, 95, 255]],
+            [[125, 133, 177, 255], [174, 36, 238, 255], [17, 177, 70, 255], [219, 65, 67, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", None, 232, True): np.array(
+        [
+            [[54, 90, 29, 255], [94, 210, 65, 255], [212, 106, 39, 255], [68, 227, 167, 255]],
+            [[0, 169, 125, 0], [211, 65, 170, 255], [78, 51, 227, 255], [32, 80, 91, 255]],
+            [[197, 44, 0, 255], [112, 11, 138, 255], [255, 75, 34, 255], [86, 82, 20, 255]],
+            [[161, 121, 113, 255], [216, 33, 158, 255], [64, 161, 15, 255], [61, 59, 199, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", None, 232, False): np.array(
+        [
+            [[29, 90, 54, 255], [65, 210, 94, 255], [39, 106, 212, 255], [167, 227, 68, 255]],
+            [[125, 169, 0, 0], [170, 65, 211, 255], [227, 51, 78, 255], [91, 80, 32, 255]],
+            [[0, 44, 197, 255], [138, 11, 112, 255], [34, 75, 255, 255], [20, 82, 86, 255]],
+            [[113, 121, 161, 255], [158, 33, 216, 255], [15, 161, 64, 255], [199, 59, 61, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 0, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[255, 0, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255], [0, 255, 0, 255]],
+            [[0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[255, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 0, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 0, 255]],
+            [[255, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255], [255, 255, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
+            [[255, 0, 0, 0], [0, 0, 255, 255], [255, 0, 0, 255], [255, 255, 0, 255]],
+            [[0, 255, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 255, 0], [255, 0, 0, 255], [0, 0, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 255, 255], [255, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
+            [[255, 0, 255, 0], [0, 0, 255, 255], [255, 255, 0, 255], [0, 0, 255, 255]],
+            [[255, 0, 255, 255], [255, 0, 0, 255], [0, 0, 255, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[255, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
+            [[255, 0, 255, 0], [255, 0, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255]],
+            [[255, 0, 255, 255], [0, 0, 255, 255], [255, 0, 0, 255], [255, 255, 255, 255]],
+            [[0, 0, 0, 255], [255, 0, 0, 255], [0, 255, 0, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[255, 255, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 255, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 255, 255, 255], [0, 255, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 255, 0], [0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
+            [[255, 0, 0, 255], [255, 0, 0, 255], [0, 255, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
+            [[255, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
+            [[0, 255, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
+            [[255, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", None, None, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", None, None, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", None, 232, True): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", None, 232, False): np.array(
+        [
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
+            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", None, 13333, True): np.array(
+        [
+            [[12, 0, 0, 255], [21, 0, 0, 255], [47, 0, 0, 255], [15, 0, 0, 255]],
+            [[0, 0, 0, 0], [47, 0, 0, 255], [17, 0, 0, 255], [7, 0, 0, 255]],
+            [[44, 0, 0, 255], [25, 0, 0, 255], [255, 0, 0, 255], [19, 0, 0, 255]],
+            [[36, 0, 0, 255], [48, 0, 0, 255], [14, 0, 0, 255], [13, 0, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", None, 13333, False): np.array(
+        [
+            [[0, 0, 12, 255], [0, 0, 21, 255], [0, 0, 47, 255], [0, 0, 15, 255]],
+            [[0, 0, 0, 0], [0, 0, 47, 255], [0, 0, 17, 255], [0, 0, 7, 255]],
+            [[0, 0, 44, 255], [0, 0, 25, 255], [0, 0, 255, 255], [0, 0, 19, 255]],
+            [[0, 0, 36, 255], [0, 0, 48, 255], [0, 0, 14, 255], [0, 0, 13, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint16, None, True): np.array(
+        [
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint16, None, False): np.array(
+        [
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint16, 232, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGB", np.uint16, 13333, False): np.array(
+        [
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGB", "RGBA", None, None, True): Exception,
+    (np.float32, "RGB", "RGBA", None, None, False): Exception,
+    (np.float32, "RGB", "RGBA", None, 232, True): Exception,
+    (np.float32, "RGB", "RGBA", None, 232, False): Exception,
+    (np.float32, "RGB", "RGBA", None, 13333, True): Exception,
+    (np.float32, "RGB", "RGBA", None, 13333, False): Exception,
+    (np.float32, "RGB", "RGBA", np.uint8, None, True): Exception,
+    (np.float32, "RGB", "RGBA", np.uint8, None, False): Exception,
+    (np.float32, "RGB", "RGBA", np.uint8, 232, True): Exception,
+    (np.float32, "RGB", "RGBA", np.uint8, 232, False): Exception,
+    (np.float32, "RGB", "RGBA", np.uint8, 13333, True): Exception,
+    (np.float32, "RGB", "RGBA", np.uint8, 13333, False): Exception,
+    (np.float32, "RGB", "RGBA", np.uint16, None, True): Exception,
+    (np.float32, "RGB", "RGBA", np.uint16, None, False): Exception,
+    (np.float32, "RGB", "RGBA", np.uint16, 232, True): Exception,
+    (np.float32, "RGB", "RGBA", np.uint16, 232, False): Exception,
+    (np.float32, "RGB", "RGBA", np.uint16, 13333, True): Exception,
+    (np.float32, "RGB", "RGBA", np.uint16, 13333, False): Exception,
+    (np.float32, "RGBA", "SIMPLE", None, None, True): np.array(
+        [
+            [[248, 159, 5, 0], [217, 237, 151, 255], [102, 203, 57, 44], [244, 177, 73, 196]],
+            [[29, 189, 17, 250], [168, 188, 84, 208], [198, 134, 144, 81], [208, 209, 210, 126]],
+            [[8, 212, 80, 241], [159, 153, 128, 236], [0, 0, 7, 0], [249, 140, 61, 88]],
+            [[175, 255, 216, 90], [42, 76, 23, 172], [64, 65, 205, 254], [0, 255, 148, 117]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", None, None, False): np.array(
+        [
+            [[5, 159, 248, 0], [151, 237, 217, 255], [57, 203, 102, 44], [73, 177, 244, 196]],
+            [[17, 189, 29, 250], [84, 188, 168, 208], [144, 134, 198, 81], [210, 209, 208, 126]],
+            [[80, 212, 8, 241], [128, 153, 159, 236], [7, 0, 0, 0], [61, 140, 249, 88]],
+            [[216, 255, 175, 90], [23, 76, 42, 172], [205, 65, 64, 254], [148, 255, 0, 117]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", None, 232, True): np.array(
+        [
+            [[225, 145, 5, 0], [197, 215, 138, 255], [93, 185, 51, 40], [222, 161, 66, 178]],
+            [[26, 172, 15, 227], [153, 171, 76, 189], [181, 122, 131, 73], [189, 190, 191, 114]],
+            [[7, 193, 73, 219], [144, 139, 116, 215], [0, 0, 6, 0], [227, 127, 55, 80]],
+            [[159, 255, 197, 82], [38, 69, 21, 157], [58, 59, 186, 231], [0, 232, 134, 107]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", None, 232, False): np.array(
+        [
+            [[5, 145, 225, 0], [138, 215, 197, 255], [51, 185, 93, 40], [66, 161, 222, 178]],
+            [[15, 172, 26, 227], [76, 171, 153, 189], [131, 122, 181, 73], [191, 190, 189, 114]],
+            [[73, 193, 7, 219], [116, 139, 144, 215], [6, 0, 0, 0], [55, 127, 227, 80]],
+            [[197, 255, 159, 82], [21, 69, 38, 157], [186, 59, 58, 231], [134, 232, 0, 107]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", None, 13333, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", None, 13333, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 0, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint8, None, True): np.array(
+        [
+            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 0, 255, 255]],
+            [[255, 255, 255, 0], [0, 0, 255, 255], [255, 255, 0, 0], [0, 255, 0, 255]],
+            [[0, 255, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255], [255, 255, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint8, None, False): np.array(
+        [
+            [[0, 0, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 0, 255, 255]],
+            [[255, 255, 255, 0], [255, 0, 0, 255], [0, 255, 255, 0], [0, 255, 0, 255]],
+            [[255, 255, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255], [255, 255, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint8, 232, True): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[255, 255, 0, 0], [0, 0, 255, 0], [0, 255, 0, 0], [0, 255, 0, 255]],
+            [[0, 0, 0, 0], [255, 0, 255, 0], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [255, 0, 0, 0], [255, 0, 255, 0], [255, 255, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint8, 232, False): np.array(
+        [
+            [[0, 0, 0, 0], [255, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
+            [[0, 255, 255, 0], [255, 0, 0, 0], [0, 255, 0, 0], [0, 255, 0, 255]],
+            [[0, 0, 0, 0], [255, 0, 255, 0], [255, 255, 255, 0], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [0, 0, 255, 0], [255, 0, 255, 0], [255, 255, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint8, 13333, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint16, None, True): np.array(
+        [
+            [[0, 0, 255, 0], [0, 255, 255, 0], [255, 255, 0, 255], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255], [255, 0, 0, 255]],
+            [[0, 0, 255, 0], [255, 0, 0, 0], [255, 255, 255, 0], [0, 255, 255, 0]],
+            [[255, 0, 255, 0], [255, 0, 0, 255], [255, 0, 0, 0], [255, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint16, None, False): np.array(
+        [
+            [[255, 0, 0, 0], [255, 255, 0, 0], [0, 255, 255, 255], [0, 0, 0, 255]],
+            [[0, 255, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255], [0, 0, 255, 255]],
+            [[255, 0, 0, 0], [0, 0, 255, 0], [255, 255, 255, 0], [255, 255, 0, 0]],
+            [[255, 0, 255, 0], [0, 0, 255, 255], [0, 0, 255, 0], [0, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint16, 232, True): np.array(
+        [
+            [[255, 0, 0, 0], [0, 0, 255, 0], [255, 0, 255, 0], [255, 0, 255, 0]],
+            [[0, 0, 255, 0], [255, 255, 0, 255], [0, 0, 0, 0], [255, 0, 0, 255]],
+            [[0, 0, 0, 255], [255, 0, 0, 0], [255, 255, 255, 0], [0, 0, 0, 0]],
+            [[255, 0, 0, 0], [0, 255, 255, 0], [0, 0, 255, 255], [255, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint16, 232, False): np.array(
+        [
+            [[0, 0, 255, 0], [255, 0, 0, 0], [255, 0, 255, 0], [255, 0, 255, 0]],
+            [[255, 0, 0, 0], [0, 255, 255, 255], [0, 0, 0, 0], [0, 0, 255, 255]],
+            [[0, 0, 0, 255], [0, 0, 255, 0], [255, 255, 255, 0], [0, 0, 0, 0]],
+            [[0, 0, 255, 0], [255, 255, 0, 0], [255, 0, 0, 255], [0, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint16, 13333, True): np.array(
+        [
+            [[255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 255, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 255, 255]],
+            [[0, 0, 0, 0], [0, 0, 255, 255], [255, 255, 0, 0], [255, 255, 0, 0]],
+            [[255, 0, 0, 0], [0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "SIMPLE", np.uint16, 13333, False): np.array(
+        [
+            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 255], [255, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0], [255, 0, 0, 255]],
+            [[0, 0, 0, 0], [255, 0, 0, 255], [0, 255, 255, 0], [0, 255, 255, 0]],
+            [[0, 0, 255, 0], [0, 255, 0, 0], [0, 0, 0, 255], [0, 0, 255, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGB", None, None, True): Exception,
+    (np.float32, "RGBA", "RGB", None, None, False): Exception,
+    (np.float32, "RGBA", "RGB", None, 232, True): Exception,
+    (np.float32, "RGBA", "RGB", None, 232, False): Exception,
+    (np.float32, "RGBA", "RGB", None, 13333, True): Exception,
+    (np.float32, "RGBA", "RGB", None, 13333, False): Exception,
+    (np.float32, "RGBA", "RGB", np.uint8, None, True): Exception,
+    (np.float32, "RGBA", "RGB", np.uint8, None, False): Exception,
+    (np.float32, "RGBA", "RGB", np.uint8, 232, True): Exception,
+    (np.float32, "RGBA", "RGB", np.uint8, 232, False): Exception,
+    (np.float32, "RGBA", "RGB", np.uint8, 13333, True): Exception,
+    (np.float32, "RGBA", "RGB", np.uint8, 13333, False): Exception,
+    (np.float32, "RGBA", "RGB", np.uint16, None, True): Exception,
+    (np.float32, "RGBA", "RGB", np.uint16, None, False): Exception,
+    (np.float32, "RGBA", "RGB", np.uint16, 232, True): Exception,
+    (np.float32, "RGBA", "RGB", np.uint16, 232, False): Exception,
+    (np.float32, "RGBA", "RGB", np.uint16, 13333, True): Exception,
+    (np.float32, "RGBA", "RGB", np.uint16, 13333, False): Exception,
+    (np.float32, "RGBA", "RGBA", None, None, True): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", None, None, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", None, 232, True): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", None, 232, False): np.array(
+        [
+            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", None, 13333, True): np.array(
+        [
+            [[0, 0, 1, 0], [0, 0, 31, 255], [0, 0, 11, 0], [0, 0, 15, 0]],
+            [[0, 0, 3, 0], [0, 0, 17, 0], [0, 0, 29, 0], [0, 0, 43, 0]],
+            [[0, 0, 16, 0], [0, 0, 26, 0], [0, 0, 1, 0], [0, 0, 12, 0]],
+            [[0, 255, 44, 0], [0, 0, 4, 0], [0, 0, 42, 0], [0, 0, 30, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", None, 13333, False): np.array(
+        [
+            [[1, 0, 0, 0], [31, 0, 0, 255], [11, 0, 0, 0], [15, 0, 0, 0]],
+            [[3, 0, 0, 0], [17, 0, 0, 0], [29, 0, 0, 0], [43, 0, 0, 0]],
+            [[16, 0, 0, 0], [26, 0, 0, 0], [1, 0, 0, 0], [12, 0, 0, 0]],
+            [[44, 255, 0, 0], [4, 0, 0, 0], [42, 0, 0, 0], [30, 0, 0, 0]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint8, None, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint8, None, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint8, 232, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint8, 232, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint8, 13333, True): np.array(
+        [
+            [[255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint8, 13333, False): np.array(
+        [
+            [[0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint16, None, True): np.array(
+        [
+            [[255, 255, 0, 0], [255, 255, 0, 0], [255, 255, 255, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 0], [255, 255, 0, 255]],
+            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint16, None, False): np.array(
+        [
+            [[0, 255, 255, 0], [0, 255, 255, 0], [255, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 0], [0, 255, 255, 255]],
+            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint16, 232, True): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint16, 232, False): np.array(
+        [
+            [[255, 255, 255, 0], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
+            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint16, 13333, True): np.array(
+        [
+            [[255, 255, 0, 0], [255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
+            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 0], [255, 255, 255, 255]],
+            [[255, 0, 0, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+    (np.float32, "RGBA", "RGBA", np.uint16, 13333, False): np.array(
+        [
+            [[0, 255, 255, 0], [0, 255, 255, 0], [0, 255, 255, 255], [255, 255, 255, 255]],
+            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
+            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 0], [255, 255, 255, 255]],
+            [[0, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
+        ],
+        dtype=np.uint8,
+    ),
+}
+
+
+def _makeARGB(*args, **kwds):
+    img, alpha = makeARGB(*args, **kwds)
+    if kwds.get('useRGBA'):  # endian independent
+        out = img
+    elif sys.byteorder == 'little':  # little-endian ARGB32 to B,G,R,A
+        out = img
+    else:  # big-endian ARGB32 to B,G,R,A
+        out = img[..., [3, 2, 1, 0]]
+    return out, alpha
+
+
+def _do_something_for_every_combo(func):
+    for dtype in [np.uint8, np.uint16, np.float32]:
+        for in_fmt in ["2D", "RGB", "RGBA"]:
+            data = INPUTS[(dtype, in_fmt)]
+            for levels_name in [None, "SIMPLE", "RGB", "RGBA"]:
+                levels = LEVELS.get(levels_name, None)
+                if dtype == np.float32 and levels_name is None:
+                    continue
+                for lut_type in [None, np.uint8, np.uint16]:
+                    lut = LUTS.get(lut_type, None)
+                    for scale in [None, 232, 13333]:
+                        for use_rgba in [True, False]:
+                            key = (dtype, in_fmt, levels_name, lut_type, scale, use_rgba)
+                            func(data, key, levels, lut, scale, use_rgba)
+
+
+def save_reference():
+    """
+    This saves the output (or exception type) of running makeARGB for every combo of arguments. The
+    output isn't fit for immediate inclusion in this file as EXPECTED_OUTPUTS, and needs some replace-all
+    work.
+    """
+    with open("_unformatted_expected_outputs_", "w") as tmp_file:
+
+        def write_expectation_to_file(data, key, levels, lut, scale, use_rgba):
+            try:
+                output, alpha = _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
+            except Exception as e:
+                tmp_file.write(f"{key!r}: {type(e)}\n")
+            else:
+                tmp_file.write(f"{key!r}: {output!r},\n")
+
+        _do_something_for_every_combo(write_expectation_to_file)
diff --git a/tests/test_makeARGB.py b/tests/test_makeARGB.py
--- a/tests/test_makeARGB.py
+++ b/tests/test_makeARGB.py
@@ -1,4249 +1,23 @@
 import sys
-from typing import Any, Dict, Type, Union
 
 import numpy as np
 import pytest
 
-from pyqtgraph import getConfigOption, getCupy, setConfigOption
+from pyqtgraph import setConfigOptions
 from pyqtgraph.functions import makeARGB as real_makeARGB
 
-try:
-    import cupy
-except ImportError:
-    cupy = None
-
-IN_2D_INT8 = np.array([[173, 48, 122, 41], [210, 192, 0, 5], [104, 56, 102, 115], [78, 19, 255, 6]], dtype=np.uint8)
-IN_RGB_INT8 = np.array(
-    [
-        [[16, 69, 62], [66, 132, 135], [220, 80, 36], [53, 34, 68]],
-        [[140, 23, 113], [0, 63, 206], [96, 255, 100], [226, 182, 155]],
-        [[28, 237, 223], [215, 232, 209], [17, 16, 50], [96, 187, 93]],
-        [[220, 193, 232], [134, 168, 150], [55, 64, 221], [96, 108, 227]],
-    ],
-    dtype=np.uint8,
-)
-IN_RGBA_INT8 = np.array(
-    [
-        [[151, 252, 73, 107], [28, 221, 35, 0], [87, 122, 126, 114], [47, 59, 24, 200]],
-        [[189, 246, 242, 255], [123, 255, 29, 14], [201, 208, 133, 32], [118, 203, 141, 245]],
-        [[133, 131, 248, 81], [4, 84, 99, 40], [40, 167, 119, 150], [13, 158, 108, 21]],
-        [[156, 221, 166, 250], [77, 188, 13, 166], [0, 1, 185, 25], [83, 35, 103, 120]],
-    ],
-    dtype=np.uint8,
-)
-IN_2D_INT16 = np.array(
-    [
-        [13364, 55041, 40746, 40937],
-        [57612, 34247, 34132, 0],
-        [10109, 56950, 41856, 21479],
-        [14881, 65535, 48079, 11372],
-    ],
-    dtype=np.uint16,
-)
-IN_RGB_INT16 = np.array(
-    [
-        [[55626, 45263, 0], [19468, 39208, 36391], [33255, 8664, 56991], [37588, 31212, 38295]],
-        [[58933, 16402, 36905], [9928, 23928, 12418], [16461, 47738, 18189], [17004, 39307, 59941]],
-        [[43717, 49573, 9843], [35967, 3891, 39618], [53542, 58151, 29112], [53667, 4092, 35267]],
-        [[15957, 21648, 45238], [65535, 47107, 52049], [6342, 34547, 19902], [43386, 37301, 35095]],
-    ],
-    dtype=np.uint16,
-)
-IN_RGBA_INT16 = np.array(
-    [
-        [
-            [13060, 40847, 29621, 46719],
-            [0, 36509, 33525, 56649],
-            [48328, 23093, 47186, 26801],
-            [57336, 12247, 30996, 11691],
-        ],
-        [
-            [4863, 41121, 32045, 25250],
-            [27779, 65098, 59921, 47771],
-            [8906, 18280, 5066, 48587],
-            [65535, 25758, 27250, 17284],
-        ],
-        [
-            [52005, 65535, 40746, 65535],
-            [33, 57630, 27750, 42371],
-            [50176, 35079, 19220, 63662],
-            [17702, 5506, 36216, 48303],
-        ],
-        [
-            [61592, 27692, 37436, 7249],
-            [54653, 39986, 58441, 12819],
-            [20887, 56588, 32440, 85],
-            [13457, 14661, 58972, 48779],
-        ],
-    ],
-    dtype=np.uint16,
-)
-IN_2D_FLOAT = np.array(
-    [
-        [np.inf, 0.53662884, np.nan, 0.8853132],
-        [0.8496698, 0.88006145, 1.0, 0.06621328],
-        [0.99158293, 0.8476984, 0.16672458, 0.9887786],
-        [0.07076367, 0.66354364, 0.8781082, 0.988832],
-    ],
-    dtype=np.float32,
-)
-IN_RGB_FLOAT = np.array(
-    [
-        [
-            [0.23317624, 0.39086635, 0.12795302],
-            [0.40659714, 0.9079258, 0.28431135],
-            [0.91651599, 0.46082205, 0.16928465],
-            [0.29368765, 0.97987488, 0.72257988],
-        ],
-        [
-            [np.nan, 0.72908475, 0.54018012],
-            [0.91277435, 0.2842577, 0.73481915],
-            [0.33844504, 0.22060913, 0.9802894],
-            [0.13995676, 0.34752838, 0.39652277],
-        ],
-        [
-            [0.85315026, 0.19330797, 0.0],
-            [0.48584232, 0.04943356, 0.59906953],
-            [np.inf, 0.32614581, 0.1483722],
-            [0.37340863, 0.35432855, 0.08973532],
-        ],
-        [
-            [0.69666134, 0.52481322, 0.49057305],
-            [0.93366339, 0.1428689, 0.6845513],
-            [0.27681383, 0.69472673, 0.06750892],
-            [0.26349886, 0.25841691, 0.86171104],
-        ],
-    ]
-)
-IN_RGBA_FLOAT = np.array(
-    [
-        [
-            [0.97383172, 0.62680971, 0.02285016, np.nan],
-            [0.85295433, 0.93014834, 0.59482999, np.inf],
-            [0.4017482, 0.79809183, 0.22407464, 0.17327807],
-            [0.95953263, 0.69535086, 0.28846483, 0.76970823],
-        ],
-        [
-            [0.11487603, 0.7447609, 0.06767498, 0.98054729],
-            [0.66071068, 0.73931366, 0.33155686, 0.81827122],
-            [0.78035892, 0.52920802, 0.5671388, 0.31783899],
-            [0.81709002, 0.82204682, 0.82584029, 0.49434749],
-        ],
-        [
-            [0.03142089, 0.8322058, 0.31646922, 0.94636969],
-            [0.62381573, 0.60052138, 0.50244611, 0.92886007],
-            [np.nan, np.nan, 0.02940048, 0.52529675],
-            [0.9786162, 0.54928697, 0.2409731, 0.34705397],
-        ],
-        [
-            [0.68922233, np.inf, 0.85027734, 0.35388624],
-            [0.16489042, 0.29860162, 0.09349833, 0.67714667],
-            [0.25351483, 0.25596098, 0.80461891, 0.99952403],
-            [0.0, 1.0, 0.58084746, 0.46211944],
-        ],
-    ]
-)
-INPUTS: Dict[Any, np.ndarray] = {
-    (np.uint8, "2D"): IN_2D_INT8,
-    (np.uint8, "RGB"): IN_RGB_INT8,
-    (np.uint8, "RGBA"): IN_RGBA_INT8,
-    (np.uint16, "2D"): IN_2D_INT16,
-    (np.uint16, "RGB"): IN_RGB_INT16,
-    (np.uint16, "RGBA"): IN_RGBA_INT16,
-    (np.float32, "2D"): IN_2D_FLOAT,
-    (np.float32, "RGB"): IN_RGB_FLOAT,
-    (np.float32, "RGBA"): IN_RGBA_FLOAT,
-}
-LUT8 = np.zeros((255,), dtype=np.uint8)
-LUT8[::2] = 255
-LUT16 = np.zeros((65535,), dtype=np.uint8)
-LUT16[::3] = 255
-LUTS: Dict[Any, np.ndarray] = {
-    np.uint8: LUT8,
-    np.uint16: LUT16,
-}
-LEVELS = {
-    "SIMPLE": (0, 1),
-    "RGB": ((0, 255), (1, 250), (100, 160)),
-    "RGBA": ((255, 11111), (100, 10000), (0, 255), (127, 255)),
-}
-
-EXPECTED_OUTPUTS: Dict[tuple, Union[Type[Exception], np.ndarray]] = {
-    (np.uint8, "2D", None, None, None, True): np.array(
-        [
-            [[173, 173, 173, 255], [48, 48, 48, 255], [122, 122, 122, 255], [41, 41, 41, 255]],
-            [[210, 210, 210, 255], [192, 192, 192, 255], [0, 0, 0, 255], [5, 5, 5, 255]],
-            [[104, 104, 104, 255], [56, 56, 56, 255], [102, 102, 102, 255], [115, 115, 115, 255]],
-            [[78, 78, 78, 255], [19, 19, 19, 255], [255, 255, 255, 255], [6, 6, 6, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, None, None, False): np.array(
-        [
-            [[173, 173, 173, 255], [48, 48, 48, 255], [122, 122, 122, 255], [41, 41, 41, 255]],
-            [[210, 210, 210, 255], [192, 192, 192, 255], [0, 0, 0, 255], [5, 5, 5, 255]],
-            [[104, 104, 104, 255], [56, 56, 56, 255], [102, 102, 102, 255], [115, 115, 115, 255]],
-            [[78, 78, 78, 255], [19, 19, 19, 255], [255, 255, 255, 255], [6, 6, 6, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, None, 232, True): np.array(
-        [
-            [[157, 157, 157, 255], [43, 43, 43, 255], [110, 110, 110, 255], [37, 37, 37, 255]],
-            [[191, 191, 191, 255], [174, 174, 174, 255], [0, 0, 0, 255], [4, 4, 4, 255]],
-            [[94, 94, 94, 255], [50, 50, 50, 255], [92, 92, 92, 255], [104, 104, 104, 255]],
-            [[70, 70, 70, 255], [17, 17, 17, 255], [232, 232, 232, 255], [5, 5, 5, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, None, 232, False): np.array(
-        [
-            [[157, 157, 157, 255], [43, 43, 43, 255], [110, 110, 110, 255], [37, 37, 37, 255]],
-            [[191, 191, 191, 255], [174, 174, 174, 255], [0, 0, 0, 255], [4, 4, 4, 255]],
-            [[94, 94, 94, 255], [50, 50, 50, 255], [92, 92, 92, 255], [104, 104, 104, 255]],
-            [[70, 70, 70, 255], [17, 17, 17, 255], [232, 232, 232, 255], [5, 5, 5, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint8, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint8, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint8, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint8, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", None, np.uint16, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGB", None, None, True): Exception,
-    (np.uint8, "2D", "RGB", None, None, False): Exception,
-    (np.uint8, "2D", "RGB", None, 232, True): Exception,
-    (np.uint8, "2D", "RGB", None, 232, False): Exception,
-    (np.uint8, "2D", "RGB", None, 13333, True): Exception,
-    (np.uint8, "2D", "RGB", None, 13333, False): Exception,
-    (np.uint8, "2D", "RGB", np.uint8, None, True): Exception,
-    (np.uint8, "2D", "RGB", np.uint8, None, False): Exception,
-    (np.uint8, "2D", "RGB", np.uint8, 232, True): Exception,
-    (np.uint8, "2D", "RGB", np.uint8, 232, False): Exception,
-    (np.uint8, "2D", "RGB", np.uint8, 13333, True): Exception,
-    (np.uint8, "2D", "RGB", np.uint8, 13333, False): Exception,
-    (np.uint8, "2D", "RGB", np.uint16, None, True): Exception,
-    (np.uint8, "2D", "RGB", np.uint16, None, False): Exception,
-    (np.uint8, "2D", "RGB", np.uint16, 232, True): Exception,
-    (np.uint8, "2D", "RGB", np.uint16, 232, False): Exception,
-    (np.uint8, "2D", "RGB", np.uint16, 13333, True): Exception,
-    (np.uint8, "2D", "RGB", np.uint16, 13333, False): Exception,
-    (np.uint8, "2D", "RGBA", None, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [122, 122, 122, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [102, 102, 102, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", None, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [122, 122, 122, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [102, 102, 102, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", None, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [110, 110, 110, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [92, 92, 92, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [232, 232, 232, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", None, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [110, 110, 110, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [2, 2, 2, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [92, 92, 92, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [232, 232, 232, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", None, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [123, 123, 123, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", None, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [123, 123, 123, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint16, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint16, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint16, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "2D", "RGBA", np.uint16, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, None, None, True): np.array(
-        [
-            [[16, 69, 62, 255], [66, 132, 135, 255], [220, 80, 36, 255], [53, 34, 68, 255]],
-            [[140, 23, 113, 255], [0, 63, 206, 255], [96, 255, 100, 255], [226, 182, 155, 255]],
-            [[28, 237, 223, 255], [215, 232, 209, 255], [17, 16, 50, 255], [96, 187, 93, 255]],
-            [[220, 193, 232, 255], [134, 168, 150, 255], [55, 64, 221, 255], [96, 108, 227, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, None, None, False): np.array(
-        [
-            [[62, 69, 16, 255], [135, 132, 66, 255], [36, 80, 220, 255], [68, 34, 53, 255]],
-            [[113, 23, 140, 255], [206, 63, 0, 255], [100, 255, 96, 255], [155, 182, 226, 255]],
-            [[223, 237, 28, 255], [209, 232, 215, 255], [50, 16, 17, 255], [93, 187, 96, 255]],
-            [[232, 193, 220, 255], [150, 168, 134, 255], [221, 64, 55, 255], [227, 108, 96, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, None, 232, True): np.array(
-        [
-            [[14, 62, 56, 255], [60, 120, 122, 255], [200, 72, 32, 255], [48, 30, 61, 255]],
-            [[127, 20, 102, 255], [0, 57, 187, 255], [87, 232, 90, 255], [205, 165, 141, 255]],
-            [[25, 215, 202, 255], [195, 211, 190, 255], [15, 14, 45, 255], [87, 170, 84, 255]],
-            [[200, 175, 211, 255], [121, 152, 136, 255], [50, 58, 201, 255], [87, 98, 206, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, None, 232, False): np.array(
-        [
-            [[56, 62, 14, 255], [122, 120, 60, 255], [32, 72, 200, 255], [61, 30, 48, 255]],
-            [[102, 20, 127, 255], [187, 57, 0, 255], [90, 232, 87, 255], [141, 165, 205, 255]],
-            [[202, 215, 25, 255], [190, 211, 195, 255], [45, 14, 15, 255], [84, 170, 87, 255]],
-            [[211, 175, 200, 255], [136, 152, 121, 255], [201, 58, 50, 255], [206, 98, 87, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint8, None, True): np.array(
-        [
-            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[255, 0, 0, 255], [0, 255, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255]],
-            [[255, 0, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint8, None, False): np.array(
-        [
-            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[0, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 0, 255, 255], [0, 255, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255]],
-            [[255, 0, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[0, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
-            [[255, 0, 0, 255], [0, 255, 255, 255], [255, 255, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 0, 255], [0, 0, 255, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
-            [[255, 0, 0, 255], [255, 0, 0, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
-            [[0, 0, 255, 255], [255, 255, 0, 255], [0, 255, 255, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint16, None, True): np.array(
-        [
-            [[0, 255, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint16, None, False): np.array(
-        [
-            [[0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
-            [[0, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255], [0, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
-            [[255, 0, 0, 255], [0, 255, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255]],
-            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 0, 255]],
-            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 0, 255]],
-            [[255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", None, np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 0, 255]],
-            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 255, 0, 255]],
-            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255], [0, 255, 255, 255]],
-            [[0, 0, 255, 255], [255, 255, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 255, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", None, None, True): np.array(
-        [
-            [[16, 69, 0, 255], [66, 134, 148, 255], [220, 80, 0, 255], [53, 33, 0, 255]],
-            [[140, 22, 55, 255], [0, 63, 255, 255], [96, 255, 0, 255], [226, 185, 233, 255]],
-            [[28, 241, 255, 255], [215, 236, 255, 255], [17, 15, 0, 255], [96, 190, 0, 255]],
-            [[220, 196, 255, 255], [134, 171, 212, 255], [55, 64, 255, 255], [96, 109, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", None, None, False): np.array(
-        [
-            [[0, 69, 16, 255], [148, 134, 66, 255], [0, 80, 220, 255], [0, 33, 53, 255]],
-            [[55, 22, 140, 255], [255, 63, 0, 255], [0, 255, 96, 255], [233, 185, 226, 255]],
-            [[255, 241, 28, 255], [255, 236, 215, 255], [0, 15, 17, 255], [0, 190, 96, 255]],
-            [[255, 196, 220, 255], [212, 171, 134, 255], [255, 64, 55, 255], [255, 109, 96, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", None, 232, True): np.array(
-        [
-            [[14, 63, 0, 255], [60, 122, 135, 255], [200, 73, 0, 255], [48, 30, 0, 255]],
-            [[127, 20, 50, 255], [0, 57, 255, 255], [87, 236, 0, 255], [205, 168, 212, 255]],
-            [[25, 219, 255, 255], [195, 215, 255, 255], [15, 13, 0, 255], [87, 173, 0, 255]],
-            [[200, 178, 255, 255], [121, 155, 193, 255], [50, 58, 255, 255], [87, 99, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", None, 232, False): np.array(
-        [
-            [[0, 63, 14, 255], [135, 122, 60, 255], [0, 73, 200, 255], [0, 30, 48, 255]],
-            [[50, 20, 127, 255], [255, 57, 0, 255], [0, 236, 87, 255], [212, 168, 205, 255]],
-            [[255, 219, 25, 255], [255, 215, 195, 255], [0, 13, 15, 255], [0, 173, 87, 255]],
-            [[255, 178, 200, 255], [193, 155, 121, 255], [255, 58, 50, 255], [255, 99, 87, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", None, 13333, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", None, 13333, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint8, None, True): np.array(
-        [
-            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
-            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
-            [[255, 0, 255, 255], [0, 255, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint8, None, False): np.array(
-        [
-            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
-            [[0, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
-            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint8, 232, True): np.array(
-        [
-            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[0, 255, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint8, 232, False): np.array(
-        [
-            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 255, 255], [255, 0, 0, 255], [0, 0, 255, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [0, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint16, None, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 255, 255], [255, 0, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [0, 255, 255, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 255, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint16, 232, True): np.array(
-        [
-            [[0, 255, 255, 255], [255, 0, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
-            [[0, 255, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [255, 0, 255, 255], [0, 255, 0, 255]],
-            [[0, 255, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGB", np.uint16, 13333, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[0, 0, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGB", "RGBA", None, None, True): Exception,
-    (np.uint8, "RGB", "RGBA", None, None, False): Exception,
-    (np.uint8, "RGB", "RGBA", None, 232, True): Exception,
-    (np.uint8, "RGB", "RGBA", None, 232, False): Exception,
-    (np.uint8, "RGB", "RGBA", None, 13333, True): Exception,
-    (np.uint8, "RGB", "RGBA", None, 13333, False): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint8, None, True): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint8, None, False): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint8, 232, True): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint8, 232, False): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint8, 13333, True): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint8, 13333, False): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint16, None, True): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint16, None, False): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint16, 232, True): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint16, 232, False): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint16, 13333, True): Exception,
-    (np.uint8, "RGB", "RGBA", np.uint16, 13333, False): Exception,
-    (np.uint8, "RGBA", None, None, None, True): np.array(
-        [
-            [[151, 252, 73, 107], [28, 221, 35, 0], [87, 122, 126, 114], [47, 59, 24, 200]],
-            [[189, 246, 242, 255], [123, 255, 29, 14], [201, 208, 133, 32], [118, 203, 141, 245]],
-            [[133, 131, 248, 81], [4, 84, 99, 40], [40, 167, 119, 150], [13, 158, 108, 21]],
-            [[156, 221, 166, 250], [77, 188, 13, 166], [0, 1, 185, 25], [83, 35, 103, 120]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, None, None, False): np.array(
-        [
-            [[73, 252, 151, 107], [35, 221, 28, 0], [126, 122, 87, 114], [24, 59, 47, 200]],
-            [[242, 246, 189, 255], [29, 255, 123, 14], [133, 208, 201, 32], [141, 203, 118, 245]],
-            [[248, 131, 133, 81], [99, 84, 4, 40], [119, 167, 40, 150], [108, 158, 13, 21]],
-            [[166, 221, 156, 250], [13, 188, 77, 166], [185, 1, 0, 25], [103, 35, 83, 120]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, None, 232, True): np.array(
-        [
-            [[137, 229, 66, 97], [25, 201, 31, 0], [79, 110, 114, 103], [42, 53, 21, 181]],
-            [[171, 223, 220, 232], [111, 232, 26, 12], [182, 189, 121, 29], [107, 184, 128, 222]],
-            [[121, 119, 225, 73], [3, 76, 90, 36], [36, 151, 108, 136], [11, 143, 98, 19]],
-            [[141, 201, 151, 227], [70, 171, 11, 151], [0, 0, 168, 22], [75, 31, 93, 109]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, None, 232, False): np.array(
-        [
-            [[66, 229, 137, 97], [31, 201, 25, 0], [114, 110, 79, 103], [21, 53, 42, 181]],
-            [[220, 223, 171, 232], [26, 232, 111, 12], [121, 189, 182, 29], [128, 184, 107, 222]],
-            [[225, 119, 121, 73], [90, 76, 3, 36], [108, 151, 36, 136], [98, 143, 11, 19]],
-            [[151, 201, 141, 227], [11, 171, 70, 151], [168, 0, 0, 22], [93, 31, 75, 109]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [209, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 52, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 209, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 52, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint8, None, True): np.array(
-        [
-            [[0, 255, 0, 0], [255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 0, 255], [0, 255, 0, 255], [255, 0, 0, 0]],
-            [[0, 0, 255, 0], [255, 255, 0, 255], [255, 0, 0, 255], [0, 255, 255, 0]],
-            [[255, 0, 255, 255], [0, 255, 0, 255], [255, 0, 0, 0], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint8, None, False): np.array(
-        [
-            [[0, 255, 0, 0], [0, 0, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
-            [[255, 255, 0, 255], [0, 255, 0, 255], [0, 255, 0, 255], [0, 0, 255, 0]],
-            [[255, 0, 0, 0], [0, 255, 255, 255], [0, 0, 255, 255], [255, 255, 0, 0]],
-            [[255, 0, 255, 255], [0, 255, 0, 255], [0, 0, 255, 0], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint8, 232, True): np.array(
-        [
-            [[0, 0, 255, 0], [0, 0, 0, 255], [0, 255, 255, 0], [255, 0, 0, 0]],
-            [[0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 0, 0], [0, 255, 255, 255]],
-            [[0, 0, 0, 0], [0, 255, 255, 255], [255, 0, 255, 255], [0, 0, 255, 0]],
-            [[0, 0, 0, 0], [255, 0, 0, 0], [255, 255, 255, 255], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint8, 232, False): np.array(
-        [
-            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 255, 0, 0], [0, 0, 255, 0]],
-            [[255, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 0], [255, 255, 0, 255]],
-            [[0, 0, 0, 0], [255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 255, 0], [255, 255, 255, 255], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint16, None, True): np.array(
-        [
-            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 0]],
-            [[255, 255, 0, 0], [255, 0, 0, 0], [255, 0, 0, 0], [0, 0, 255, 0]],
-            [[0, 0, 0, 255], [0, 255, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255]],
-            [[255, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint16, None, False): np.array(
-        [
-            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 0]],
-            [[0, 255, 255, 0], [0, 0, 255, 0], [0, 0, 255, 0], [255, 0, 0, 0]],
-            [[0, 0, 0, 255], [255, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 255, 0], [0, 255, 0, 255], [0, 0, 255, 0], [255, 0, 255, 0]],
-            [[255, 0, 0, 0], [255, 0, 0, 255], [0, 255, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 255, 0], [255, 0, 255, 255], [255, 0, 255, 0], [0, 0, 0, 0]],
-            [[255, 255, 0, 0], [0, 255, 0, 0], [255, 255, 255, 0], [255, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint16, 232, False): np.array(
-        [
-            [[255, 0, 0, 0], [0, 255, 0, 255], [255, 0, 0, 0], [255, 0, 255, 0]],
-            [[0, 0, 255, 0], [0, 0, 255, 255], [0, 255, 0, 0], [0, 0, 0, 255]],
-            [[255, 0, 0, 0], [255, 0, 255, 255], [255, 0, 255, 0], [0, 0, 0, 0]],
-            [[0, 255, 255, 0], [0, 255, 0, 0], [255, 255, 255, 0], [255, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint16, 13333, True): np.array(
-        [
-            [[0, 255, 255, 0], [255, 0, 255, 255], [255, 255, 255, 0], [255, 255, 255, 0]],
-            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 255, 255, 0], [0, 255, 0, 255]],
-            [[255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 255, 255], [255, 0, 0, 255], [255, 0, 255, 0], [0, 255, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", None, np.uint16, 13333, False): np.array(
-        [
-            [[255, 255, 0, 0], [255, 0, 255, 255], [255, 255, 255, 0], [255, 255, 255, 0]],
-            [[0, 0, 255, 0], [0, 0, 0, 255], [255, 255, 255, 0], [0, 255, 0, 255]],
-            [[255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
-            [[255, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 0], [255, 255, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 232, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 232, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 0]],
-            [[255, 255, 0, 255], [255, 255, 0, 0], [255, 0, 0, 0], [0, 0, 255, 0]],
-            [[0, 0, 0, 255], [0, 255, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255]],
-            [[255, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 0]],
-            [[0, 255, 255, 255], [0, 255, 255, 0], [0, 0, 255, 0], [255, 0, 0, 0]],
-            [[0, 0, 0, 255], [255, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGB", None, None, True): Exception,
-    (np.uint8, "RGBA", "RGB", None, None, False): Exception,
-    (np.uint8, "RGBA", "RGB", None, 232, True): Exception,
-    (np.uint8, "RGBA", "RGB", None, 232, False): Exception,
-    (np.uint8, "RGBA", "RGB", None, 13333, True): Exception,
-    (np.uint8, "RGBA", "RGB", None, 13333, False): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint8, None, True): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint8, None, False): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint8, 232, True): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint8, 232, False): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint8, 13333, True): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint8, 13333, False): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint16, None, True): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint16, None, False): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint16, 232, True): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint16, 232, False): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint16, 13333, True): Exception,
-    (np.uint8, "RGBA", "RGB", np.uint16, 13333, False): Exception,
-    (np.uint8, "RGBA", "RGBA", None, None, True): np.array(
-        [
-            [[0, 3, 73, 0], [0, 3, 35, 0], [0, 0, 126, 0], [0, 0, 24, 145]],
-            [[0, 3, 242, 255], [0, 3, 29, 0], [0, 2, 133, 0], [0, 2, 141, 235]],
-            [[0, 0, 248, 0], [0, 0, 99, 0], [0, 1, 119, 45], [0, 1, 108, 0]],
-            [[0, 3, 166, 245], [0, 2, 13, 77], [0, 0, 185, 0], [0, 0, 103, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", None, None, False): np.array(
-        [
-            [[73, 3, 0, 0], [35, 3, 0, 0], [126, 0, 0, 0], [24, 0, 0, 145]],
-            [[242, 3, 0, 255], [29, 3, 0, 0], [133, 2, 0, 0], [141, 2, 0, 235]],
-            [[248, 0, 0, 0], [99, 0, 0, 0], [119, 1, 0, 45], [108, 1, 0, 0]],
-            [[166, 3, 0, 245], [13, 2, 0, 77], [185, 0, 0, 0], [103, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", None, 232, True): np.array(
-        [
-            [[0, 3, 66, 0], [0, 2, 31, 0], [0, 0, 114, 0], [0, 0, 21, 132]],
-            [[0, 3, 220, 232], [0, 3, 26, 0], [0, 2, 121, 0], [0, 2, 128, 213]],
-            [[0, 0, 225, 0], [0, 0, 90, 0], [0, 1, 108, 41], [0, 1, 98, 0]],
-            [[0, 2, 151, 222], [0, 2, 11, 70], [0, 0, 168, 0], [0, 0, 93, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", None, 232, False): np.array(
-        [
-            [[66, 3, 0, 0], [31, 2, 0, 0], [114, 0, 0, 0], [21, 0, 0, 132]],
-            [[220, 3, 0, 232], [26, 3, 0, 0], [121, 2, 0, 0], [128, 2, 0, 213]],
-            [[225, 0, 0, 0], [90, 0, 0, 0], [108, 1, 0, 41], [98, 1, 0, 0]],
-            [[151, 2, 0, 222], [11, 2, 0, 70], [168, 0, 0, 0], [93, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", None, 13333, True): np.array(
-        [
-            [[0, 204, 255, 0], [0, 162, 255, 0], [0, 29, 255, 0], [0, 0, 255, 255]],
-            [[0, 196, 255, 255], [0, 208, 255, 0], [0, 145, 255, 0], [0, 138, 255, 255]],
-            [[0, 41, 255, 0], [0, 0, 255, 0], [0, 90, 255, 255], [0, 78, 255, 0]],
-            [[0, 162, 255, 255], [0, 118, 255, 255], [0, 0, 255, 0], [0, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", None, 13333, False): np.array(
-        [
-            [[255, 204, 0, 0], [255, 162, 0, 0], [255, 29, 0, 0], [255, 0, 0, 255]],
-            [[255, 196, 0, 255], [255, 208, 0, 0], [255, 145, 0, 0], [255, 138, 0, 255]],
-            [[255, 41, 0, 0], [255, 0, 0, 0], [255, 90, 0, 255], [255, 78, 0, 0]],
-            [[255, 162, 0, 255], [255, 118, 0, 255], [255, 0, 0, 0], [255, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint8, None, True): np.array(
-        [
-            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0]],
-            [[255, 0, 255, 255], [255, 0, 0, 255], [255, 255, 0, 255], [255, 255, 0, 0]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 0, 0, 0], [255, 0, 255, 255]],
-            [[255, 0, 255, 0], [255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint8, None, False): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0]],
-            [[255, 0, 255, 255], [0, 0, 255, 255], [0, 255, 255, 255], [0, 255, 255, 0]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 0, 255, 0], [255, 0, 255, 255]],
-            [[255, 0, 255, 0], [0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint8, 232, True): np.array(
-        [
-            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 0]],
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 0, 255, 0], [255, 0, 255, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint8, 232, False): np.array(
-        [
-            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 0, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 0]],
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 0], [255, 0, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint16, None, True): np.array(
-        [
-            [[255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
-            [[255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 255, 0]],
-            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
-            [[255, 0, 0, 0], [255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
-            [[0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 0]],
-            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 0, 255, 0], [0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint16, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 0, 0], [255, 255, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 0], [255, 0, 0, 255]],
-            [[255, 0, 0, 255], [255, 0, 0, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 255, 255, 0], [0, 255, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 0], [0, 0, 255, 255]],
-            [[0, 0, 255, 255], [0, 0, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
-            [[255, 0, 0, 0], [255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 0, 255]],
-            [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint8, "RGBA", "RGBA", np.uint16, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 0]],
-            [[0, 0, 255, 0], [0, 0, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255]],
-            [[255, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [0, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, None, None, True): np.array(
-        [
-            [[52, 52, 52, 255], [214, 214, 214, 255], [158, 158, 158, 255], [159, 159, 159, 255]],
-            [[224, 224, 224, 255], [133, 133, 133, 255], [132, 132, 132, 255], [0, 0, 0, 255]],
-            [[39, 39, 39, 255], [221, 221, 221, 255], [162, 162, 162, 255], [83, 83, 83, 255]],
-            [[57, 57, 57, 255], [255, 255, 255, 255], [187, 187, 187, 255], [44, 44, 44, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, None, None, False): np.array(
-        [
-            [[52, 52, 52, 255], [214, 214, 214, 255], [158, 158, 158, 255], [159, 159, 159, 255]],
-            [[224, 224, 224, 255], [133, 133, 133, 255], [132, 132, 132, 255], [0, 0, 0, 255]],
-            [[39, 39, 39, 255], [221, 221, 221, 255], [162, 162, 162, 255], [83, 83, 83, 255]],
-            [[57, 57, 57, 255], [255, 255, 255, 255], [187, 187, 187, 255], [44, 44, 44, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, None, 232, True): np.array(
-        [
-            [[47, 47, 47, 255], [194, 194, 194, 255], [144, 144, 144, 255], [144, 144, 144, 255]],
-            [[203, 203, 203, 255], [121, 121, 121, 255], [120, 120, 120, 255], [0, 0, 0, 255]],
-            [[35, 35, 35, 255], [201, 201, 201, 255], [148, 148, 148, 255], [76, 76, 76, 255]],
-            [[52, 52, 52, 255], [232, 232, 232, 255], [170, 170, 170, 255], [40, 40, 40, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, None, 232, False): np.array(
-        [
-            [[47, 47, 47, 255], [194, 194, 194, 255], [144, 144, 144, 255], [144, 144, 144, 255]],
-            [[203, 203, 203, 255], [121, 121, 121, 255], [120, 120, 120, 255], [0, 0, 0, 255]],
-            [[35, 35, 35, 255], [201, 201, 201, 255], [148, 148, 148, 255], [76, 76, 76, 255]],
-            [[52, 52, 52, 255], [232, 232, 232, 255], [170, 170, 170, 255], [40, 40, 40, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint8, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint8, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", None, np.uint16, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGB", None, None, True): Exception,
-    (np.uint16, "2D", "RGB", None, None, False): Exception,
-    (np.uint16, "2D", "RGB", None, 232, True): Exception,
-    (np.uint16, "2D", "RGB", None, 232, False): Exception,
-    (np.uint16, "2D", "RGB", None, 13333, True): Exception,
-    (np.uint16, "2D", "RGB", None, 13333, False): Exception,
-    (np.uint16, "2D", "RGB", np.uint8, None, True): Exception,
-    (np.uint16, "2D", "RGB", np.uint8, None, False): Exception,
-    (np.uint16, "2D", "RGB", np.uint8, 232, True): Exception,
-    (np.uint16, "2D", "RGB", np.uint8, 232, False): Exception,
-    (np.uint16, "2D", "RGB", np.uint8, 13333, True): Exception,
-    (np.uint16, "2D", "RGB", np.uint8, 13333, False): Exception,
-    (np.uint16, "2D", "RGB", np.uint16, None, True): Exception,
-    (np.uint16, "2D", "RGB", np.uint16, None, False): Exception,
-    (np.uint16, "2D", "RGB", np.uint16, 232, True): Exception,
-    (np.uint16, "2D", "RGB", np.uint16, 232, False): Exception,
-    (np.uint16, "2D", "RGB", np.uint16, 13333, True): Exception,
-    (np.uint16, "2D", "RGB", np.uint16, 13333, False): Exception,
-    (np.uint16, "2D", "RGBA", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[231, 231, 231, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[231, 231, 231, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[210, 210, 210, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[210, 210, 210, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "2D", "RGBA", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, None, None, True): np.array(
-        [
-            [[216, 176, 0, 255], [75, 152, 141, 255], [129, 33, 221, 255], [146, 121, 149, 255]],
-            [[229, 63, 143, 255], [38, 93, 48, 255], [64, 185, 70, 255], [66, 152, 233, 255]],
-            [[170, 192, 38, 255], [139, 15, 154, 255], [208, 226, 113, 255], [208, 15, 137, 255]],
-            [[62, 84, 176, 255], [255, 183, 202, 255], [24, 134, 77, 255], [168, 145, 136, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, None, None, False): np.array(
-        [
-            [[0, 176, 216, 255], [141, 152, 75, 255], [221, 33, 129, 255], [149, 121, 146, 255]],
-            [[143, 63, 229, 255], [48, 93, 38, 255], [70, 185, 64, 255], [233, 152, 66, 255]],
-            [[38, 192, 170, 255], [154, 15, 139, 255], [113, 226, 208, 255], [137, 15, 208, 255]],
-            [[176, 84, 62, 255], [202, 183, 255, 255], [77, 134, 24, 255], [136, 145, 168, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, None, 232, True): np.array(
-        [
-            [[196, 160, 0, 255], [68, 138, 128, 255], [117, 30, 201, 255], [133, 110, 135, 255]],
-            [[208, 58, 130, 255], [35, 84, 43, 255], [58, 168, 64, 255], [60, 139, 212, 255]],
-            [[154, 175, 34, 255], [127, 13, 140, 255], [189, 205, 103, 255], [189, 14, 124, 255]],
-            [[56, 76, 160, 255], [232, 166, 184, 255], [22, 122, 70, 255], [153, 132, 124, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, None, 232, False): np.array(
-        [
-            [[0, 160, 196, 255], [128, 138, 68, 255], [201, 30, 117, 255], [135, 110, 133, 255]],
-            [[130, 58, 208, 255], [43, 84, 35, 255], [64, 168, 58, 255], [212, 139, 60, 255]],
-            [[34, 175, 154, 255], [140, 13, 127, 255], [103, 205, 189, 255], [124, 14, 189, 255]],
-            [[160, 76, 56, 255], [184, 166, 232, 255], [70, 122, 22, 255], [124, 132, 153, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, None, 13333, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, None, 13333, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 0, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
-            [[255, 255, 255, 255], [255, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [0, 255, 0, 255]],
-            [[255, 255, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
-            [[255, 0, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 0, 255], [0, 255, 0, 255]],
-            [[255, 255, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
-            [[255, 0, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint16, None, True): np.array(
-        [
-            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
-            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 0, 255, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint16, None, False): np.array(
-        [
-            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
-            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 255, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint16, 232, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 255, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 255, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", None, np.uint16, 13333, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
-            [[0, 255, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 255, 255, 255], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", None, None, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", None, 232, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", None, None, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", None, None, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", None, 232, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", None, 232, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", None, 13333, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", None, 13333, False): np.array(
-        [
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint16, None, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint16, 232, True): np.array(
-        [
-            [[0, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 0, 255], [0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 255, 255, 255], [0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGB", np.uint16, 13333, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGB", "RGBA", None, None, True): Exception,
-    (np.uint16, "RGB", "RGBA", None, None, False): Exception,
-    (np.uint16, "RGB", "RGBA", None, 232, True): Exception,
-    (np.uint16, "RGB", "RGBA", None, 232, False): Exception,
-    (np.uint16, "RGB", "RGBA", None, 13333, True): Exception,
-    (np.uint16, "RGB", "RGBA", None, 13333, False): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint8, None, True): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint8, None, False): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint8, 232, True): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint8, 232, False): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint8, 13333, True): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint8, 13333, False): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint16, None, True): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint16, None, False): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint16, 232, True): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint16, 232, False): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint16, 13333, True): Exception,
-    (np.uint16, "RGB", "RGBA", np.uint16, 13333, False): Exception,
-    (np.uint16, "RGBA", None, None, None, True): np.array(
-        [
-            [[50, 158, 115, 181], [0, 142, 130, 220], [188, 89, 183, 104], [223, 47, 120, 45]],
-            [[18, 160, 124, 98], [108, 253, 233, 185], [34, 71, 19, 189], [255, 100, 106, 67]],
-            [[202, 255, 158, 255], [0, 224, 107, 164], [195, 136, 74, 247], [68, 21, 140, 187]],
-            [[239, 107, 145, 28], [212, 155, 227, 49], [81, 220, 126, 0], [52, 57, 229, 189]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, None, None, False): np.array(
-        [
-            [[115, 158, 50, 181], [130, 142, 0, 220], [183, 89, 188, 104], [120, 47, 223, 45]],
-            [[124, 160, 18, 98], [233, 253, 108, 185], [19, 71, 34, 189], [106, 100, 255, 67]],
-            [[158, 255, 202, 255], [107, 224, 0, 164], [74, 136, 195, 247], [140, 21, 68, 187]],
-            [[145, 107, 239, 28], [227, 155, 212, 49], [126, 220, 81, 0], [229, 57, 52, 189]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, None, 232, True): np.array(
-        [
-            [[46, 144, 104, 165], [0, 129, 118, 200], [171, 81, 167, 94], [202, 43, 109, 41]],
-            [[17, 145, 113, 89], [98, 230, 212, 169], [31, 64, 17, 172], [232, 91, 96, 61]],
-            [[184, 232, 144, 232], [0, 204, 98, 149], [177, 124, 68, 225], [62, 19, 128, 170]],
-            [[218, 98, 132, 25], [193, 141, 206, 45], [73, 200, 114, 0], [47, 51, 208, 172]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, None, 232, False): np.array(
-        [
-            [[104, 144, 46, 165], [118, 129, 0, 200], [167, 81, 171, 94], [109, 43, 202, 41]],
-            [[113, 145, 17, 89], [212, 230, 98, 169], [17, 64, 31, 172], [96, 91, 232, 61]],
-            [[144, 232, 184, 232], [98, 204, 0, 149], [68, 124, 177, 225], [128, 19, 62, 170]],
-            [[132, 98, 218, 25], [206, 141, 193, 45], [114, 200, 73, 0], [208, 51, 47, 172]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [6, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 17], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 6, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 17], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint8, None, True): np.array(
-        [
-            [[255, 255, 0, 0], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 255, 0]],
-            [[255, 255, 255, 255], [255, 0, 0, 0], [255, 0, 0, 0], [255, 255, 255, 0]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [0, 255, 255, 0], [255, 0, 255, 0]],
-            [[0, 0, 0, 255], [255, 0, 0, 0], [0, 255, 255, 255], [255, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint8, None, False): np.array(
-        [
-            [[0, 255, 255, 0], [255, 255, 255, 255], [0, 0, 255, 255], [255, 0, 0, 0]],
-            [[255, 255, 255, 255], [0, 0, 255, 0], [0, 0, 255, 0], [255, 255, 255, 0]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 0, 0], [255, 0, 255, 0]],
-            [[0, 0, 0, 255], [0, 0, 255, 0], [255, 255, 0, 255], [0, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 0, 255, 255], [0, 0, 0, 255], [255, 0, 0, 0]],
-            [[0, 0, 0, 0], [255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 0]],
-            [[255, 255, 255, 255], [255, 255, 255, 0], [0, 255, 255, 0], [255, 0, 255, 255]],
-            [[255, 255, 255, 0], [0, 0, 255, 0], [0, 255, 255, 255], [0, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 0, 255, 255], [0, 0, 0, 255], [0, 0, 255, 0]],
-            [[0, 0, 0, 0], [255, 255, 255, 0], [0, 255, 0, 255], [255, 0, 255, 0]],
-            [[255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 0, 0], [255, 0, 255, 255]],
-            [[255, 255, 255, 0], [255, 0, 0, 0], [255, 255, 0, 255], [255, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 0], [255, 0, 255, 255]],
-            [[255, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 255, 0, 0]],
-            [[255, 0, 255, 0], [255, 255, 255, 0], [0, 255, 0, 0], [0, 0, 255, 255]],
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 255, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 0], [255, 0, 255, 255]],
-            [[0, 255, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 255, 0, 0]],
-            [[255, 0, 255, 0], [255, 255, 255, 0], [0, 255, 0, 0], [255, 0, 0, 255]],
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 255, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint16, 232, True): np.array(
-        [
-            [[0, 255, 0, 255], [255, 255, 0, 0], [255, 255, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0]],
-            [[0, 0, 255, 0], [255, 255, 0, 0], [255, 0, 0, 255], [0, 0, 0, 0]],
-            [[0, 0, 255, 0], [0, 255, 0, 255], [0, 0, 255, 255], [0, 255, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint16, 232, False): np.array(
-        [
-            [[0, 255, 0, 255], [0, 255, 255, 0], [0, 255, 255, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0]],
-            [[255, 0, 0, 0], [0, 255, 255, 0], [0, 0, 255, 255], [0, 0, 0, 0]],
-            [[255, 0, 0, 0], [0, 255, 0, 255], [255, 0, 0, 255], [0, 255, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint16, 13333, True): np.array(
-        [
-            [[0, 255, 0, 255], [255, 0, 0, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
-            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 255, 0], [255, 255, 0, 0], [0, 0, 0, 255], [0, 0, 255, 0]],
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", None, np.uint16, 13333, False): np.array(
-        [
-            [[0, 255, 0, 255], [0, 0, 255, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
-            [[255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[255, 0, 0, 0], [0, 255, 255, 0], [0, 0, 0, 255], [255, 0, 0, 0]],
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGB", None, None, True): Exception,
-    (np.uint16, "RGBA", "RGB", None, None, False): Exception,
-    (np.uint16, "RGBA", "RGB", None, 232, True): Exception,
-    (np.uint16, "RGBA", "RGB", None, 232, False): Exception,
-    (np.uint16, "RGBA", "RGB", None, 13333, True): Exception,
-    (np.uint16, "RGBA", "RGB", None, 13333, False): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint8, None, True): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint8, None, False): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint8, 232, True): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint8, 232, False): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint8, 13333, True): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint8, 13333, False): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint16, None, True): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint16, None, False): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint16, 232, True): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint16, 232, False): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint16, 13333, True): Exception,
-    (np.uint16, "RGBA", "RGB", np.uint16, 13333, False): Exception,
-    (np.uint16, "RGBA", "RGBA", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[108, 255, 255, 255], [255, 255, 255, 255], [203, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 139, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 108, 255], [255, 255, 255, 255], [255, 255, 203, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 139, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[98, 255, 255, 255], [255, 255, 255, 255], [184, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 126, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 98, 255], [255, 255, 255, 255], [255, 255, 184, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 126, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint16, 232, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 0, 255, 0], [0, 0, 255, 0], [0, 0, 255, 0]],
-            [[0, 0, 255, 0], [255, 0, 255, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
-            [[0, 255, 0, 0], [255, 0, 0, 0], [0, 255, 0, 0], [255, 255, 255, 0]],
-            [[0, 0, 255, 0], [0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 0, 255, 0], [255, 0, 0, 0], [255, 0, 0, 0]],
-            [[255, 0, 0, 0], [255, 0, 255, 0], [0, 255, 0, 0], [255, 0, 255, 0]],
-            [[0, 255, 0, 0], [0, 0, 255, 0], [0, 255, 0, 0], [255, 255, 255, 0]],
-            [[255, 0, 0, 0], [255, 0, 0, 255], [255, 255, 0, 255], [255, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 0, 0], [255, 0, 0, 0], [0, 255, 0, 0], [0, 255, 0, 0]],
-            [[0, 255, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [255, 0, 0, 0], [255, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.uint16, "RGBA", "RGBA", np.uint16, 13333, False): np.array(
-        [
-            [[0, 255, 255, 0], [0, 0, 255, 0], [0, 255, 0, 0], [0, 255, 0, 0]],
-            [[0, 255, 0, 0], [0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 255, 0], [0, 0, 255, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [136, 136, 136, 255], [0, 0, 0, 0], [225, 225, 225, 255]],
-            [[216, 216, 216, 255], [224, 224, 224, 255], [255, 255, 255, 255], [16, 16, 16, 255]],
-            [[252, 252, 252, 255], [216, 216, 216, 255], [42, 42, 42, 255], [252, 252, 252, 255]],
-            [[18, 18, 18, 255], [169, 169, 169, 255], [223, 223, 223, 255], [252, 252, 252, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [136, 136, 136, 255], [0, 0, 0, 0], [225, 225, 225, 255]],
-            [[216, 216, 216, 255], [224, 224, 224, 255], [255, 255, 255, 255], [16, 16, 16, 255]],
-            [[252, 252, 252, 255], [216, 216, 216, 255], [42, 42, 42, 255], [252, 252, 252, 255]],
-            [[18, 18, 18, 255], [169, 169, 169, 255], [223, 223, 223, 255], [252, 252, 252, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [124, 124, 124, 255], [0, 0, 0, 0], [205, 205, 205, 255]],
-            [[197, 197, 197, 255], [204, 204, 204, 255], [232, 232, 232, 255], [15, 15, 15, 255]],
-            [[230, 230, 230, 255], [196, 196, 196, 255], [38, 38, 38, 255], [229, 229, 229, 255]],
-            [[16, 16, 16, 255], [153, 153, 153, 255], [203, 203, 203, 255], [229, 229, 229, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [124, 124, 124, 255], [0, 0, 0, 0], [205, 205, 205, 255]],
-            [[197, 197, 197, 255], [204, 204, 204, 255], [232, 232, 232, 255], [15, 15, 15, 255]],
-            [[230, 230, 230, 255], [196, 196, 196, 255], [38, 38, 38, 255], [229, 229, 229, 255]],
-            [[16, 16, 16, 255], [153, 153, 153, 255], [203, 203, 203, 255], [229, 229, 229, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGB", None, None, True): Exception,
-    (np.float32, "2D", "RGB", None, None, False): Exception,
-    (np.float32, "2D", "RGB", None, 232, True): Exception,
-    (np.float32, "2D", "RGB", None, 232, False): Exception,
-    (np.float32, "2D", "RGB", None, 13333, True): Exception,
-    (np.float32, "2D", "RGB", None, 13333, False): Exception,
-    (np.float32, "2D", "RGB", np.uint8, None, True): Exception,
-    (np.float32, "2D", "RGB", np.uint8, None, False): Exception,
-    (np.float32, "2D", "RGB", np.uint8, 232, True): Exception,
-    (np.float32, "2D", "RGB", np.uint8, 232, False): Exception,
-    (np.float32, "2D", "RGB", np.uint8, 13333, True): Exception,
-    (np.float32, "2D", "RGB", np.uint8, 13333, False): Exception,
-    (np.float32, "2D", "RGB", np.uint16, None, True): Exception,
-    (np.float32, "2D", "RGB", np.uint16, None, False): Exception,
-    (np.float32, "2D", "RGB", np.uint16, 232, True): Exception,
-    (np.float32, "2D", "RGB", np.uint16, 232, False): Exception,
-    (np.float32, "2D", "RGB", np.uint16, 13333, True): Exception,
-    (np.float32, "2D", "RGB", np.uint16, 13333, False): Exception,
-    (np.float32, "2D", "RGBA", None, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [1, 1, 1, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", None, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [1, 1, 1, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", None, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", None, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [52, 52, 52, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [8, 8, 8, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [45, 45, 45, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [52, 52, 52, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [8, 8, 8, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [45, 45, 45, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint16, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint16, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint16, 13333, True): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "2D", "RGBA", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", None, None, True): np.array(
-        [
-            [[59, 99, 32, 255], [103, 231, 72, 255], [233, 117, 43, 255], [74, 249, 184, 255]],
-            [[0, 185, 137, 0], [232, 72, 187, 255], [86, 56, 249, 255], [35, 88, 101, 255]],
-            [[217, 49, 0, 255], [123, 12, 152, 255], [255, 83, 37, 255], [95, 90, 22, 255]],
-            [[177, 133, 125, 255], [238, 36, 174, 255], [70, 177, 17, 255], [67, 65, 219, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", None, None, False): np.array(
-        [
-            [[32, 99, 59, 255], [72, 231, 103, 255], [43, 117, 233, 255], [184, 249, 74, 255]],
-            [[137, 185, 0, 0], [187, 72, 232, 255], [249, 56, 86, 255], [101, 88, 35, 255]],
-            [[0, 49, 217, 255], [152, 12, 123, 255], [37, 83, 255, 255], [22, 90, 95, 255]],
-            [[125, 133, 177, 255], [174, 36, 238, 255], [17, 177, 70, 255], [219, 65, 67, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", None, 232, True): np.array(
-        [
-            [[54, 90, 29, 255], [94, 210, 65, 255], [212, 106, 39, 255], [68, 227, 167, 255]],
-            [[0, 169, 125, 0], [211, 65, 170, 255], [78, 51, 227, 255], [32, 80, 91, 255]],
-            [[197, 44, 0, 255], [112, 11, 138, 255], [255, 75, 34, 255], [86, 82, 20, 255]],
-            [[161, 121, 113, 255], [216, 33, 158, 255], [64, 161, 15, 255], [61, 59, 199, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", None, 232, False): np.array(
-        [
-            [[29, 90, 54, 255], [65, 210, 94, 255], [39, 106, 212, 255], [167, 227, 68, 255]],
-            [[125, 169, 0, 0], [170, 65, 211, 255], [227, 51, 78, 255], [91, 80, 32, 255]],
-            [[0, 44, 197, 255], [138, 11, 112, 255], [34, 75, 255, 255], [20, 82, 86, 255]],
-            [[113, 121, 161, 255], [158, 33, 216, 255], [15, 161, 64, 255], [199, 59, 61, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 0, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[255, 0, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255], [0, 255, 0, 255]],
-            [[0, 0, 255, 255], [0, 255, 255, 255], [255, 0, 0, 255], [0, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[255, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 0, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 0, 255]],
-            [[255, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255], [255, 255, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
-            [[255, 0, 0, 0], [0, 0, 255, 255], [255, 0, 0, 255], [255, 255, 0, 255]],
-            [[0, 255, 255, 255], [255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 255, 0], [255, 0, 0, 255], [0, 0, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 0, 255], [255, 0, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 255, 255], [255, 0, 0, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
-            [[255, 0, 255, 0], [0, 0, 255, 255], [255, 255, 0, 255], [0, 0, 255, 255]],
-            [[255, 0, 255, 255], [255, 0, 0, 255], [0, 0, 255, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 255, 255], [0, 255, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[255, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255], [0, 0, 0, 255]],
-            [[255, 0, 255, 0], [255, 0, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255]],
-            [[255, 0, 255, 255], [0, 0, 255, 255], [255, 0, 0, 255], [255, 255, 255, 255]],
-            [[0, 0, 0, 255], [255, 0, 0, 255], [0, 255, 0, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[255, 255, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 255, 255], [0, 0, 255, 255], [0, 255, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 255, 255, 255], [0, 255, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 255, 0], [0, 0, 0, 255], [0, 255, 255, 255], [0, 0, 0, 255]],
-            [[255, 0, 0, 255], [255, 0, 0, 255], [0, 255, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 0, 0, 255]],
-            [[255, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 255, 255, 255], [255, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255], [255, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 0, 255, 255]],
-            [[0, 255, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255], [255, 0, 255, 255]],
-            [[255, 255, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[255, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255], [0, 0, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", None, None, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", None, None, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", None, 232, True): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [255, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", None, 232, False): np.array(
-        [
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 0, 255]],
-            [[0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255], [0, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", None, 13333, True): np.array(
-        [
-            [[12, 0, 0, 255], [21, 0, 0, 255], [47, 0, 0, 255], [15, 0, 0, 255]],
-            [[0, 0, 0, 0], [47, 0, 0, 255], [17, 0, 0, 255], [7, 0, 0, 255]],
-            [[44, 0, 0, 255], [25, 0, 0, 255], [255, 0, 0, 255], [19, 0, 0, 255]],
-            [[36, 0, 0, 255], [48, 0, 0, 255], [14, 0, 0, 255], [13, 0, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", None, 13333, False): np.array(
-        [
-            [[0, 0, 12, 255], [0, 0, 21, 255], [0, 0, 47, 255], [0, 0, 15, 255]],
-            [[0, 0, 0, 0], [0, 0, 47, 255], [0, 0, 17, 255], [0, 0, 7, 255]],
-            [[0, 0, 44, 255], [0, 0, 25, 255], [0, 0, 255, 255], [0, 0, 19, 255]],
-            [[0, 0, 36, 255], [0, 0, 48, 255], [0, 0, 14, 255], [0, 0, 13, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint16, None, True): np.array(
-        [
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint16, None, False): np.array(
-        [
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint16, 232, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGB", np.uint16, 13333, False): np.array(
-        [
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGB", "RGBA", None, None, True): Exception,
-    (np.float32, "RGB", "RGBA", None, None, False): Exception,
-    (np.float32, "RGB", "RGBA", None, 232, True): Exception,
-    (np.float32, "RGB", "RGBA", None, 232, False): Exception,
-    (np.float32, "RGB", "RGBA", None, 13333, True): Exception,
-    (np.float32, "RGB", "RGBA", None, 13333, False): Exception,
-    (np.float32, "RGB", "RGBA", np.uint8, None, True): Exception,
-    (np.float32, "RGB", "RGBA", np.uint8, None, False): Exception,
-    (np.float32, "RGB", "RGBA", np.uint8, 232, True): Exception,
-    (np.float32, "RGB", "RGBA", np.uint8, 232, False): Exception,
-    (np.float32, "RGB", "RGBA", np.uint8, 13333, True): Exception,
-    (np.float32, "RGB", "RGBA", np.uint8, 13333, False): Exception,
-    (np.float32, "RGB", "RGBA", np.uint16, None, True): Exception,
-    (np.float32, "RGB", "RGBA", np.uint16, None, False): Exception,
-    (np.float32, "RGB", "RGBA", np.uint16, 232, True): Exception,
-    (np.float32, "RGB", "RGBA", np.uint16, 232, False): Exception,
-    (np.float32, "RGB", "RGBA", np.uint16, 13333, True): Exception,
-    (np.float32, "RGB", "RGBA", np.uint16, 13333, False): Exception,
-    (np.float32, "RGBA", "SIMPLE", None, None, True): np.array(
-        [
-            [[248, 159, 5, 0], [217, 237, 151, 255], [102, 203, 57, 44], [244, 177, 73, 196]],
-            [[29, 189, 17, 250], [168, 188, 84, 208], [198, 134, 144, 81], [208, 209, 210, 126]],
-            [[8, 212, 80, 241], [159, 153, 128, 236], [0, 0, 7, 0], [249, 140, 61, 88]],
-            [[175, 255, 216, 90], [42, 76, 23, 172], [64, 65, 205, 254], [0, 255, 148, 117]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", None, None, False): np.array(
-        [
-            [[5, 159, 248, 0], [151, 237, 217, 255], [57, 203, 102, 44], [73, 177, 244, 196]],
-            [[17, 189, 29, 250], [84, 188, 168, 208], [144, 134, 198, 81], [210, 209, 208, 126]],
-            [[80, 212, 8, 241], [128, 153, 159, 236], [7, 0, 0, 0], [61, 140, 249, 88]],
-            [[216, 255, 175, 90], [23, 76, 42, 172], [205, 65, 64, 254], [148, 255, 0, 117]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", None, 232, True): np.array(
-        [
-            [[225, 145, 5, 0], [197, 215, 138, 255], [93, 185, 51, 40], [222, 161, 66, 178]],
-            [[26, 172, 15, 227], [153, 171, 76, 189], [181, 122, 131, 73], [189, 190, 191, 114]],
-            [[7, 193, 73, 219], [144, 139, 116, 215], [0, 0, 6, 0], [227, 127, 55, 80]],
-            [[159, 255, 197, 82], [38, 69, 21, 157], [58, 59, 186, 231], [0, 232, 134, 107]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", None, 232, False): np.array(
-        [
-            [[5, 145, 225, 0], [138, 215, 197, 255], [51, 185, 93, 40], [66, 161, 222, 178]],
-            [[15, 172, 26, 227], [76, 171, 153, 189], [131, 122, 181, 73], [191, 190, 189, 114]],
-            [[73, 193, 7, 219], [116, 139, 144, 215], [6, 0, 0, 0], [55, 127, 227, 80]],
-            [[197, 255, 159, 82], [21, 69, 38, 157], [186, 59, 58, 231], [134, 232, 0, 107]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", None, 13333, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 0, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", None, 13333, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 0, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint8, None, True): np.array(
-        [
-            [[255, 0, 0, 0], [0, 0, 0, 255], [255, 0, 0, 255], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 0, 255, 255]],
-            [[255, 255, 255, 0], [0, 0, 255, 255], [255, 255, 0, 0], [0, 255, 0, 255]],
-            [[0, 255, 255, 255], [255, 255, 0, 255], [255, 0, 0, 255], [255, 255, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint8, None, False): np.array(
-        [
-            [[0, 0, 255, 0], [0, 0, 0, 255], [0, 0, 255, 255], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 0, 255, 255]],
-            [[255, 255, 255, 0], [255, 0, 0, 255], [0, 255, 255, 0], [0, 255, 0, 255]],
-            [[255, 255, 0, 255], [0, 255, 255, 255], [0, 0, 255, 255], [255, 255, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint8, 232, True): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 255, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[255, 255, 0, 0], [0, 0, 255, 0], [0, 255, 0, 0], [0, 255, 0, 255]],
-            [[0, 0, 0, 0], [255, 0, 255, 0], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [255, 0, 0, 0], [255, 0, 255, 0], [255, 255, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint8, 232, False): np.array(
-        [
-            [[0, 0, 0, 0], [255, 0, 0, 255], [0, 0, 0, 255], [255, 0, 255, 255]],
-            [[0, 255, 255, 0], [255, 0, 0, 0], [0, 255, 0, 0], [0, 255, 0, 255]],
-            [[0, 0, 0, 0], [255, 0, 255, 0], [255, 255, 255, 0], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [0, 0, 255, 0], [255, 0, 255, 0], [255, 255, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint8, 13333, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint16, None, True): np.array(
-        [
-            [[0, 0, 255, 0], [0, 255, 255, 0], [255, 255, 0, 255], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [255, 255, 0, 255], [0, 0, 255, 255], [255, 0, 0, 255]],
-            [[0, 0, 255, 0], [255, 0, 0, 0], [255, 255, 255, 0], [0, 255, 255, 0]],
-            [[255, 0, 255, 0], [255, 0, 0, 255], [255, 0, 0, 0], [255, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint16, None, False): np.array(
-        [
-            [[255, 0, 0, 0], [255, 255, 0, 0], [0, 255, 255, 255], [0, 0, 0, 255]],
-            [[0, 255, 0, 255], [0, 255, 255, 255], [255, 0, 0, 255], [0, 0, 255, 255]],
-            [[255, 0, 0, 0], [0, 0, 255, 0], [255, 255, 255, 0], [255, 255, 0, 0]],
-            [[255, 0, 255, 0], [0, 0, 255, 255], [0, 0, 255, 0], [0, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint16, 232, True): np.array(
-        [
-            [[255, 0, 0, 0], [0, 0, 255, 0], [255, 0, 255, 0], [255, 0, 255, 0]],
-            [[0, 0, 255, 0], [255, 255, 0, 255], [0, 0, 0, 0], [255, 0, 0, 255]],
-            [[0, 0, 0, 255], [255, 0, 0, 0], [255, 255, 255, 0], [0, 0, 0, 0]],
-            [[255, 0, 0, 0], [0, 255, 255, 0], [0, 0, 255, 255], [255, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint16, 232, False): np.array(
-        [
-            [[0, 0, 255, 0], [255, 0, 0, 0], [255, 0, 255, 0], [255, 0, 255, 0]],
-            [[255, 0, 0, 0], [0, 255, 255, 255], [0, 0, 0, 0], [0, 0, 255, 255]],
-            [[0, 0, 0, 255], [0, 0, 255, 0], [255, 255, 255, 0], [0, 0, 0, 0]],
-            [[0, 0, 255, 0], [255, 255, 0, 0], [255, 0, 0, 255], [0, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint16, 13333, True): np.array(
-        [
-            [[255, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 255, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 0], [0, 0, 255, 255]],
-            [[0, 0, 0, 0], [0, 0, 255, 255], [255, 255, 0, 0], [255, 255, 0, 0]],
-            [[255, 0, 0, 0], [0, 255, 0, 0], [0, 0, 0, 255], [255, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "SIMPLE", np.uint16, 13333, False): np.array(
-        [
-            [[0, 0, 255, 0], [0, 0, 0, 0], [0, 0, 0, 255], [255, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 255, 0], [255, 0, 0, 255]],
-            [[0, 0, 0, 0], [255, 0, 0, 255], [0, 255, 255, 0], [0, 255, 255, 0]],
-            [[0, 0, 255, 0], [0, 255, 0, 0], [0, 0, 0, 255], [0, 0, 255, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGB", None, None, True): Exception,
-    (np.float32, "RGBA", "RGB", None, None, False): Exception,
-    (np.float32, "RGBA", "RGB", None, 232, True): Exception,
-    (np.float32, "RGBA", "RGB", None, 232, False): Exception,
-    (np.float32, "RGBA", "RGB", None, 13333, True): Exception,
-    (np.float32, "RGBA", "RGB", None, 13333, False): Exception,
-    (np.float32, "RGBA", "RGB", np.uint8, None, True): Exception,
-    (np.float32, "RGBA", "RGB", np.uint8, None, False): Exception,
-    (np.float32, "RGBA", "RGB", np.uint8, 232, True): Exception,
-    (np.float32, "RGBA", "RGB", np.uint8, 232, False): Exception,
-    (np.float32, "RGBA", "RGB", np.uint8, 13333, True): Exception,
-    (np.float32, "RGBA", "RGB", np.uint8, 13333, False): Exception,
-    (np.float32, "RGBA", "RGB", np.uint16, None, True): Exception,
-    (np.float32, "RGBA", "RGB", np.uint16, None, False): Exception,
-    (np.float32, "RGBA", "RGB", np.uint16, 232, True): Exception,
-    (np.float32, "RGBA", "RGB", np.uint16, 232, False): Exception,
-    (np.float32, "RGBA", "RGB", np.uint16, 13333, True): Exception,
-    (np.float32, "RGBA", "RGB", np.uint16, 13333, False): Exception,
-    (np.float32, "RGBA", "RGBA", None, None, True): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", None, None, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", None, 232, True): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", None, 232, False): np.array(
-        [
-            [[0, 0, 0, 0], [0, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-            [[0, 255, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", None, 13333, True): np.array(
-        [
-            [[0, 0, 1, 0], [0, 0, 31, 255], [0, 0, 11, 0], [0, 0, 15, 0]],
-            [[0, 0, 3, 0], [0, 0, 17, 0], [0, 0, 29, 0], [0, 0, 43, 0]],
-            [[0, 0, 16, 0], [0, 0, 26, 0], [0, 0, 1, 0], [0, 0, 12, 0]],
-            [[0, 255, 44, 0], [0, 0, 4, 0], [0, 0, 42, 0], [0, 0, 30, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", None, 13333, False): np.array(
-        [
-            [[1, 0, 0, 0], [31, 0, 0, 255], [11, 0, 0, 0], [15, 0, 0, 0]],
-            [[3, 0, 0, 0], [17, 0, 0, 0], [29, 0, 0, 0], [43, 0, 0, 0]],
-            [[16, 0, 0, 0], [26, 0, 0, 0], [1, 0, 0, 0], [12, 0, 0, 0]],
-            [[44, 255, 0, 0], [4, 0, 0, 0], [42, 0, 0, 0], [30, 0, 0, 0]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint8, None, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint8, None, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint8, 232, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint8, 232, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint8, 13333, True): np.array(
-        [
-            [[255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint8, 13333, False): np.array(
-        [
-            [[0, 255, 255, 0], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint16, None, True): np.array(
-        [
-            [[255, 255, 0, 0], [255, 255, 0, 0], [255, 255, 255, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 0, 0], [255, 255, 0, 255]],
-            [[255, 0, 0, 255], [255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint16, None, False): np.array(
-        [
-            [[0, 255, 255, 0], [0, 255, 255, 0], [255, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [0, 255, 255, 0], [0, 255, 255, 255]],
-            [[0, 0, 255, 255], [255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint16, 232, True): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint16, 232, False): np.array(
-        [
-            [[255, 255, 255, 0], [255, 255, 255, 0], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 0], [255, 255, 255, 255]],
-            [[255, 0, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint16, 13333, True): np.array(
-        [
-            [[255, 255, 0, 0], [255, 255, 0, 0], [255, 255, 0, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255]],
-            [[255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 0], [255, 255, 255, 255]],
-            [[255, 0, 0, 255], [255, 255, 0, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-    (np.float32, "RGBA", "RGBA", np.uint16, 13333, False): np.array(
-        [
-            [[0, 255, 255, 0], [0, 255, 255, 0], [0, 255, 255, 255], [255, 255, 255, 255]],
-            [[255, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 255]],
-            [[0, 255, 255, 255], [0, 255, 255, 255], [0, 255, 255, 0], [255, 255, 255, 255]],
-            [[0, 0, 255, 255], [0, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]],
-        ],
-        dtype=np.uint8,
-    ),
-}
+from .makeARGB_test_data import EXPECTED_OUTPUTS, INPUTS, LEVELS, LUTS
 
 
-def _error_description(output, test_case):
-    return (
-        f"'{test_case['name']}' output does not match expectations\n"
-        + f"\tExpected:\n{test_case['expected_output']!r}\n\n"
-        + f"\tReceived:\n{output!r}\n"
-    )
-
+try:
+    import numba
+except ImportError:
+    pass
 
-def _do_something_for_every_combo(func):
-    for dtype in [np.uint8, np.uint16, np.float32]:
-        for in_fmt in ["2D", "RGB", "RGBA"]:
-            data = INPUTS[(dtype, in_fmt)]
-            for levels_name in [None, "SIMPLE", "RGB", "RGBA"]:
-                levels = LEVELS.get(levels_name, None)
-                if dtype == np.float32 and levels_name is None:
-                    continue
-                for lut_type in [None, np.uint8, np.uint16]:
-                    lut = LUTS.get(lut_type, None)
-                    for scale in [None, 232, 13333]:
-                        for use_rgba in [True, False]:
-                            key = (dtype, in_fmt, levels_name, lut_type, scale, use_rgba)
-                            func(data, key, levels, lut, scale, use_rgba)
+try:
+    import cupy
+except ImportError:
+    pass
 
 
 def _makeARGB(*args, **kwds):
@@ -4257,93 +31,195 @@ def _makeARGB(*args, **kwds):
     return out, alpha
 
 
-def save_reference():
-    """
-    This saves the output (or exception type) of running makeARGB for every combo of arguments. The
-    output isn't fit for immediate inclusion in this file as EXPECTED_OUTPUTS, and needs some replace-all
-    work.
-    """
-    with open("_unformatted_expected_outputs_", "w") as tmp_file:
-
-        def write_expectation_to_file(data, key, levels, lut, scale, use_rgba):
-            try:
-                output, alpha = _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
-            except Exception as e:
-                tmp_file.write(f"{key!r}: {type(e)}\n")
-            else:
-                tmp_file.write(f"{key!r}: {output!r},\n")
-
-        _do_something_for_every_combo(write_expectation_to_file)
-
-
-def test_makeARGB_against_generated_references():
-    def assert_correct(data, key, levels, lut, scale, use_rgba):
-        expectation = EXPECTED_OUTPUTS[key]
-        if isinstance(expectation, type) and issubclass(expectation, Exception):
-            try:
-                _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
-            except Exception as e:
-                assert expectation == type(e)
-            else:
-                assert False, f"makeARGB({key!r}) was supposed to raise {expectation} but didn't raise anything."
-        else:
-            output, alpha = _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
-            assert (
-                output == expectation
-            ).all(), f"Incorrect _makeARGB({key!r}) output! Expected:\n{expectation!r}\n  Got:\n{output!r}"
-
-    _do_something_for_every_combo(assert_correct)
-
+@pytest.mark.filterwarnings("ignore:invalid value encountered")
+@pytest.mark.parametrize('acceleration', [
+        pytest.param('numpy'),
+        pytest.param('cupy', marks=pytest.mark.skipif('cupy' not in sys.modules, reason="CuPy not available")),
+        pytest.param('numba', marks=pytest.mark.skipif('numba' not in sys.modules, reason="numba not available"))
+    ]
+)
+@pytest.mark.parametrize('dtype', [np.uint8, np.uint16, np.float32])
+@pytest.mark.parametrize('in_fmt', ["2D", "RGB", "RGBA"])
+@pytest.mark.parametrize('level_name', [None, 'SIMPLE', 'RGB', 'RGBA'])
+@pytest.mark.parametrize('lut_type', [None, np.uint8, np.uint16])
+@pytest.mark.parametrize('scale', [None, 232, 13333])
+@pytest.mark.parametrize('use_rgba', [True, False])
+def test_makeARGB_against_generated_references(acceleration, dtype, in_fmt, level_name, lut_type, scale, use_rgba):
+    if acceleration == "numba":
+        setConfigOptions(useCupy=False, useNumba=True)
+    elif acceleration == "cupy":
+        setConfigOptions(useCupy=True, useNumba=False)
+    else:
+        setConfigOptions(useCupy=False, useNumba=False)
+
+    if dtype == np.float32 and level_name is None:
+        pytest.skip(f"{dtype=} is not compatable with {level_name=}")
+
+    data = INPUTS[(dtype, in_fmt)]
+    levels = LEVELS.get(level_name, None)
+    lut = LUTS.get(lut_type, None)
+
+    key = (dtype, in_fmt, level_name, lut_type, scale, use_rgba)
+    expectation = EXPECTED_OUTPUTS[key]
+    if isinstance(expectation, type) and issubclass(expectation, Exception):
+        with pytest.raises(expectation) as exc_info:
+            _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
+        assert exc_info.type is expectation, f"makeARGB({key!r}) was supposed to raise {expectation}"
+    else:
+        output, alpha = _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
+        assert (
+            output == expectation
+        ).all(), f"Incorrect _makeARGB({key!r}) output! Expected:\n{expectation!r}\n  Got:\n{output!r}"
+    setConfigOptions(useCupy=False, useNumba=False)
+
+
+@pytest.mark.parametrize('makeARGB_args,makeARGB_kwargs',
+    [
+        pytest.param(
+            [np.zeros((2,), dtype='float')],
+            dict(),
+            marks=pytest.mark.xfail(
+                raises=TypeError,
+                strict=True,
+                reason="invalid image shape (ndim=1)"
+            )
+        ),
+        pytest.param(
+            [np.zeros((2, 2, 7), dtype='float')],
+            dict(),
+            marks=pytest.mark.xfail(
+                raises=TypeError,
+                strict=True,
+                reason="invalid_image_shape (ndim=3)"
+            )
+        ),
+        pytest.param(
+            [np.zeros((2, 2, 7), dtype='float')],
+            dict(),
+            marks=pytest.mark.xfail(
+                raises=Exception,
+                strict=True,
+                reason="float images require levels arg"
+            )
+        ),
+        pytest.param(
+            [np.zeros((2, 2), dtype='float')],
+            dict(levels=[1]),
+            marks=pytest.mark.xfail(
+                raises=Exception,
+                strict=True,
+                reason="bad levels arg"
+            )
+        ),
+        pytest.param(
+            [np.zeros((2, 2), dtype='float')],
+            dict(levels=[1, 2, 3]),
+            marks=pytest.mark.xfail(
+                raises=Exception,
+                strict=True,
+                reason="bad levels arg"
+            )
+        ),
+        pytest.param(
+            [np.zeros((2, 2))],
+            dict(lut=np.zeros((10, 3), dtype='ubyte'), levels=[(0, 1)] * 3),
+            marks=pytest.mark.xfail(
+                raises=Exception,
+                strict=True,
+                reason="can't mix 3-channel levels and LUT"
+            ),
+        ),
+        pytest.param(
+            [np.zeros((2, 2, 3), dtype='float')],
+            dict(levels=[(1, 2)] * 4),
+            marks=pytest.mark.xfail(
+                raises=Exception,
+                strict=True,
+                reason="multichannel levels must have same number of channels as image"
+            )
+        ),
+        pytest.param(
+            [np.zeros((2, 2, 3), dtype='float')],
+            dict(levels=np.zeros([3, 2, 2])),
+            marks=pytest.mark.xfail(
+                raises=Exception,
+                strict=True,
+                reason="3d levels not allowed"
+            ),
+        )
+    ]
+)
+def test_makeARGB_exceptions(makeARGB_args, makeARGB_kwargs):
+    _makeARGB(*makeARGB_args, **makeARGB_kwargs)
 
-@pytest.mark.skipif(cupy is None, reason="CuPy unavailable to test")
-def test_cupy_makeARGB_against_generated_references():
-    prev_setting = getConfigOption("useCupy")
-    try:
-        setConfigOption("useCupy", True)
 
-        cupy = getCupy()
+def test_makeARGB_with_nans():
+    # nans in image
+    # 2d input image, one pixel is nan
+    im1 = np.ones((10, 12))
+    im1[3, 5] = np.nan
+    # seems to address segfault in CI on macos (ARM) + conda + pyqt5 + py312
+    im1.setflags(write=False)
+    im2, alpha = _makeARGB(im1, levels=(0, 1))
+    assert alpha
+    assert im2[3, 5, 3] == 0  # nan pixel is transparent
+    assert im2[0, 0, 3] == 255  # doesn't affect other pixels
 
-        def assert_cupy_correct(data, key, levels, lut, scale, use_rgba):
-            data = cupy.asarray(data)
-            if lut is not None:
-                lut = cupy.asarray(lut)
-            expectation = EXPECTED_OUTPUTS[key]
-            if isinstance(expectation, type) and issubclass(expectation, Exception):
-                try:
-                    _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
-                except Exception as e:
-                    assert expectation == type(e)
-                else:
-                    assert False, f"makeARGB({key!r}) was supposed to raise {expectation} but didn't raise anything."
-            else:
-                expectation = cupy.asarray(expectation)
-                output, alpha = _makeARGB(data, lut=lut, levels=levels, scale=scale, useRGBA=use_rgba)
-                assert (
-                    output == expectation
-                ).all(), f"Incorrect _makeARGB({key!r}) output! Expected:\n{expectation!r}\n  Got:\n{output!r}"
+    # With masking nans disabled, the nan pixel shouldn't be transparent
+    im2, alpha = _makeARGB(im1, levels=(0, 1), maskNans=False)
+    assert im2[3, 5, 3] == 255
 
-        _do_something_for_every_combo(assert_cupy_correct)
-    finally:
-        setConfigOption("useCupy", prev_setting)
+    # 3d RGB input image, any color channel of a pixel is nan
+    im1 = np.ones((10, 12, 3))
+    im1[3, 5, 1] = np.nan
+    # seems to address segfault in CI on macos (ARM) + conda + pyqt5 + py312
+    im1.setflags(write=False)
+    im2, alpha = _makeARGB(im1, levels=(0, 1))
+    assert alpha
+    assert im2[3, 5, 3] == 0  # nan pixel is transparent
+    assert im2[0, 0, 3] == 255  # doesn't affect other pixels
 
+    # 3d RGBA input image, any color channel of a pixel is nan
+    im1 = np.ones((10, 12, 4))
+    im1[3, 5, 1] = np.nan
+    # seems to address segfault in CI on macos (ARM) + conda + pyqt5 + py312
+    im1.setflags(write=False)
+    im2, alpha = _makeARGB(im1, levels=(0, 1), useRGBA=True)
+    assert alpha
+    assert im2[3, 5, 3] == 0  # nan pixel is transparent
 
-@pytest.mark.filterwarnings("ignore:invalid value encountered")
-def test_numba_makeARGB_against_generated_references():
-    oldcfg_numba = getConfigOption("useNumba")
-    if not oldcfg_numba:
-        try:
-            import numba
-        except ImportError:
-            pytest.skip("Numba unavailable to test")
 
-    # useCupy needs to be set to False because it takes
-    # precedence over useNumba in rescaleData
-    oldcfg_cupy = getConfigOption("useCupy")
-    setConfigOption("useCupy", False)
-    setConfigOption("useNumba", not oldcfg_numba)
-    test_makeARGB_against_generated_references()
-    setConfigOption("useNumba", oldcfg_numba)
-    setConfigOption("useCupy", oldcfg_cupy)
+def checkArrays(a, b):
+    # because pytest output is difficult to read for arrays
+    if not np.all(a == b):
+        comp = []
+        for i in range(a.shape[0]):
+            if a.shape[1] > 1:
+                comp.append('[')
+            for j in range(a.shape[1]):
+                m = a[i, j] == b[i, j]
+                comp.append('%d,%d  %s %s  %s%s' %
+                            (i, j, str(a[i, j]).ljust(15), str(b[i, j]).ljust(15),
+                             m, ' ********' if not np.all(m) else ''))
+            if a.shape[1] > 1:
+                comp.append(']')
+        raise ValueError("arrays do not match:\n%s" % '\n'.join(comp))
+
+
+def checkImage(img, check, alpha, alphaCheck):
+    assert img.dtype == np.ubyte
+    assert alpha is alphaCheck
+    if alpha is False:
+        checkArrays(img[..., 3], 255)
+
+    if np.isscalar(check) or check.ndim == 3:
+        checkArrays(img[..., :3], check)
+    elif check.ndim == 2:
+        checkArrays(img[..., :3], check[..., np.newaxis])
+    elif check.ndim == 1:
+        checkArrays(img[..., :3], check[..., np.newaxis, np.newaxis])
+    else:
+        raise ValueError('Invalid check array ndim')
 
 
 def test_makeARGB_with_human_readable_code():
@@ -4358,40 +234,11 @@ def test_makeARGB_with_human_readable_code():
     # Need to check that all input values map to the correct output values, especially
     # at and beyond the edges of the level range.
 
-    def checkArrays(a, b):
-        # because py.test output is difficult to read for arrays
-        if not np.all(a == b):
-            comp = []
-            for i in range(a.shape[0]):
-                if a.shape[1] > 1:
-                    comp.append('[')
-                for j in range(a.shape[1]):
-                    m = a[i, j] == b[i, j]
-                    comp.append('%d,%d  %s %s  %s%s' %
-                                (i, j, str(a[i, j]).ljust(15), str(b[i, j]).ljust(15),
-                                 m, ' ********' if not np.all(m) else ''))
-                if a.shape[1] > 1:
-                    comp.append(']')
-            raise Exception("arrays do not match:\n%s" % '\n'.join(comp))
-
-    def checkImage(img, check, alpha, alphaCheck):
-        assert img.dtype == np.ubyte
-        assert alpha is alphaCheck
-        if alpha is False:
-            checkArrays(img[..., 3], 255)
-
-        if np.isscalar(check) or check.ndim == 3:
-            checkArrays(img[..., :3], check)
-        elif check.ndim == 2:
-            checkArrays(img[..., :3], check[..., np.newaxis])
-        elif check.ndim == 1:
-            checkArrays(img[..., :3], check[..., np.newaxis, np.newaxis])
-        else:
-            raise Exception('invalid check array ndim')
 
     # uint8 data tests
 
     im1 = np.arange(256).astype('ubyte').reshape(256, 1)
+    im1.setflags(write=False)
     im2, alpha = _makeARGB(im1, levels=(0, 255))
     checkImage(im2, im1, alpha, False)
 
@@ -4455,6 +302,7 @@ def checkImage(img, check, alpha, alphaCheck):
 
     # uint16 data tests
     im1 = np.arange(0, 2 ** 16, 256).astype('uint16')[:, None]
+    im1.setflags(write=False)
     im2, alpha = _makeARGB(im1, levels=(512, 2 ** 16))
     checkImage(im2, np.clip(np.linspace(-2, 253, 256), 0, 255).astype('ubyte'), alpha, False)
 
@@ -4466,72 +314,16 @@ def checkImage(img, check, alpha, alphaCheck):
     lut[1000:1256] = np.arange(256)
     lut[1256:] = 255
     im1 = np.arange(1000, 1256).astype('uint16')[:, None]
+    im1.setflags(write=False)
     im2, alpha = _makeARGB(im1, lut=lut)
     checkImage(im2, np.arange(256).astype('ubyte'), alpha, False)
 
     # float data tests
     im1 = np.linspace(1.0, 17.0, 256)[:, None]
+    im1.setflags(write=False)
     im2, alpha = _makeARGB(im1, levels=(5.0, 13.0))
     checkImage(im2, np.clip(np.linspace(-128, 383, 256), 0, 255).astype('ubyte'), alpha, False)
 
     lut = (np.arange(1280)[::-1] // 10).astype('ubyte')
     im2, alpha = _makeARGB(im1, lut=lut, levels=(1, 17))
     checkImage(im2, np.linspace(127.5, 0, 256).astype('ubyte'), alpha, False)
-
-    # nans in image
-
-    # 2d input image, one pixel is nan
-    im1 = np.ones((10, 12))
-    im1[3, 5] = np.nan
-    im2, alpha = _makeARGB(im1, levels=(0, 1))
-    assert alpha
-    assert im2[3, 5, 3] == 0  # nan pixel is transparent
-    assert im2[0, 0, 3] == 255  # doesn't affect other pixels
-
-    # With masking nans disabled, the nan pixel shouldn't be transparent
-    im2, alpha = _makeARGB(im1, levels=(0, 1), maskNans=False)
-    assert im2[3, 5, 3] == 255
-
-    # 3d RGB input image, any color channel of a pixel is nan
-    im1 = np.ones((10, 12, 3))
-    im1[3, 5, 1] = np.nan
-    im2, alpha = _makeARGB(im1, levels=(0, 1))
-    assert alpha
-    assert im2[3, 5, 3] == 0  # nan pixel is transparent
-    assert im2[0, 0, 3] == 255  # doesn't affect other pixels
-
-    # 3d RGBA input image, any color channel of a pixel is nan
-    im1 = np.ones((10, 12, 4))
-    im1[3, 5, 1] = np.nan
-    im2, alpha = _makeARGB(im1, levels=(0, 1), useRGBA=True)
-    assert alpha
-    assert im2[3, 5, 3] == 0  # nan pixel is transparent
-
-    # test sanity checks
-    class AssertExc(object):
-        def __init__(self, exc=Exception):
-            self.exc = exc
-
-        def __enter__(self):
-            return self
-
-        def __exit__(self, *args):
-            assert args[0] is self.exc, "Should have raised %s (got %s)" % (self.exc, args[0])
-            return True
-
-    with AssertExc(TypeError):  # invalid image shape
-        _makeARGB(np.zeros((2,), dtype='float'))
-    with AssertExc(TypeError):  # invalid image shape
-        _makeARGB(np.zeros((2, 2, 7), dtype='float'))
-    with AssertExc():  # float images require levels arg
-        _makeARGB(np.zeros((2, 2), dtype='float'))
-    with AssertExc():  # bad levels arg
-        _makeARGB(np.zeros((2, 2), dtype='float'), levels=[1])
-    with AssertExc():  # bad levels arg
-        _makeARGB(np.zeros((2, 2), dtype='float'), levels=[1, 2, 3])
-    with AssertExc():  # can't mix 3-channel levels and LUT
-        _makeARGB(np.zeros((2, 2)), lut=np.zeros((10, 3), dtype='ubyte'), levels=[(0, 1)] * 3)
-    with AssertExc():  # multichannel levels must have same number of channels as image
-        _makeARGB(np.zeros((2, 2, 3), dtype='float'), levels=[(1, 2)] * 4)
-    with AssertExc():  # 3d levels not allowed
-        _makeARGB(np.zeros((2, 2, 3), dtype='float'), levels=np.zeros([3, 2, 2]))