Skip to content

Instantly share code, notes, and snippets.

@echo off
pushd %1
for /r %%f in (*.png) do (
convert "%%f" -trim -geometry 1080x +dither -colors 16 -depth 4 "%%f"
)
popd
import os
class TransactComplete:
def __init__(self,thing):
self.original_filename = thing.filename
self.thing = thing
thing.filename = "{}.pending".format(thing.filename)
def enter(self):return None
def exit(self,*a):
os.rename(self.original_filename,self.original_filename+".bak")