piwigo-videojs icon indicating copy to clipboard operation
piwigo-videojs copied to clipboard

Use height instead of width

Open xbgmsharp opened this issue 11 years ago • 2 comments

From Issue #8

I just tested and I think it would be better to scale by the height instead of the width.

For a 640x480 video and a 720p Max setting , you get a 1280x960 displayed wich is because to fit a 4:3 into a 16:9 canvas, you have to use the height as a reference.

For 16;9 video I agree that the current code would work.

So maybe something like :

$MAX_HEIGHT = intval( 9 * ($MAX_WIDTH/ 16 )); $width = intval($MAX_HEIGHT * ( $width / $height )); $height = $MAX_HEIGHT;

Thanks for your hard work.

xbgmsharp avatar Jul 23 '13 02:07 xbgmsharp

The new code commit use the height instead of the width. Please test and feedback prior to release.

xbgmsharp avatar Jul 26 '14 08:07 xbgmsharp

Could please test and feedback prior to release. http://piwigo.org/forum/viewtopic.php?id=24500

xbgmsharp avatar Sep 25 '14 17:09 xbgmsharp