php生成图片缩略图显示在页面上 生成的缩略图不仅尺寸小,文件也要小,怎么弄啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考手册上的例子$filename = 'Desert.jpg';$percent = 0.5;// Content typeheader('Content-Type: image/jpeg');// Get new dimensionslist($width, $height) = getimagesize($filename);$new_width = $width * $percent;$new_height = $height * $percent;// Resample$image_p = imagecreatetruecolor($new_width, $new_height);$image = imagecreatefromjpeg($filename);imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);// Outputimagejpeg($image_p, null, 100); 这种情况应该用什么函数 mysql delete 复选框选择的内容 哪位好心大哥帮帮小弟解决下问题 求一个空间,两个域名的代码 php读cookie怎么办? 关于服务器环境问题.net与php 有哪些好的国外的开源代码的站点? 哪位提供一个计数器的类? 初学者问题,如何给print("s;dfjsf");中的字符串设定颜色 为什么一个php页面只有一个字母,但是访问的时候却会被加上<!DOCTYPE> php+ajax里php怎么取ajax传递过来的值 safeVar() 是什么意思啊?
$filename = 'Desert.jpg';
$percent = 0.5;// Content type
header('Content-Type: image/jpeg');// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);// Output
imagejpeg($image_p, null, 100);