【问题标题】:Imagick::paintTransparentImage method is deprecated and it's use should be avoidedImagick::paintTransparentImage 方法已弃用,应避免使用
【发布时间】:2016-03-25 20:37:11
【问题描述】:

我正在尝试在 Laravel 5 中运行 Imagick,但每次尝试运行我的代码时都会收到此错误。 Imagick::paintTransparentImage 方法已弃用,应避免使用。在我在没有 Laravel 的情况下运行代码之前,这是一个警告,但该函数仍会运行。有什么方法可以抑制或关闭此警告?所有其他 Imagick 函数都运行良好,如果在 Laravel 的上下文之外运行,这个函数也可以。

【问题讨论】:

标签: php laravel laravel-5 imagick


【解决方案1】:

正如你所提到的,Imagick::paintTransparentImage 方法已被弃用。

改用 Imagick::transparentPaintImage。

http://php.net/manual/en/imagick.transparentpaintimage.php

【讨论】:

    【解决方案2】:

    我最终拒绝了 php 错误报告的严格性,并且代码运行良好。如果其他人收到此消息,请不要惊慌,它已被贬值,但他们没有提供最新的替代方案, opaquePaintImage 不是一回事。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-08
      • 2012-09-20
      • 2020-11-28
      相关资源
      最近更新 更多