id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release 8973,Size calculation extracted from SVG goes wrong,Markus Kohler,Richard Liao,"The size is extracted from the svg file with regular expressions: w = re.search('''width=[""']([0-9]+\.?[0-9]?)(.*?)[""']''', svg) h = re.search('''height=[""']([0-9]+\.?[0-9]?)(.*?)[""']''', svg) resulting in a split (w_val, w_unit) = (8.2, 663in) instead of (w_val, w_unit) = (8.2663, in). The following change in the regexp repairs that defect: w = re.search('''width=[""']([0-9]+\.?[0-9]*)(.*?)[""']''', svg) h = re.search('''height=[""']([0-9]+\.?[0-9]*)(.*?)[""']''', svg) Also there is a small bug which could make a difference if the horizontal and vertical units differ. Current code contains: w_val = int(math.ceil(float(w_val) * unitMapping[w_unit])) h_val = int(math.ceil(float(h_val) * unitMapping[w_unit])) while the second line should really be h_val = int(math.ceil(float(h_val) * unitMapping[h_unit])) ",defect,closed,normal,TracImageSvgMacro,normal,wontfix,"size, units",,0.11