rotate() will use "angle % 360"

This commit is contained in:
Andrew Murray 2025-08-29 07:43:51 +10:00
parent 05a6010311
commit c6915f717f
2 changed files with 2 additions and 2 deletions

View File

@ -35,5 +35,5 @@ def test_rotated(orientation: int) -> None:
with Image.open("Tests/images/hopper.pcd") as expected:
assert_image_equal(
im, expected.rotate(90 if orientation == 1 else -90, expand=True)
im, expected.rotate(90 if orientation == 1 else 270, expand=True)
)

View File

@ -43,7 +43,7 @@ class PcdImageFile(ImageFile.ImageFile):
if orientation == 1:
self.tile_post_rotate = 90
elif orientation == 3:
self.tile_post_rotate = -90
self.tile_post_rotate = 270
self._mode = "RGB"
self._size = (512, 768) if orientation in (1, 3) else (768, 512)