Gamerz Posted April 9, 2010 Share Posted April 9, 2010 Alright, so when the user uploads an image, it gets displayed onto a viewing page. So on the viewing page, I would like to make the image fit to the left...so the comment box can be shown without having to scroll to the side. I would be assuming to use thumbnails, but I'm not sure how that will work. As you can see below, the image is perfect...fits on the left, and also can handle the comment box just right. So what if a user uploads a full size image that occupies everything on the screen? The comment box wouldn't be visible until you scroll all the way to the right. Basically, I would like to make a thumbnail of the picture so it fits according to the size, but I'm not sure what to do.... Here is the perfect image that I want every image to be like: Quote Link to comment https://forums.phpfreaks.com/topic/198069-php-make-images-fit-according-to-size/ Share on other sites More sharing options...
andrewgauger Posted April 9, 2010 Share Posted April 9, 2010 You have 2 choices: <img src="filename" height="50px" width="50px"> OR http://www.php.net/manual/en/refs.utilspec.image.php There's a lot of content on php.net But the function you would want (I believe) is: http://www.php.net/manual/en/function.imagecopyresampled.php Quote Link to comment https://forums.phpfreaks.com/topic/198069-php-make-images-fit-according-to-size/#findComment-1039297 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.