frozenpeas
Technical User
I am trying to copy a part of one image to another. My trouble is that with portrait images, the aspect ratio gets squashed. I have tried the following:
I figured it was because of $newwidth and $newheight... so I tried an if/else to swap them for portrait/landscape. But I got the same result.
Any ideas? Thanks.
frozenpeas
imagecopy($thumb,$thumb_src,0,0,120,90,$newwidth,$newheight);
imagecopyresized($thumb,$thumb_src,0,0,120,90,$newwidth,$newheight);
imagecopyresampled($thumb,$thumb_src,0,0,0,0,120,90,$newwidth,$newheight);
I figured it was because of $newwidth and $newheight... so I tried an if/else to swap them for portrait/landscape. But I got the same result.
Any ideas? Thanks.
frozenpeas