Created
February 27, 2015 21:57
-
-
Save lmr/2fcfd137dc4e155b2f21 to your computer and use it in GitHub Desktop.
Possible fix for issue #911
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/frontend/tko/graphing_utils.py b/frontend/tko/graphing_utils.py | |
index 10a309c..39525fa 100644 | |
--- a/frontend/tko/graphing_utils.py | |
+++ b/frontend/tko/graphing_utils.py | |
@@ -446,8 +446,8 @@ def _create_png(figure): | |
canvas.draw() | |
size = canvas.get_renderer().get_canvas_width_height() | |
image_as_string = canvas.tostring_rgb() | |
- image = PIL.Image.fromstring('RGB', size, image_as_string, 'raw', 'RGB', 0, | |
- 1) | |
+ image = PIL.Image.frombytes('RGB', size, image_as_string, 'raw', 'RGB', 0, | |
+ 1) | |
image_background = PIL.Image.new(image.mode, image.size, | |
figure.get_facecolor()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment