[英]Imagick can't open RAW file
I'm trying to open ARW
(Sony raw image format) file with Imagick like below: 我正在尝试使用Imagick打开ARW
(Sony原始图像格式)文件,如下所示:
$imgOriginal =new Imagick();
file_put_contents($mptFile, $response->body);
$imgOriginal->setformat(strtolower(str_replace(".", "",$_typeFile)));
$imgOriginal->readimage(__DIR__. DIRECTORY_SEPARATOR .$mptFile);
File itself is downloaded from amazon s3, placed on local disk and then I'm trying to convert it to jpeg. 文件本身是从Amazon s3下载的,放在本地磁盘上,然后我试图将其转换为jpeg。 Everything works fine on Windows, but when I run that code on Linux server (Amazon EC2 instance), I'm getting error like below ( readimage
throws it): 在Windows上一切正常,但是当我在Linux服务器(Amazon EC2实例)上运行该代码时,出现如下错误( readimage
抛出该错误):
Message: unable to open image `/tmp/magick-XX3txRwQ.ppm': No such file or directory @ blob.c/OpenBlob/2480 消息:无法打开图像`/tmp/magick-XX3txRwQ.ppm':无此类文件或目录@ blob.c / OpenBlob / 2480
Originally, I were using readimageblob
instead of readimage
, but getting same issue with it. 最初,我使用的是readimageblob
而不是readimage
,但是却遇到了同样的问题。
It looks to me like it can't create some kind of temporary file, but I have nothing like open_basedir
being set and /tmp
folder is opened to everyone (its permission: drwxrwxrwx 3 root root
) 在我看来,它无法创建某种临时文件,但我没有像设置open_basedir
和向所有人打开/tmp
文件夹这样的东西(它的权限: drwxrwxrwx 3 root root
)
At the same time, it works fine with JPEG files. 同时,它可以与JPEG文件配合使用。
Is there any way to solve this problem? 有什么办法解决这个问题?
After some research I've figured out that I had no ufraw-batch
tool being installed on my linux machine. 经过研究,我发现我的linux机器上没有安装ufraw-batch
工具。 And that is a tool which actually does RAW image processing. 那是一个实际进行RAW图像处理的工具。
I've installed it and now everything works fine to me. 我已经安装了它,现在一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.