【发布时间】:2011-08-30 13:30:10
【问题描述】:
我有如下创建pdf缩略图的php代码;
<?php
$file ="test.pdf";
$im = new imagick(realpath($file).'[0]');
$im->setImageFormat("png");
$im->resizeImage(200,200,1,0);
header("Content-Type: image/jpeg");
$thumbnail = $im->getImageBlob();
echo $thumbnail;
?>
效果很好。但是如果我想在网页中显示图像,我必须使用<img src=""> 标签。有没有办法使用<img src="">..从语法和回显图像中删除header("Content-Type: image/jpeg");
?或者有人告诉我如何使用语法在网页中显示图像。
我在我的 Windows Vista PC 中使用 php5 运行 apache..
【问题讨论】:
标签: php imagemagick imagick