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

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.

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

报告相同问题?

悬赏问题

  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题