def _converttoRocImage(self, imgarray):
    image_pillow = Image.fromarray(imgarray)
    image_roc = roc.roc_image()
    image_roc.width = image_pillow.width
    image_roc.height = image_pillow.height
    image_roc.step = (3 * image_pillow.width)
    image_roc.color_space = roc.ROC_BGR24
    bytes = ((3 * image_pillow.width) * image_pillow.height)
    image_roc.data = roc.new_uint8_t_array((bytes + 1))
    roc.memmove(image_roc.data, image_pillow.tobytes())
    roc.roc_ensure(roc.roc_swap_channels(image_roc))
    return image_roc
def _converttoRocImage(self, imgarray):
    image_pillow = Image.fromarray(imgarray)
    image_roc = roc.roc_image()
    image_roc.width = image_pillow.width
    image_roc.height = image_pillow.height
    image_roc.step = (3 * image_pillow.width)
    image_roc.color_space = roc.ROC_BGR24
    bytes = ((3 * image_pillow.width) * image_pillow.height)
    image_roc.data = roc.new_uint8_t_array((bytes + 1))
    roc.memmove(image_roc.data, image_pillow.tobytes())
    roc.roc_ensure(roc.roc_swap_channels(image_roc))
    return image_roc