1 |
hw <hw@×××××××××××××××××××××.de> wrote: |
2 |
|
3 |
> Hi, |
4 |
> |
5 |
> suppose I have a number of images that need to be displayed side by |
6 |
> side in a nice layout. The images are of different sizes and have |
7 |
> different aspect ratios. |
8 |
> |
9 |
> To fit the images into the layout, I can scale the images either by |
10 |
> height or width or by percantage, and they will look messy in the |
11 |
> layout because I need to keep their aspect ratio when scaling them. |
12 |
> |
13 |
> So what I need to do is put a frame around each image just as needed |
14 |
> when scaling it so that I will end up with all the images having the |
15 |
> same size while maintaining their aspect ratio. |
16 |
> |
17 |
> I guess 'convert' (from imagemagick) or 'ffmpeg' can do this, yet I |
18 |
> couldn't find out how. |
19 |
> |
20 |
> |
21 |
> (In this particular case, I would set a default size to scale all |
22 |
> images to rather than doing something more complicated like examine |
23 |
> all images in advance to compute a good size to use from the largest |
24 |
> or smallest one or from their average dimensions.) |
25 |
> |
26 |
> |
27 |
> Any ideas how to do this? |
28 |
|
29 |
You maybe can use media-gfx/graphicsmagick or media-gfx/imagemagick |
30 |
for that purpose (I prefer graphicsmagick because it's faster). |
31 |
|
32 |
With the composite command and it's repage parameter it should be |
33 |
possible to do what you want. But I'm not sure about this, I never |
34 |
done this by myself. |
35 |
|
36 |
-- |
37 |
Regards |
38 |
wabe |