Jump to content

Recommended Posts

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:

lol.jpg

Link to comment
https://forums.phpfreaks.com/topic/198069-php-make-images-fit-according-to-size/
Share on other sites

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.