douzhe9927 2015-12-21 14:09
浏览 161

使用PHP Imagick将PDF转换为JPG时的颜色细微差别问题

I'm experiencing a nuance color change when converting PDF's to JPG's only on certain PDF files. Actually the problematic files are only 2 (out of many), and the nuance change is only on the blue color (from #2a447a to #0630e4, or from #00a4d6 to #00ffff).

The conversion process is pretty much straightforward:

$im = new \Imagick();
$im->setResolution(200, 200);
$im->readImage($path . $this->filename);

$im->trimImage(0);
$im->setImageFormat('jpeg');
$im->setImageCompression(\Imagick::COMPRESSION_JPEG);
$im->setImageCompressionQuality(100);

$im->stripImage();

$tmpFile = sys_get_temp_dir() . '/' . $this->cleanUpImageName($this->label) . '.jpg';
$im->writeImage($tmpFile);

$im->clear();
$im->destroy();

PHP version is 5.4.36, Imagick is 6.6.0-4

Thanks in advance!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Stata 面板数据模型选择
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 请问这个是什么意思?
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
    • ¥15 模糊pid与pid仿真结果几乎一样
    • ¥15 java的GUI的运用