Copy Code code as follows:
#!/usr/local/bin/php-q
Author:freemouse
<?php
Here is the description.
Print ("This program is used to merge 2 640x480 sizes. \ n");
Print ("Picture, and convert it to a picture of 400x300 size \ n");
Print ("You need to specify the default directory for the pre-synthetic picture (a.jpg,b.jpg)" \ n ");
Print ("The generated picture will be saved as c.jpg\n");
Default directory, edit it yourself ^_^
$d = "/home/freemouse/desktop";
Print ("Current directory is: $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 picture to 640x480 size
EXEC ("Zoom to 640x480-quality 95"). $d. "/a.jpg");
EXEC ("Zoom to 640x480-quality 95"). $d. "/b.jpg");
$AA = "Conversion-Mass 90-dimension 320x480+";
$ab = "". $d. "/a.jpg";
$BB = "". $d. "/b.jpg";
$ac = "". $d. "/aa.jpg";
$CC = "". $d. "/bb.jpg";
A.jpg saved as aa.jpg after zooming
$yy = $aa. $a. $ab. $ac;
Print ("$yy \ n");
EXEC ($YY);
B.jpg saved as bb.jpg after zooming
$zz = $aa. $b. $bb. $CC;
Print ("$zz \ n");
EXEC ($ZZ);
Combine 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 the c.jpg to 400x300 dimensions and add a border.
$edge = "Zoom to 400x300-quality 75-raise 4x4-sharpen 1x1". $d. "/c.jpg";
Print ("$edge \ n");
EXEC ($edge);
?>