PHP + Imagemagick ! Need Help
Posted: 2011-02-05T00:41:54-07:00
Hello, I have a website (...), I use a module for uplod images and integrate them into other images.
the first code works great
But in the second code it doesnt work ! (perspective...)
Help me please
the first code works great
Code: Select all
<? $surse = "tyu4526265sdfDDQ";
for ($i = 0; $i <15; $i++)
{
$newsurse[$i] = $surse[rand(0,60)];
$newsurse2[$i] = $surse[rand(0,60)];
}
$jpg = 'temp/'.implode("",$newsurse).'.jpg';
$png = 'temp/'.implode("",$newsurse2).'.png';
exec('convert '.$imagesurse2.' -resize 409!x468! '.$imagesurse2.'');
exec("convert ".$imagesurse2." -matte -background none -rotate -30 ".$png);
exec("convert ".$patch."/card20.png ".$png." -geometry -49+31 -compose DstOver -composite ".$jpg);
exec('convert '.$jpg.' -quality 80 '.$jpg);
@unlink($imagesurse2);
@unlink($png);
$imagesurse2=$jpg;
Code: Select all
<?
$surse = "tyu4526265sdfDDQ";
for ($i = 0; $i <15; $i++)
{
$newsurse[$i] = $surse[rand(0,60)];
$newsurse2[$i] = $surse[rand(0,60)];
}
$jpg = 'temp/'.implode("",$newsurse).'.jpg';
$png = 'temp/'.implode("",$newsurse2).'.png';
exec('convert '.$imagesurse2.' -resize 195!x150! '.$imagesurse2.'');
exec("convert -size 210x205 xc:transparent ".$imagesurse2." -set option:distort:viewport 210x205 -matte -virtual-pixel transparent -distort Perspective '0,0,0,91 0,150,73,205 195,0,142,0 195,150,210,115' -composite ".$png."");
exec("convert ".$patch."/banner56.png ".$png." -geometry +0+0 -compose DstOver -composite ".$jpg);
exec('convert '.$jpg.' -quality 60 '.$jpg);
@unlink($imagesurse2);
@unlink($png);
$imagesurse2=$jpg;