I have written a basic Python code to create an image and then putting a rectangle on the boundaries. This doesn\'t seem to work. I have checked multiple sites and this is t
Found the solution. Thanks @Martijn Pieters
import cv2 import numpy as np from PIL import Image img = Image.new('RGB', (800, 900), color= (171, 183, 255)) open_cv_image = np.array(img) cv2.rectangle(open_cv_image,(0,0),(800,900),(0,0,0),30) img2 = Image.fromarray(open_cv_image, 'RGB')