It doesn't work if the image file is inside a ZIP file, however -- the executed file doesn't get copied back into the ZIP file from the TEMP directory. How can I make it work when selecting the (zipped) filename from inside the image viewer?
Your Button will work fine if you use DOpus to resize the image instead of an external tool. Try this:
Image WIDTH=1500 ROTATE=270 PRESERVEASPECTRATIO PRESERVEDATE REPLACE=always HERE From inside the Image Viewer you'll have to use the Image convert dialog from the context menu but the Image Viewer also creates a temporary Zip-file and saves the modified Image there.
I don't have ImageMagick installed to test it but what you can try is to copy the file outside the Zip-file and copy it back afterwards. Try something like this:
Image ROTATE=270 HERE REPLACE PRESERVEDATE
Copy TO /temp
"C:\Program Files (portable)\Comics Curator\ImageMagick\mogrify" -strip -density 150 -resize x1500 -quality 50 "/temp\{file}"
Copy "/temp\{file}" HERE WHENEXISTS=replace
I should add that if I try your method on an image file not inside a ZIP container, it does copy the processed image back from the temp folder. It just won't put it back in the ZIP file.
I tried my code with nconvert with the same result. It doesn't work with files inside a Zip File. There seems to be a problem with {file} not transferring the filename of the zipped file to DOpus but the name of the temporary *.dop file or something like that. I couldn't find a way to get around this. We'll have to wait if leo or someone else knows a solution.
Normally, using {file} or similar within an archive or FTP site will copy the file to a temp dir and use that instead. That has to happen since external programs obviously cannot (usually) work on paths that aren't real files. (The filename will be the same, so {file} still generates exactly the same result, but you'll be needlessly extracting it to temp, twice in this case since you're also copying it to temp.)
You can use @nolocalizefiles to prevent that from happening.