Basically I\'m trying to be able to rotate images via user interface, however I\'ve noticed that the image quality severely decreases upon each rotation. Does anyone know ho
rotated_small = photo_small.rotate(angle, resample=Image.BICUBIC, expand=True)
This tells it to use the highest quality interpolation algorithm that it has available, and to expand the image to encompass the full rotated size instead of cropping. The documentation does not say what color the background will be filled with.
An image is a grid of pixels. If you rotate it (and angle isn't a multiple of 90) the rotated grid must be rematched to a new non-rotated grid to display the image. Some loss can't be avoided in this process.
Only option would be to keep the unrotated image somewhere and sum up the angles of multiple rotations and always build the rotated image from the initial unrotated one.