Jump to content

How to create a thumbnail image in PHP?


malisa

Recommended Posts

Many times your site needs images to be uploaded, may be for display with submitted content, then you have to make sure that the images displayed should be of a suitable size. If a user uploads a particularly large image, it may destroy the layout of the page when it is displayed.

       

Thumbnail images guarantee you that the images displayed will never exceed certain height and width values.

           

Creating a basic thumbnail is a five-stage process:

 

1. Load the source image into a PHP variable.

2. Determine the height and width of the original image.

3. Create a blank thumbnail image of the correct size.

4. Copy the original image to the blank thumbnail.

5. Display the thumbnail using the correct content type.

 

For more details you can go through http://phptechhelp.com/index.php?option=com_content&task=view&id=15&Itemid=32

Link to comment
https://forums.phpfreaks.com/topic/148226-how-to-create-a-thumbnail-image-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.