我有php代码创建pdf缩略图如下;
<?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;
?>
Run Code Online (Sandbox Code Playgroud)
哪个运作良好.但是如果我想在网页中显示图像,我必须使用<img src="">标记.有没有办法header("Content-Type: image/jpeg");
从语法和回声图像中删除<img src="">...?或者任何人告诉我如何使用语法在网页中显示图像.
我在我的Windows Vista PC上用php5运行apache ..