Gentoo Archives: gentoo-user

From: hw <hw@×××××××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] resizing multiple images with adding a frame as needed
Date: Tue, 23 Jun 2015 14:48:13
Message-Id: 5589715C.7040703@gartencenter-vaehning.de
1 Hi,
2
3 suppose I have a number of images that need to be displayed side by side
4 in a nice layout. The images are of different sizes and have different
5 aspect ratios.
6
7 To fit the images into the layout, I can scale the images either by
8 height or width or by percantage, and they will look messy in the layout
9 because I need to keep their aspect ratio when scaling them.
10
11 So what I need to do is put a frame around each image just as needed
12 when scaling it so that I will end up with all the images having the
13 same size while maintaining their aspect ratio.
14
15 I guess 'convert' (from imagemagick) or 'ffmpeg' can do this, yet I
16 couldn't find out how.
17
18
19 (In this particular case, I would set a default size to scale all images
20 to rather than doing something more complicated like examine all images
21 in advance to compute a good size to use from the largest or smallest
22 one or from their average dimensions.)
23
24
25 Any ideas how to do this?

Replies