PHP IMagick RGB转换为CMYK? [英] PHP IMagick RGB to CMYK inverts?

查看:365
本文介绍了PHP IMagick RGB转换为CMYK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用IMagick PHP模块将RGB .gif转换为CMYK .gif.

I'm trying to convert a RGB .gif to a CMYK .gif using IMagick PHP module.

我已经编写了这段代码

$i = new Imagick('mosaique.gif');
$i->setImageColorspace(Imagick::COLORSPACE_CMYK);
$i->setImageFormat('gif');
$i->writeImage('mosaique-cmyk.gif');

但是生成的"mosaique-cmyk.gif"仍然是RGB ...,但是颜色反转(O_O)

But the resultant "mosaique-cmyk.gif" still a RGB... but with inverted colors (O_O)

我在做什么错了?

我尝试使用.jpg并将图像转换为CMYK,但仍为负数.

I've tried with a .jpg and the image is converted to CMYK but it stills in negative.

我试图在另一台服务器上运行.pdf脚本,但效果很好.

I've tried to run my script making a .pdf on another server and it works fine.

IMagick中是否存在任何已知的错误? 在php5库中可以设置一些选项吗?

Are there any known bug in IMagick? Are there some options to set in the php5 library?

向我返回反转图像的版本比正常工作的版本新

The version that returns me the inverted image is newer than the one that works correctly

错误结果 PHP 5.3.3 iMagick 3.0.0RC1 ImageMagick 6.6.2

WRONG RESULT PHP 5.3.3 IMagick 3.0.0RC1 ImageMagick 6.6.2

正确的结果 PHP 5.2.10 iMagick 2.1.1 ImageMagick 6.5.1

CORRECT RESULT PHP 5.2.10 IMagick 2.1.1 ImageMagick 6.5.1

推荐答案

错误实际上是一个错误;)

The error in fact it's a bug ;)

我报告了此错误,其他人也证实了我的担心,现在将其分配给开发人员进行修复: http://pecl.php.net/bugs/bug.php?id=22184

I reported it, some other has confirmed my fear and now it's assigned to a developer for a fix: http://pecl.php.net/bugs/bug.php?id=22184

目前,解决方案是使用其他版本的库.

At this moment the solution it's to use a different version of the libraries.

这篇关于PHP IMagick RGB转换为CMYK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆