Commit de6212ca authored by leonmuller's avatar leonmuller

Trying to patch a bug with exporting raster on mac

parent ab78de8d
...@@ -70,6 +70,9 @@ Changelog 2015-04-11 ...@@ -70,6 +70,9 @@ Changelog 2015-04-11
Added back in raster optimising, it's not perfect but it's mostly there. Only a little slow parsing white vertical space now. Added back in raster optimising, it's not perfect but it's mostly there. Only a little slow parsing white vertical space now.
Found that raster optimisation code seems to be changing the pixel data at the end of the line somewhere. I'm not sure how since it's meant to just be cutting part of the data line out not changing it. will need to investigate further. Found that raster optimisation code seems to be changing the pixel data at the end of the line somewhere. I'm not sure how since it's meant to just be cutting part of the data line out not changing it. will need to investigate further.
Added option to the menu for users to disable raster optimisations. Added option to the menu for users to disable raster optimisations.
Changelog 2015-04-20
Trying to fix a bug with exporting rasters on Mac
""" """
### ###
...@@ -90,7 +93,7 @@ import time ...@@ -90,7 +93,7 @@ import time
#Image processing for rastering #Image processing for rastering
import base64 import base64
from PIL import Image from PIL import Image
import ImageOps from PIL import ImageOps
import subprocess import subprocess
import simplestyle import simplestyle
...@@ -998,7 +1001,7 @@ class Gcode_tools(inkex.Effect): ...@@ -998,7 +1001,7 @@ class Gcode_tools(inkex.Effect):
if not hasattr(parent, 'glob_nodePositions'): if not hasattr(parent, 'glob_nodePositions'):
#Get the XY position of all elements in the inkscape job. #Get the XY position of all elements in the inkscape job.
command="inkscape -S %s" % (curfile) command="inkscape -S %s" % (curfile)
p5 = subprocess.Popen(command, stdout=subprocess.PIPE) p5 = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
dataString = str(p5.communicate()[0]).split('\r\n') dataString = str(p5.communicate()[0]).split('\r\n')
del dataString[-1] del dataString[-1]
elementList = dict((item.split(",",1)[0],item.split(",",1)[1]) for item in dataString) elementList = dict((item.split(",",1)[0],item.split(",",1)[1]) for item in dataString)
......
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