(self, transparent)
Helper used by :meth:`testLtrns*`.
Helper used by :meth:`testLtrns*`.
Helper used by : meth : testLtrns * .
def helperLtrns(self, transparent):
        """Helper used by :meth:`testLtrns*`."""
        pixels = list(zip([0x00, 0x38, 0x4c, 0x54, 0x5c, 0x40, 0x38, 0x00]))
        o = BytesIO()
        w = Writer(8, 8, greyscale=True, bitdepth=1, transparent=transparent)
        w.write_packed(o, pixels)
        r = Reader(bytes=o.getvalue())
        x,y,pixels,meta = r.asDirect()
        self.assertTrue(meta['alpha'])
        self.assertTrue(meta['greyscale'])
        self.assertEqual(meta['bitdepth'], 1)
def helperLtrns ( self , transparent ) : pixels = list ( zip ( [ 0x00 , 0x38 , 0x4c , 0x54 , 0x5c , 0x40 , 0x38 , 0x00 ] ) ) o = BytesIO ( ) w = Writer ( 8 , 8 , greyscale = True , bitdepth = 1 , transparent = transparent ) w . write_packed ( o , pixels ) r = Reader ( bytes = o . getvalue ( ) ) x , y , pixels , meta = r . asDirect ( ) self . assertTrue ( meta [ 'alpha' ] ) self . assertTrue ( meta [ 'greyscale' ] ) self . assertEqual ( meta [ 'bitdepth' ] , 1 )