2012-07-28 13 views
0
<?php 

header('Content-type: image/jpeg'); 

$image = new Imagick('image.jpg'); 

// If 0 is provided as a width or height parameter, 
// aspect ratio is maintained 
$image->thumbnailImage(100, 0); 

echo $image; 

?> 

給出錯誤圖像「http://localhost/test/into.php」無法顯示,因爲它包含errors.Solve這個請嗎?該圖片包含錯誤與imagick

+0

可能重複[ImageMagick的CONVERT.EXE錯誤](http://stackoverflow.com/questions/11702187/imagemagick-convert-exe-error) – 2012-07-28 15:38:36

+0

什麼是圖像包含當你在文本查看編輯?我敢打賭,那裏有一個PHP錯誤消息。 – 2012-07-28 15:39:19

+0

他編輯了另一個問題..我問他把這個問題分開 – 2012-07-28 15:40:29

回答

0

您的圖像創建在0像素高度,可能無效的格式。試試看docs

$image->thumbnailImage(100, 100);