def tile_decoder(**kwargs):
stream = openjp2.stream_create_default_file_stream(kwargs['<STR_LIT:filename>'],<EOL>True)<EOL>dparam = openjp2.set_default_decoder_parameters()<EOL>dparam.decod_format = kwargs['<STR_LIT>']<EOL>dparam.cp_layer = <NUM_LIT:0><EOL>dparam.cp_reduce = <NUM_LIT:0><EOL>codec = openjp2.create_decompress(kwargs['<STR_LIT>'])<EOL>openjp2.set_info_handler(codec, None)<EOL>openjp2.set_warning_handler(codec, None)<EOL>openjp2.set_error_handler(codec, None)<EOL>openjp2.setup_decoder(codec, dparam)<EOL>image = openjp2.read_header(stream, codec)<EOL>openjp2.set_decode_area(codec, image,<EOL>kwargs['<STR_LIT>'], kwargs['<STR_LIT>'],<EOL>kwargs['<STR_LIT>'], kwargs['<STR_LIT>'])<EOL>data = np.zeros((<NUM_LIT>, <NUM_LIT>, <NUM_LIT:3>), dtype=np.uint8)<EOL>while True:<EOL><INDENT>rargs = openjp2.read_tile_header(codec, stream)<EOL>tidx = rargs[<NUM_LIT:0>]<EOL>size = rargs[<NUM_LIT:1>]<EOL>go_on = rargs[-<NUM_LIT:1>]<EOL>if not go_on:<EOL><INDENT>break<EOL><DEDENT>openjp2.decode_tile_data(codec, tidx, data, size, stream)<EOL><DEDENT>openjp2.end_decompress(codec, stream)<EOL>openjp2.destroy_codec(codec)<EOL>openjp2.stream_destroy(stream)<EOL>openjp2.image_destroy(image)<EOL>
Fixture called with various configurations by many tests.

    Reads a tile.  That's all it does.