repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add proper error handling for all final exec calls
[hband-tools.git]
/
user-tools
/
pngmetatext
blob
0a1213d9f7fff80ae04f7380a766a73e8f3a005e
1
#!/usr/bin/env python2.7
2
3
"""
4
=pod
5
6
=head1 NAME
7
8
pngmetatext - Put metadata text into PNG file
9
10
=cut
11
12
"""
13
14
import sys
15
import gtk
16
17
filepath = sys.argv[1]
18
pb = gtk.gdk.pixbuf_new_from_file(filepath)
19
20
meta = {}
21
for opt in sys.argv[2:]:
22
name, val = opt.split('=', 1)
23
meta[name] = val
24
25
pb.save(filepath, 'png', meta)