As we're looking to choose the logo for Dedomenon, I needed to print a bunch of propositions, and wanted to put several images on one page. The best solution I found was to combine multiple images in one with imagemagick:
montage -label %f -frame 5 -tile 1x2 -background '#ffffff' -geometry +4+4 *jpg montage.jpg
It's not an optimal composition as if you have a tiny image it will still take half a page, but it was good enough for me. I'm not sure how I could have combined the images and let the software optimise the placement......
History always repeats itself and sometimes that's good. Here's a second chance to be part of it: tmdtc.com
Showing posts with label imagemagick. Show all posts
Showing posts with label imagemagick. Show all posts
Thursday, 21 February 2008
Saturday, 5 January 2008
Batch operation adding a filename suffix
I wanted to resize all sponsors logos on the Profoss website. The file name is of the form logo_company.ext, and I wanted to rename it to something like logo_company.small.ext so I didn't loose the original files. The trick here is to split the filename in 2 parts: filename without the extension and the extension.
This is easy with bash, as it lets you manipulate strings quite easily. For example, if the complete filename is stored in the variable $f, the filename without extension is obtained with ${f%.*}, and the extension with ${f:(-3)} (my file extensions where always 3 characters long ;-)
With the convert tool from imagemagick, it was a piece of cake to get the expected result. Here's the command:
This is easy with bash, as it lets you manipulate strings quite easily. For example, if the complete filename is stored in the variable $f, the filename without extension is obtained with ${f%.*}, and the extension with ${f:(-3)} (my file extensions where always 3 characters long ;-)
With the convert tool from imagemagick, it was a piece of cake to get the expected result. Here's the command:
Subscribe to:
Posts (Atom)