문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top