Open pr1001 opened 11 years ago
There's Image.rotate
for this. Still a bug though. (The flip APIs have been mostly implemented to test a very simple operation when I started writing this library, I had no clue anyone would ever use it).
Jeeze, I feel really stupid for not seeing Image.rotate()
. ;-p
Hmm, image.rotate(180)
doesn't give the expected results. It seems to be rotated clockwise 90 degrees and then tiled.
the docs need quite some love, but that API is actually documented: http://pymaging.readthedocs.org/en/latest/dev/api.html#pymaging.image.Image.rotate
Thanks, but I don't see what I did wrong. Should I have disabled canvas resizing?
Sorry, missed that comment. It's quite possible this is broken. pymaging is still quite alpha and I focused mostly on thumbnailing. Having said that, if you could try to figure out why this doesn't work, that would be great!
also, uploading the original and output as well as the code you used would be useful
Maybe my Christmas present can be a pull request fixing this. Stay tuned... =)
I've been trying to flip an image both horizontally and then vertically in order to achieve a 180 degree rotation.
Using
the resulting image has the the same vertical orientation as the original
image
.If I only use
flip_left_right()
, I find that the image is already flipped vertically in addition to horizontally, soflip_top_bottom()
just ends up canceling out the vertical flip.