Advertisement
illwieckz

splitnh

Sep 7th, 2024 (edited)
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #! /usr/bin/env python3
  2. import os, sys
  3. from PIL import Image
  4. if len(sys.argv) > 1:
  5.     name = sys.argv[1]
  6.     with Image.open(name) as img:
  7.         base_name = os.path.splitext(name)[0]
  8.         img.convert('RGB').save(base_name + "_n.tga")
  9.         img.convert('RGBA').getchannel('A').save(base_name + "_h.tga")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement