Page 1 of 1

Image not found using -deskew-

Posted: 2018-04-05T10:19:23-07:00
by IlCreatore
Hi everybody, I am a new ImageMagick user. To be more precise I am using DocHive which is a program which uses ImageMagick as part of it (https://github.com/raleighpublicrecord/ ... er/dochive). Beside that I am getting an error which I honestly do not understand. The lines are the following

Code: Select all

C:\Users\VisitingFellows\Desktop\dochive-master\dochive>java -jar app\DocHive.jar input\Cooke_Dale_2012-05-25.pdf output true templates * *
File path: C:\Users\VisitingFellows\Desktop\dochive-master\dochive\input
success
Executing: convert.bat -monochrome -density 300 input\Cooke_Dale_2012-05-25.pdf output\Cooke_Dale_2012-05-25\Cooke_Dale_2012-05-25_%02d.png
ExitValue: 0
Converted in 2 seconds
Page Count: 7
Executing: convert.bat -deskew 40% +repage output\Cooke_Dale_2012-05-25\Cooke_Dale_2012-05-25_00\Cooke_Dale_2012-05-25_00.png output\Cooke_Dale_2012-05-25\Cooke_Dale_2012-05-25_00\Cooke_Dale_2012-05-25_00.png
ERROR>magick: no images found for operation `-deskew' at CLI arg 1 @ error/operation.c/CLIOption/5269.
ExitValue: 1
I do not get why it says that the image is not found when it just created it with the first command.

Any hint about that?

Re: Image not found using -deskew-

Posted: 2018-04-05T10:30:45-07:00
by fmw42
I do not know what convert.bat is. Perhaps it is from your DocHive. Usually on Windows it would be convert.exe (not to be confuses with the Windows convert.exe). Nevertheless, typical IM syntax is to read the input first, then the operators such as -deskew 40%, then the output.

It might help to find out what version of Imagemagick is being used. If too old, then perhaps -deskew was not available at that time.

Did your first command actually create its output image?

Re: Image not found using -deskew-

Posted: 2018-04-05T10:32:10-07:00
by Bonzo
If the code is being generated by other software you should speak to the developers of that software.

A Couple of problems I can see:
The image usually comes straight after the convert
One of your image paths has a white space. In theis case it should be within " " I normally do that any way as it does not cause a problem.

Re: Image not found using -deskew-

Posted: 2018-04-05T10:36:31-07:00
by GeeMack
IlCreatore wrote: 2018-04-05T10:19:23-07:00I do not get why it says that the image is not found when it just created it with the first command.
I don't know what's happening inside your "convert.bat", which is apparently a wrapper script, but generally if running ImageMagick from the command line you'd want to read in your input image before doing any operations. The "-deskew" is probably expecting an image to already be available to work on. Try re-arranging your command to put the input image argument first.

Re: Image not found using -deskew-

Posted: 2018-04-05T16:17:33-07:00
by snibgo
IlCreatore wrote: magick: no images found for operation `-deskew' at CLI arg 1 @ error/operation.c/CLIOption/5269.
This is a message from ImageMagick v7, not v6. V7 is more fussy than v6 about the order of options. In particular, it rejects an operation like "-deskew" if no images have yet been read.

Perhaps DocHive has been written to generate v6 code, and can't generate correct v7 code. If so, then a solution may be to deinstall IM v7 and install v6.