Here I am trying to process an image using a php script textcleaner. I have to run this php script in my other part of python project.I'm confused in getting the output image from php script textcleaner(I get this script from here :
http://www.fmwconcepts.com/imagemagick/textcleaner/index.php )
and my code in python for running it is as ..
import subprocess
proc = subprocess.Popen("php textcleaner.php -g -e none -f 10 -o 5 src.jpg out.jpg", shell=True, stdout=subprocess.PIPE)
script_response = proc.stdout.read()
Here textcleaner.php
is php script file and after that (-g -e none -f 10 -o 5
)
are the arguments those i want to pass to script(textcleaner) for processing my image(src.jpg
) and the output image should be out.jpg
If any one used this before or know how to get the output in out.jpg as an image please tell me .
I also checked script_response by using print() but it gives me the help menu of textcleaner .