create pdf from images linux

C++
convert image1.jpg image2.png image3.bmp output.pdfpdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf

Source

Also in C++: