rotate 90
In [3]:
import imageio.v2 as imageio
import numpy as np
import matplotlib.pyplot as plt
def plot_image_from_array(image_array, title='Image'):
plt.imshow(image_array, cmap='gray')
plt.axis('off') # Hide axes
plt.title(title)
plt.show()
image = imageio.imread('Sharbat_Gula.jpg')
print("Image shape:", image.shape)
Image shape: (400, 254, 3)
In [4]:
rotated_image = np.rot90(image)
plot_image_from_array(rotated_image, title='Rotate 90 image')
