Im trying to use the ImageMagick library in order to chorma key an image programmaticly in php. So far i've installed the ImageMagick extension onto my server and made sure it is working using some simple commands in the terminal itself. My goal is to get this working as php code but currently im just trying to find a script that works for me. My problem is that I cant get the greenscreen script from fred's imagemagick scripts to work. when trying to excute the scripti get a file does not exist or is not an ordinary file not readable or has zero size
error.
The same is true when I try to use any of the imagemagick/fred's scripts on php.
I've tried:
In php:
In the terminal:
Update: Got the Imagemagick fred's script to work in the terminal though the image is returned in black and white. currently working on getting it to work as php code using exec()
Update 2: using this exec on my php
exec("/bin/bash /home/full_path_within_server/public_html/imagemagictest/greenscreen.sh shirt.jpg t.png",$out,$returnval);
I get the following error message: "FILE shirt.jpg DOES NOT EXIST OR IS NOT AN ORDINARY FILE, NOT READABLE OR HAS ZERO"
Found a solution, change the all instances of the convert in the script to the full path of the convert function.