diff --git a/Tests/test_file_pcd.py b/Tests/test_file_pcd.py index a2d07ff51..15dd7f116 100644 --- a/Tests/test_file_pcd.py +++ b/Tests/test_file_pcd.py @@ -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) ) diff --git a/src/PIL/PcdImagePlugin.py b/src/PIL/PcdImagePlugin.py index 00864a4bf..296f3775b 100644 --- a/src/PIL/PcdImagePlugin.py +++ b/src/PIL/PcdImagePlugin.py @@ -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)