drbvm26000 2012-07-07 22:18
浏览 97
已采纳

writeImage()时的页面错误

I have script to resize my photo with Imagick and then save. Here is code to make thumbnail with thiumbnailImage();

<?php
  header('Content-type: image/jpeg');
  $image = new Imagick('test.jpg');
  $image->thumbnailImage(600, 0);
  echo $image;
?>

Exmaple -> Resize example just thumbnailImage();.

This works. But when i want to save it with writeImage();.

<?php
  header('Content-type: image/jpeg');
  $image = new Imagick('test.jpg');
  $image->readImage('test.jpg');
  $image->thumbnailImage(600, 0);
  $image->writeImage('test_resized.jpg');
?>

It display server error. Example -> Example resize with writeImage();

  • 写回答

3条回答 默认 最新

  • dpwdsmbvm496180204 2012-07-07 22:26
    关注

    It seems you probably don't have write permission to that directory.. Set permission(CHMOD) to 777.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?