tags:

views:

170

answers:

1

Hello,

Say I've got some square images which I want to resize to rectangle images with the ratio 16:9. What is the best way to do it using PHP?

A: 

you could use imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h )

more at http://us2.php.net/imagecopyresampled

pop850
Arty
OK, just multiply x by 16 and y by 9, then scale from there.
pop850