Copy CodeThe code is as follows:
#!/usr/local/bin/php-q
Author:freemouse
Here is the description.
Print ("This program is used to merge 2 640x480-sized. \ n");
Print ("Picture, and convert it to a picture of 400x300 size \ n");
Print ("required to specify the default directory for pre-compositing pictures (a.jpg,b.jpg) \ n");
Print ("The resulting picture will be saved as c.jpg\n");
Default directory, edit it yourself ^_^
$d = "/home/freemouse/desktop";
Print ("current directory: $d \ n");
Print ("Picture a.jpg offset, 0-100:");
$fp = fopen ("Php://stdin", "R");
$a = fgets ($fp, 255);
Print ("Picture b.jpg offset, 0-100:");
$b = fgets ($fp, 255);
Fclose ($FP);
$a = $a *3.2;
$a =floor ($a);
$b = $b *3.2;
$b =floor ($b);
Zoom two images to 640x480 size
EXEC ("Zoom to 640x480-Mass 95".) $d. "/a.jpg");
EXEC ("Zoom to 640x480-Mass 95".) $d. "/b.jpg");
$AA = "Conversion-Mass 90-size 320x480+";
$ab = "". $d. "/a.jpg";
$BB = "". $d. "/b.jpg";
$ac = "". $d. "/aa.jpg";
$CC = "". $d. "/bb.jpg";
Save As aa.jpg after scaled a.jpg
$yy = $aa. $a. $ab. $ac;
Print ("$yy \ n");
EXEC ($YY);
Save As bb.jpg after scaled b.jpg
$zz = $aa. $b. $bb. $CC;
Print ("$zz \ n");
EXEC ($ZZ);
Merge two pictures for c.jpg.
$adjoin = "Synthesis-mass 80";
$adjoin. = $d. "/aa.jpg";
$adjoin. = $d. "/bb.jpg";
$adjoin. = $d. "/c.jpg";
Print ("$adjoin \ n");
EXEC ($adjoin);
Adjust c.jpg to 400x300 dimensions and add borders.
$edge = "Zoom to 400x300-mass 75-raise 4x4-sharpen 1x1". $d. "/c.jpg";
Print ("$edge \ n");
EXEC ($edge);
?>
http://www.bkjia.com/PHPjc/323658.html www.bkjia.com true http://www.bkjia.com/PHPjc/323658.html techarticle Copy the code as follows: #!/usr/local/bin/php-q author:freemouse? PHP//Below is the description. Print ("This program is used to merge 2 640x480-sized. \ n"); print ("Picture, and convert it ...