Make sure ImageMagick is installed or install it
ls -al /etc/ImageMagick-6/policy.xml
#if not present, install
sudo apt install imagemagick
Once you have it installed, use the ‘convert’ command-line tool of ImageMagic. Just provide the paths to individual images and at the end of the command, name the output file. For example, something like this:
convert image1.jpg image2.png image3.bmp output.pdf
#or resize by procentage
convert -resize 50% source.png dest.jpg
#or resize to specific size
convert -resize 1024X768 source.png dest.jpg
If the following error appears:
convert: not authorized `pictures.pdf' @ error/constitute.c/WriteImage/1028.
Edit /etc/ImageMagick-6/policy.xml
and change\ the PDF rights from none
to read|write
there.
<policy domain="coder" rights="read|write" pattern="PDF" />