Log in

View Full Version : Resolved looking for a way to connect images



james438
11-03-2019, 04:11 AM
I'm still working with images. This time what I am trying to figure out is how to use php to knit two images together side by side.

Any help would be appreciated.

james438
11-03-2019, 06:19 AM
Got it. This needed php's ImageMagick as opposed to using the GD library.

It is as simple as:


<?php
system("convert image1.jpg image2.jpg +append montage_cat2.jpg");
?>

The script takes image1.jpg and image2.jpg and creates a third image montage_cat2.jpg. If montage_cat2.jpg already exists, it is overwritten. If the images are different sizes then there will be extra white space located below the smaller image.

https://imagemagick.org/script/command-line-options.php#append