I am rotating an image 45 degree. When I rotate the image it has a black border and the image size changes from 256x256 to 364x364. I want to remove the values of this black border and keep the size 256. In pillow if I put fill color then the black border will go away but the size is still the same. Is there any way that I can remove the black border and retain the original shape
code to rotate
path = "E:\\download\\1.jpeg"
image = cv2.imread(path)
rotated = imutils.rotate_bound(image, -33)
Original Image
Rotate image