# create flipped versions of an image
from PIL import Image
from matplotlib import pyplot

# load image
image = Image.open("E:\\Wallpapers\\Alone.jpg")

# horizontal flip
hoz_flip = image.transpose(Image.FLIP_LEFT_RIGHT)

# vertical flip
ver_flip = image.transpose(Image.FLIP_TOP_BOTTOM)

# plot all three images using matplotlib
pyplot.subplot(311)
pyplot.imshow(image)
pyplot.subplot(312)
pyplot.imshow(hoz_flip)
pyplot.subplot(313)
pyplot.imshow(ver_flip)

pyplot.show()

# create flipped versions of an image
from PIL import Image
from matplotlib import pyplot

# load image
image = Image.open("E:\\Wallpapers\\Alone.jpg")

# horizontal flip
hoz_flip = image.transpose(Image.FLIP_LEFT_RIGHT)

# vertical flip
ver_flip = image.transpose(Image.FLIP_TOP_BOTTOM)

# plot all three images using matplotlib
pyplot.subplot(311)
pyplot.imshow(image)
pyplot.subplot(312)
pyplot.imshow(hoz_flip)
pyplot.subplot(313)
pyplot.imshow(ver_flip)

pyplot.show()

# create flipped versions of an image # load image # horizontal flip # vertical flip # plot all three images using matplotlib