Small fix of PNG metadata storage, added metadata support to pixelterm

This commit is contained in:
jaseg 2013-04-06 18:15:00 +02:00
parent 050fdb036d
commit 1b96018334
2 changed files with 9 additions and 4 deletions

View file

@ -50,10 +50,10 @@ def unpixelterm(text):
k,v = parts
if k not in ['WIDTH', 'HEIGHT']:
d[k.lower()] = d.get(k.lower(), []) + [v]
elif l != '':
else:
comment.append(l)
if comment:
d['comment'] = d.get('comment', []) + comment
d['comment'] = d.get('comment', []) + ['\n'.join(comment)]
metadata.update(d)
lines[first:] = lines[first+1+second+1:]
except: