-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rotation of vertical labels with pillow 3.1.0 #140
Conversation
If we bump the version of pillow, we will need to release a new version of figure. |
@@ -1587,7 +1587,7 @@ def drawText(self, text, x, y, fontsize, rgb, align="center"): | |||
tempLabel = Image.new('RGBA', (txt_w, txt_h), (255, 255, 255, 0)) | |||
textdraw = ImageDraw.Draw(tempLabel) | |||
textdraw.text((0, 0), text, font=font, fill=rgb) | |||
w = tempLabel.rotate(90) | |||
w = tempLabel.rotate(90, expand=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change also work with 2.9 or just 3.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works with 2.9 too. The API is the same, it seems that it's just the default behaviour that changed.
tested with Pillow 2.9 and Pillow 3.1 |
@will-moore: can we discuss the branching strategy of this repo before merging this PR? |
@will-moore: sorry I thought I merged it following our discussion on branches the other day |
Fix rotation of vertical labels with pillow 3.1.0
This fixes the rotation of vertical labels when exporting as Tiff.
Noticed when testing Pillow 3.1.0 (not a problem on Pillow 2.9.0) See ome/omero-install#86
To test, create a figure with vertical labels and export as Tiff using Pillow 3.1.0 (latest version).
Check vertical labels are in correct position.