A few hundred images (in the right order) to pdf

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?".
jamtat
Posts: 47
Joined: 2010-05-10T16:51:23-07:00
Authentication code: 8675308

Re: A few hundred images (in the right order) to pdf

Post by jamtat »

anthony wrote:No need to modify, Just use it as I said.

mv_perl 's/\d+/sprintf "%05d", $&/eg' files...
Thanks for the further input. I guess I misunderstood. But, in fact, I still don't understand. I can understand that mv_perl is a perl script, and I know how to run a perl script. I can also guess that the stuff inside inverted commas is an option that gets passed to the script--correct? But I'm drawing a blank on the "files..." part. Am I supposed to insert something in place of "files..."? Does the script handle wildcards--like *.jpeg? If I could grok perl I could probably look at the script and tell that. But the only thing I grok about perl at the moment is how to run a script someone else has constructed. If you can offer any further clarification, that would be appreciated.

James
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: A few hundred images (in the right order) to pdf

Post by anthony »

The "file..." is the list of file names to 'fix' using the perl regular expression given (expand all numbers to '5' digits). You can just put '*' here to 'fix' all the file names.

Sorry but the script does assume that you have a "merge" script, which is a non-destructive rename program. Use -f to have it just directly rename the files...

mv_perl -f 's/\d+/sprintf "%05d", $&/eg' filenames_to_rename_here...

The perl script is quite common around the web and is based on one written by Larry Wall originally.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply