Image not found using -deskew-

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
IlCreatore
Posts: 1
Joined: 2018-04-05T10:15:44-07:00
Authentication code: 1152

Image not found using -deskew-

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image not found using -deskew-

Post 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?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Image not found using -deskew-

Post 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.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Image not found using -deskew-

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Image not found using -deskew-

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply