parameters: (self)
docstring: Test that bitdepth can be used to fiddle with pallete image.
docstring_summary: Test that bitdepth can be used to fiddle with pallete image.
docstring_tokens: Test that bitdepth can be used to fiddle with pallete image .
function: def testPalExpand(self):
          """Test that bitdepth can be used to fiddle with pallete image."""
          r = Reader(bytes=_pngsuite['basn3p04'])
          x,y,pixels,info = r.read()
          pixels = [list(row) for row in pixels]
          info['bitdepth'] = 8
          w = Writer(**info)
          o = BytesIO()
          w.write(o, pixels)
          o.flush()
          o.seek(0)
          r = Reader(file=o)
          _,_,again_pixels,again_info = r.read()
          # Same pixels
          again_pixels = [list(row) for row in again_pixels]
          self.assertEqual(again_pixels, pixels)
function_tokens: def testPalExpand ( self ) : r = Reader ( bytes = _pngsuite [ 'basn3p04' ] ) x , y , pixels , info = r . read ( ) pixels = [ list ( row ) for row in pixels ] info [ 'bitdepth' ] = 8 w = Writer ( * * info ) o = BytesIO ( ) w . write ( o , pixels ) o . flush ( ) o . seek ( 0 ) r = Reader ( file = o ) _ , _ , again_pixels , again_info = r . read ( ) # Same pixels again_pixels = [ list ( row ) for row in again_pixels ] self . assertEqual ( again_pixels , pixels )