import base64


def encode(image):
    """Encode an image

    Parameters
    ----------
    image : np.array
        RGB image to encode

    Returns
    -------
    dict
        Encoded image
    """

    return {
        "shape": image.shape,
        "data": base64.b64encode(image)
    }