In most cases, a line in a pictures-group contains enough pictures or at
least in the correct format (usually in landscape mode) to actually make
the browser call flex-shrink.
However, in a few specific cases, when pictures do not fill the flex
container, there is some space left on the right side of the line which
could be filled in.
In that case, we can use the flex-grow property. To be able to keep
everything aligned, we need to set the flex-grow property according to
the ratio of the picture so that all pictures in the line are grown
proportionally.
Adding this alignment fix required a bit of re-ordering so we could call
the ratio property for the div of class `picture`.
Fixes#92
Signed-off-by: Quentin Schulz <foss@0leil.net>
To prepare for an alignment fix that requires to know the ratio of the
video screenshot, let's add a ratio property.
This property is calling `ffprobe` or `avprobe` depending on whether
ffmpeg or libav-tools was installed. It is not adding a new dependency.
The output of this particular `ffprobe` or `avprobe` returns the width
and height of the video, separated by a comma.
Signed-off-by: Quentin Schulz <foss@0leil.net>
To prepare for an alignment fix that requires to know the ratio of the
image, let's add a ratio property.
This property is calling `gm identify` which is already a dependency of
prosopopee.
The output of this particular `gm identify` returns the width and height
separated by a comma.
Signed-off-by: Quentin Schulz <foss@0leil.net>