def decodejpg(encoded, tables=b'', photometric=None, ycbcr_subsampling=None,
    ycbcr_positioning=None):
    """Decode JPEG encoded byte string (using _czifile extension module)."""
    import _czifile
    image = _czifile.decodejpg(encoded, tables)
    if photometric == 'rgb' and ycbcr_subsampling and ycbcr_positioning:
        pass
    return image.tostring()
