-composite composition error

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?".
Post Reply
Darknet
Posts: 18
Joined: 2014-01-15T10:52:19-07:00
Authentication code: 6789

-composite does not work corret

Post 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.
Darknet
Posts: 18
Joined: 2014-01-15T10:52:19-07:00
Authentication code: 6789

-composite composition error

Post 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');
}
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -composite composition error

Post by snibgo »

[Threads merged and moved to Users forum.]

"-composite" will combine two images. But you have only one.
snibgo's IM pages: im.snibgo.com
Post Reply