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

Merged
merged 1 commit into from Feb 4, 2016

Conversation

Projects
None yet
4 participants
@will-moore
Member

will-moore commented Feb 1, 2016

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.

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel Feb 1, 2016

Member

If we bump the version of pillow, we will need to release a new version of figure.
In that case, we might wait before merging ome/omero-install#86 and openmicroscopy/ome-documentation#1391

Member

jburel commented Feb 1, 2016

If we bump the version of pillow, we will need to release a new version of figure.
In that case, we might wait before merging ome/omero-install#86 and openmicroscopy/ome-documentation#1391

@@ -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)

This comment has been minimized.

@joshmoore

joshmoore Feb 2, 2016

Member

Does this change also work with 2.9 or just 3.1?

@joshmoore

joshmoore Feb 2, 2016

Member

Does this change also work with 2.9 or just 3.1?

This comment has been minimized.

@will-moore

will-moore Feb 2, 2016

Member

It works with 2.9 too. The API is the same, it seems that it's just the default behaviour that changed.

@will-moore

will-moore Feb 2, 2016

Member

It works with 2.9 too. The API is the same, it seems that it's just the default behaviour that changed.

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel Feb 2, 2016

Member

tested with Pillow 2.9 and Pillow 3.1
The change works with both version.

Member

jburel commented Feb 2, 2016

tested with Pillow 2.9 and Pillow 3.1
The change works with both version.

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel Feb 2, 2016

Member

@will-moore: can we discuss the branching strategy of this repo before merging this PR?

Member

jburel commented Feb 2, 2016

@will-moore: can we discuss the branching strategy of this repo before merging this PR?

@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore Feb 4, 2016

Member

@jburel As we discussed with @sbesson, master is the main "development" branch for figure. We will merge there and rebase the dev_1_2 branch there at the time that we want the branches to diverge.

Member

will-moore commented Feb 4, 2016

@jburel As we discussed with @sbesson, master is the main "development" branch for figure. We will merge there and rebase the dev_1_2 branch there at the time that we want the branches to diverge.

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel Feb 4, 2016

Member

@will-moore: sorry I thought I merged it following our discussion on branches the other day

Member

jburel commented Feb 4, 2016

@will-moore: sorry I thought I merged it following our discussion on branches the other day

jburel added a commit that referenced this pull request Feb 4, 2016

Merge pull request #140 from will-moore/vertical_labels_bug_pillow_3.1.0
Fix rotation of vertical labels with pillow 3.1.0

@jburel jburel merged commit 5b619e4 into ome:master Feb 4, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment