合并透明PNG会导致黑点不一致

时间:2011-03-08 06:56:26

标签: php png gd gd2

我正在将PHP中的一些透明PNG与GD合并。我在一个透明的背景上做了一堆数字,我把它放在最终的图像上。使用以下GD配置在一台服务器上运行脚本:

GD Support => enabled
GD Version => bundled (2.0.34 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.2.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.2.10
WBMP Support => enabled
XPM Support => enabled
XBM Support => enabled

完美无缺。我的结果看起来像是:

http://upload.nucleardog.com/rc97

当我在另一台服务器上运行相同的脚本时,gd配置如下:

GD Support => enabled
GD Version => 2.0
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.2
T1Lib Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.2.44
WBMP Support => enabled

我最终看起来更像是:

http://upload.nucleardog.com/19c3

有没有人知道为什么透明度无法以这种不一致的方式复制?复制到结果图像中不同位置的相同数字(相同源图像 - 未重新加载)的不同副本在黑色像素中具有不同的图案。

我想使用的脚本副本here适用于任何想要挖掘的人。它会在行69周围加载数字。它将数字复制到155-165的中间图像上。该中间步骤将复制到197-231的结果图像上。

有没有人知道如何修复此特定服务器上的脚本?它不是使用捆绑的GD吗?

感谢您的任何想法!

编辑:有问题的计算机正在运行PHP 5.3.3:

adam:~$ php -v
PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch (cli) (built: Jan 12 2011 16:07:38)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
adam:~/$

没有运行相同的人:

adam@server1 [~]$ php-cli -v
PHP 5.3.3 (cli) (built: Aug 18 2010 16:36:42)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
adam@server1 [~]$

有问题的是Ubuntu盒子。 php和gd都是从apt(php5和php5-gd)安装的。

0 个答案:

没有答案
相关问题