How to merge a png on top of a jpg using the command line?

0

Ubuntu 16.04
Bash 4.4.0

I have a ton of vehicle images to create on a daily basis. My routine is simple but if I can automate this in a bash script, that would be super awesome.

I connect to an api, and download images that match the VIN number of said vehicle. I then manually have to crop them to 1.91:1 and scale them to 1024 x 5xx. I then export and optimize the images using optimages.

If someone can point me in the right direction, I would appreciate it.

Curious Sam

Posted 2019-08-23T20:12:19.033

Reputation: 101

3Have a look at ImageMagick or GraphicsMagick. – dirkt – 2019-08-23T20:14:11.687

Answers

0

Install the netpbm package and convert your images to the PNM format. Then resize/cut and overlay the images and convert them back to JPEG or PNG and optimize them.

You would probably use these commands which can be nicely chained using pipes and redirection:

Freddy

Posted 2019-08-23T20:12:19.033

Reputation: 1 204