Last active
April 20, 2021 22:04
-
-
Save esnosy/5c6e3ae087036f6613720de5e38abd58 to your computer and use it in GitHub Desktop.
Batch convert psd files in current directory to png, requires psd-tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from psd_tools import PSDImage | |
import os | |
for f in os.scandir(): | |
if f.is_file(): | |
if f.name.endswith(".psd"): | |
psd = PSDImage.open(f.name) | |
psd.composite().save(f.name[:-4]+".png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment