Page 1 of 1
-composite does not work corret
Posted: 2014-05-23T02:52:43-07:00
by Darknet
I used the composite Command. But these Works incorret:
/usr/bin/convert verarbeitet1/Pictures_small/Hintergrund.jpg verarbeitet1/Pictures_small/AA.jpg -gravity Center -composite verarbeitet1/2.jpg
AA.jpg is composited black. But that isn't so.
-composite composition error
Posted: 2014-05-26T03:53:41-07:00
by Darknet
These is my second Thread for this theme.
This time a little more detail.
And convert the size and height.
But for the Smaller Pictures with 138px heigt. I will a white background behind it put. These with -composite.
But the Composited Pictures are all with.
the actual picture is not visible
Where is the mistake?
I convert a PDF File to a JPG.
if ($name == $pdf)
{
print_r($JobBezeichnung);
shell_exec('/usr/bin/convert -density 100% rohdaten/'.$PDF.' verarbeitet1/verarbeitung/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg');
shell_exec('/usr/bin/convert -resize 630 verarbeitet1/verarbeitung/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg verarbeitet1/Pictures_big/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg');
shell_exec('/usr/bin/convert -resize 198 verarbeitet1/verarbeitung/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg verarbeitet1/Pictures_small/s1.jpg');
$info = getimagesize ('verarbeitet1/Pictures_small/s1.jpg');
if($info[1] >= 138)
{
shell_exec('/usr/bin/convert verarbeitet1/Pictures_small/s1.jpg -crop 198x138+0+0 verarbeitet1/Pictures_small/final/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg');
}
else
{
echo "else";
shell_exec('/usr/bin/convert verarbeitet1/Pictures_small/Hintergrund.jpg verarbeitet1/Pictures_small/s1.jpg -gravity Center -alpha off -composite verarbeitet1/Pictures_small/test/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg');
rename('verarbeitet1/Pictures_small/s1.jpg', 'verarbeitet1/Pictures_small/nachbearbeitung/'.$PDFname.'_'.$kundnr.'_'.$pdf.'.jpg');
}
Re: -composite composition error
Posted: 2014-05-26T05:32:46-07:00
by snibgo
[Threads merged and moved to Users forum.]
"-composite" will combine two images. But you have only one.