dourao3960 2019-04-11 18:47
浏览 74

gmagick返回null而不是图像数据

Im trying to reproduce a working server with apache2.4 and gmagick (PHP 5.6) on Ubuntu 18.04 server. I've followed the same install as ubuntu 16.04 Both seem the same with slight variations in versions of libraries.

I'm running a test code. Both servers return the graphicsmagick lirary version but on the old server it returns image data and on the new one the var_dump returns null. Tried endless variations without success.

What difference between the servers can cause this? How to find the reason for returning NULL when the getversion works ?

Here is the test code:

$base_image = new Gmagick();
print_r( $base_image->getversion() );
$base_image->newImage(3, 3, "#FFAAFF"); 
$base_image->setImageFormat('png'); 
$x = $base_image->getImageBlob();
var_dump($x);

New server info: https://www.awesomescreenshot.com/image/3968945/a12fa60098fd7b69496d335240dc8d5a

old (working) server info: https://www.awesomescreenshot.com/image/3968949/334752e579e3d506d106d64e4fdbf726

Output from old working server: Array ( [versionNumber] => 2103042 [versionString] => GraphicsMagick 1.3.28 2018-01-20 Q16 http://www.GraphicsMagick.org/ ) string(81) "�PNG IHDR����IDAT�c��ժ����"+V�!IEND�B`�"

Output from new Not working server: Array ( [versionNumber] => 2168833 [versionString] => GraphicsMagick 1.4 snapshot-20180922 Q16 http://www.GraphicsMagick.org/ ) NULL

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 软件测试决策法疑问求解答
    • ¥15 win11 23H2删除推荐的项目,支持注册表等
    • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
    • ¥15 qt6.6.3 基于百度云的语音识别 不会改
    • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
    • ¥20 测距传感器数据手册i2c