Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from subprocess import Popen, PIPE
- q_data = open("q.png", "rb").read()
- with Popen(["convert", "-", "-negate", "-"], stdin=PIPE, stdout=PIPE) as proc:
- foo = proc.communicate(q_data)
- with open("asd.png", "wb") as dest:
- dest.write(foo[0])
Add Comment
Please, Sign In to add comment