Guest User

Untitled

a guest
Apr 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. from subprocess import Popen, PIPE
  2. q_data = open("q.png", "rb").read()
  3. with Popen(["convert", "-", "-negate", "-"], stdin=PIPE, stdout=PIPE) as proc:
  4. foo = proc.communicate(q_data)
  5. with open("asd.png", "wb") as dest:
  6. dest.write(foo[0])
Add Comment
Please, Sign In to add comment