dongya767979565 2012-03-22 01:52
浏览 165

Imagick :: thumbnailImage以前不接受4个参数

I've recently made some changes on a codeigniter app i maintain, and had to add a new thumbnail size for it's users.

So basically the original code looked like this.

$pic_thumb = new Imagick($targetFile);
$pic_thumb->thumbnailImage(40,40,Imagick::FILTER_LANCZOS,1);
$pic_thumb->writeImage($thumbnail . $newf_name);
$thumbnail_file = $thumbnail . $newf_name;
$pic_thumb->destroy(); 

And i just added a new block to create the new thumbnail pic. And it worked perfectly on my production development server. After moving it to production, i saw that thumbnails weren't scaling. so i checked the logs and i saw this:

PHP Warning:  Imagick::thumbnailimage() expects at most 3 parameters, 4 given 

There hasn't been any software update or changes, except that app and even restoring the previous version drops that error, and even the documentation shows it can accept up to 4 parameters.

bool Imagick::thumbnailImage ( int $columns , int $rows [, bool $bestfit = false [, bool $fill = false ]] )

If i do something like

    $pic_thumb->thumbnailImage(40,40,0);

Works, but i don't get the same effect since fill is disabled.

Btw the server is running Php 5.3.2

Can someone throw me some light on this issue?

  • 写回答

1条回答

  • doujiayuan8415 2012-03-22 03:04
    关注

    Check the Version of the Imagick-extension, the fill-parameter is available since 3.0.0b1

    评论

报告相同问题?

悬赏问题

  • ¥15 MATLAB动图问题
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题