-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
What did you do?
create an uint16 img and invoke img.transpose(Image.FLIP_LEFT_RIGHT)
What did you expect to happen?
horizontally flip the given PIL Image
What actually happened?
random data overflow
What are your OS, Python and Pillow versions?
- OS: Ubuntu & macOS
- Python: 3.6
- Pillow: 5.1.0 ~ 5.3.0 tested
import numpy as np
from PIL import Image
x = np.zeros((10, 10), dtype=np.uint16)
x[1:4, 2:5] = 1
x[5:8, 5:8] = 2
y = Image.fromarray(x)
assert 2 == np.max(y)
y_ = y.transpose(Image.FLIP_LEFT_RIGHT)
assert 2 == np.max(y_) # error occurred, FLIP_TOP_BOTTOM is okayReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels