BlackHalt

~/.gnome2/nautilus-scripts/Convert image to PNG

May 23rd, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import os
  4. import sys
  5.  
  6. def new_name(file):
  7. os.path.splitext(file)
  8. return '.'.join([os.path.splitext(file)[0],'png'])
  9.  
  10. files = sys.argv[1:]
  11.  
  12. for file in files:
  13. os.system('convert %s %s' % (file, new_name(file)))
Advertisement
Add Comment
Please, Sign In to add comment