aboutsummaryrefslogtreecommitdiff
path: root/pngmeta
diff options
context:
space:
mode:
authorjaseg <s@jaseg.de>2013-07-29 18:51:18 +0200
committerjaseg <s@jaseg.de>2013-07-29 18:51:18 +0200
commita79ab969533320582482856758394e74739b152e (patch)
tree59e320c15a282cb57318683815c8e3d529e2f087 /pngmeta
parent62e62f1eace5899d0176ef0dd1b66c6ef72f7ab0 (diff)
downloadpixelterm-a79ab969533320582482856758394e74739b152e.tar.gz
pixelterm-a79ab969533320582482856758394e74739b152e.tar.bz2
pixelterm-a79ab969533320582482856758394e74739b152e.zip
Made a proper python package out of this.
Diffstat (limited to 'pngmeta')
-rwxr-xr-xpngmeta11
1 files changed, 11 insertions, 0 deletions
diff --git a/pngmeta b/pngmeta
new file mode 100755
index 0000000..e6d9b6b
--- /dev/null
+++ b/pngmeta
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import os, sys, argparse
+from PIL import Image, PngImagePlugin
+
+parser = argparse.ArgumentParser(description='Print PNG metadata')
+parser.add_argument('image', type=str)
+args = parser.parse_args()
+img = Image.open(args.image)
+for k, v in img.info.items():
+ print('{:15}: {}'.format(k, v))