Resizing the image in php for viewing purposes only

后端 未结 15 1719
面向向阳花
面向向阳花 2020-12-14 13:09

Okay, the reason I posted this is because I wasn\'t sure what to search for. I\'ll try to explain it as clearly as I can.

Say, I have an image sized 800x600. The box

15条回答
  •  情歌与酒
    2020-12-14 13:40

    This is exactly you´re looking for, and one step futher, caching thumbs:

    Check http://phpthumb.gxdlabs.com/

    You can use this script as script.php?img=image.jpg&size=100, in this case, they are on the same folder of the script.

     adaptiveResize($maxWidth,$maxHeight)->save($pathUrl);
         }
    
        header('Content-type: image/jpeg');    
        readfile($pathUrl);  
    
    ?> 
    

提交回复
热议问题