Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2009-11-14 04:34:44 (GMT)
committer Gary Martin <gary@garycmartin.com>2009-11-14 04:34:44 (GMT)
commit8ee4240e0629228a97b2e1f669351f9b10879b68 (patch)
tree450f1629f3d00d25583c99a84d89307ebd4745d1
parentbfbe8ca14e70fce97f358f0c22cf962a33ad421b (diff)
Fix bug exporting to PNG when document has an embedded image.v8
-rw-r--r--src/ImageThought.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ImageThought.py b/src/ImageThought.py
index 459c713..0b3e15e 100644
--- a/src/ImageThought.py
+++ b/src/ImageThought.py
@@ -100,10 +100,10 @@ class ImageThought (ResizableThought):
utils.export_thought_outline (context, self.ul, self.lr, self.background_color, self.am_selected, self.am_primary, utils.STYLE_NORMAL,
(move_x, move_y))
if self.pic:
+ raw_pixels = self.pic.get_pixels_array()
if hasattr(context, "set_source_pixbuf"):
context.set_source_pixbuf (self.pic, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
elif hasattr(context, "set_source_surface"):
- raw_pixels = self.pic.get_pixels_array()
pixel_array = utils.pixbuf_to_cairo (raw_pixels)
image_surface = cairo.ImageSurface.create_for_data(pixel_array, cairo.FORMAT_ARGB32, len(raw_pixels[0]), len(raw_pixels), -1)
context.set_source_surface (image_surface, self.pic_location[0]+move_x, self.pic_location[1]+move_y)