Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I am new here, i have a mini script but the script dont work in my server. The script for gif animation dont work, but the script for png only yes work. I dont know why.
I use ImageMagick 6.2.8
Who can check it for fix it please. I can pay a little dolars via paypal if you want it.
PHP Warning: getimagesize(temp/YaOV8qgm8ZFlN5L.gif) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /home/web/generate.php on line 36, referer: http://www.domain.com/image.php
I think that the script dont generate the .gif ...
Try echoing your values to see they are what you expect and add some error reporting to the exec commands:
I do not like the way you write your code as it is very confusing and the problem is probably using ' and " everywhere. For instance this line exec("convert ".$patch."/banner104.png ".$imagesurse2." -geometry +93+185 -compose DstOver -composite ".$jpg); is missing a " before the ); and I think the " need escaping anyway.
<?
$surse = "123qwertyu456789QWERThjklzYUIOPAxcvSDFGHVBNMiopasdfgbnmJKLZXC";
for ($i = 0; $i <15; $i++)
{
$newsurse[$i] = $surse[rand(0,60)];
$newsurse2[$i] = $surse[rand(0,60)];
}
$jpg = 'temp/'.implode("",$newsurse).'.jpg';
$array=array();
echo "<pre>";
$cmd = " $imagesurse2 -resize 265!x333! ";
exec("convert $cmd $imagesurse2 2>&1", $array);
echo "<br>".print_r($array)."<br>";
echo "</pre>";
$array=array();
echo "<pre>";
$cmd = " $patch/banner104.png $imagesurse2 -geometry +93+185 -compose DstOver -composite ";
exec("convert $cmd $jpg 2>&1", $array);
echo "<br>".print_r($array)."<br>";
echo "</pre>";
// Why do you have this line - you can add it to the one above?
exec('convert '.$jpg.' -quality 60 '.$jpg);
@unlink($imagesurse2);
// Again why this line ? if you saved as this above it would overwrite $imagesurse2 anyway
$imagesurse2=$jpg;
?>
Try getting something simple working first by hard coding the files into the code and move onto the dynamic part when it works.