1 |
Am 24.06.2015 um 02:02 schrieb wabenbau@×××××.com: |
2 |
> hw <hw@×××××××××××××××××××××.de> wrote: |
3 |
> |
4 |
>> Hi, |
5 |
>> |
6 |
>> suppose I have a number of images that need to be displayed side by |
7 |
>> side in a nice layout. The images are of different sizes and have |
8 |
>> different aspect ratios. |
9 |
>> |
10 |
>> To fit the images into the layout, I can scale the images either by |
11 |
>> height or width or by percantage, and they will look messy in the |
12 |
>> layout because I need to keep their aspect ratio when scaling them. |
13 |
>> |
14 |
>> So what I need to do is put a frame around each image just as needed |
15 |
>> when scaling it so that I will end up with all the images having the |
16 |
>> same size while maintaining their aspect ratio. |
17 |
>> |
18 |
>> I guess 'convert' (from imagemagick) or 'ffmpeg' can do this, yet I |
19 |
>> couldn't find out how. |
20 |
>> |
21 |
>> |
22 |
>> (In this particular case, I would set a default size to scale all |
23 |
>> images to rather than doing something more complicated like examine |
24 |
>> all images in advance to compute a good size to use from the largest |
25 |
>> or smallest one or from their average dimensions.) |
26 |
>> |
27 |
>> |
28 |
>> Any ideas how to do this? |
29 |
> |
30 |
> Look here: |
31 |
> |
32 |
> http://stackoverflow.com/questions/1787356/use-imagemagick-to-place-an-image-inside-a-larger-canvas |
33 |
> |
34 |
> You must add a resize paremeter as this example is only for placing an |
35 |
> image inside a larger canvas. :-) |
36 |
|
37 |
Thank you very much, this looks like exactly what I was looking for :) |
38 |
|
39 |
> You can easily find more examples in the Internet. |
40 |
|
41 |
I tried, of course --- it seems to be a matter of using the right search |
42 |
strings ... |