-2
我期待在页面加载时使用PHP缩小图像大小。 ?我真的不来知道如何做到这一点,我已经尽可能获得维度,但我会如何降低使用PHP只有这些尺寸得到这里是我当前的代码:缩小图像大小php
<?php
$stmt = $db->query('SELECT * FROM img_gallery ORDER BY list');
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) :
$image = $row['url'];
list($width, $height) = getimagesize($image); //grab the image dimensions here
?>
<img src="" width="<?=$width ?>px" height="<?=$height ?>px" /> //image here
所以每个尺寸减少几百个像素?
有什么问题?只需将值分为任何你想要的值 – Ohgodwhy
phpThumb()是PHP缩略图生成器链接 - http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php –
你的意思是像 mmmm