PHP fit any size image to 16:9 aspect ratio
问题 Good noon, I'm currently trying to understand how i can crop image already loaded on server with 16:9 aspect ratio. For better understandig, if I have 4:3 image i have to cut top and bottom image portions to fit it into 16:9 ratio. Thanks. 回答1: I took this code example: http://myrusakov.ru/php-crop-image.html and changed the code according to my needs in this way: function crop_image($image) { //$x_o и $y_o - Output image top left angle coordinates on input image //$w_o и h_o - Width and