Page 1 of 1

Reading and Writing to the same file

Posted: 2017-11-22T08:07:37-07:00
by kevinr
I am in the process of upgrading from version 6 to 7 on windows (ImageMagick-7.0.7-11-Q16-x64-dll).

The code we have issues commands which were working but having made one small change to support the new version don't work and report "Permission denied @ error/blob.c/OpenBlob/3315."

>magick.exe convert "218573_75.jpg" -rotate "-90" "218573_75.jpg" fails in v7 and worked in v6

It seems that the issue is that we are reading and writing to the same file since if I change the output filename it works.

>magick.exe convert "218573_75.jpg" -rotate "-90" "218573_75_new.jpg" works in v7

Is there a parameter I have to use now to allow this or is it no longer possible?

Kevin

Re: Reading and Writing to the same file

Posted: 2017-11-22T08:47:24-07:00
by snibgo
Writing to the same file shouldn't be a problem. Perhaps this is a v7 bug.

What happens if you remove "convert", so the command is:

Code: Select all

magick.exe "218573_75.jpg" -rotate "-90" "218573_75.jpg"

Re: Reading and Writing to the same file

Posted: 2017-11-22T08:54:45-07:00
by kevinr
snibgo - Thanks for your response, I have not tried that. I just found in the documentation that I have to use mogrify.

Re: Reading and Writing to the same file

Posted: 2017-11-22T09:03:27-07:00
by snibgo
You can use mogrify if you want, but you should not need to. Your command should work.