I am taking a PIL image, converting it to OpenCV, performing an image overlay and then trying to return it as a PIL image. Usually this works for me but now I am getting an