BlackHalt

1600x1200px JPG ar Parakstu

Jun 5th, 2012
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 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],'jpg'])
  9.  
  10. files = sys.argv[1:]
  11. garaka_mala = 1600
  12.  
  13. for file in files:
  14.     os.system('convert %s -filter Lanczos -sampling-factor 1x1 -unsharp 1.5x1+0.7+0.02 -quality 95 -resize "%s>" -auto-orient -font  ~/.fonts/georgia.ttf -pointsize 28 -gravity southeast -stroke \'#0003\' -fill \'#0001\' -strokewidth 1 -annotate +10+0 \'BlackHalt\' -stroke none -fill \'#fff8\' -annotate +10+0 \'BlackHalt\' %s' % (file, garaka_mala, new_name(file)))
  15.     os.system('mogrify -strip %s' % (new_name(file)))
Advertisement
Add Comment
Please, Sign In to add comment