Commit 3c466a5e authored by Gary Hodgson's avatar Gary Hodgson Committed by Guillaume Seguin

load path as layer list, not wx.Image, as it was causing my machine to die from memory exhaustion.

parent b66811a6
......@@ -90,7 +90,8 @@ class dispframe(wx.Frame):
gc.Scale(self.scale, self.scale)
wxpsvgdocument.SVGDocument(image).render(gc)
elif slicer == 'bitmap':
dc.DrawBitmap(wx.BitmapFromImage(image.Scale(image.Width*self.scale, image.Height*self.scale)), self.offset[0], -self.offset[1], True)
wxImage = wx.Image(image)
dc.DrawBitmap(wx.BitmapFromImage(wxImage.Scale(wxImage.Width*self.scale, wxImage.Height*self.scale)), self.offset[0], -self.offset[1], True)
else:
raise Exception(self.slicer + " is an unknown method.")
self.pic.SetBitmap(self.bitmap)
......@@ -282,7 +283,7 @@ class setframe(wx.Frame):
for f in imagefiles:
path = os.path.join(self.image_dir, f)
if os.path.isfile(path) and imghdr.what(path) in acceptedImageTypes:
ol.append(wx.Image(path))
ol.append(path)
return ol, -1, "bitmap"
def loadfile(self, event):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment