Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python3
- import os, sys
- from PIL import Image
- if len(sys.argv) > 1:
- name = sys.argv[1]
- with Image.open(name) as img:
- base_name = os.path.splitext(name)[0]
- img.convert('RGB').save(base_name + "_n.tga")
- img.convert('RGBA').getchannel('A').save(base_name + "_h.tga")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement