dpdrtj1075 2014-02-05 08:43
浏览 269
已采纳

PHP imagick_writeImage无法写入图像

I need to convert .dcom pictures into .jpg picture for printing, So I have path to .dcom files in my DB, but I have trouble with writing .jpg image into folder... Here is the code how I am trying to save .jpg picture

$test = imagick_readimage('V:\PACS\DCM\USMFD3\2014\02\04\1.2.840.113663.1500.1.295897643.3.1.20140204.74935.437');
imagick_writeimage($test, 'img\1.2.840.113663.1500.1.295897643.3.1.20140204.74935.437.jpg')

but when I am trying to var_dump(imagick_writeimage($test, 'img\1.2.840.113663.1500.1.295897643.3.1.20140204.74935.437.jpg')); I get bool(false)

UPDATE1: here is var_dump of $test - resource(1) of type (imagick handle)

So what I am doing wrong?

P.S If you need more code to see, please write a coment, and I will update my question

  • 写回答

1条回答 默认 最新

  • dongxianji0968 2014-02-05 08:49
    关注

    It's only a guess, but i think you web server is not allowed to write to there. Are you sure that the readimage works?

    Your path V looking like a windows mapped network drive. Maybe you webserver-process doesn't have that mapped drive.

    I could be also a problem with the relative path in writeimage. This could be: \img. Normally "c:\programm files*" where no write access is allowed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?