Page 1 of 2

ImageMagick - command line image conversion

Posted: Fri Jun 26, 2015 4:52 pm
by webfork
It's cross-platform but command-line so it can't get added to the database but someone might find my research useful:

License: Apache

Entry (private): http://www.portablefreeware.com/index.php?id=2509

First mention: Midas - http://www.portablefreeware.com/forums/ ... =6&t=21401

Download: http://www.imagemagick.org/script/binary-releases.php : ImageMagick-6.9.1-6-portable-Q16-x86.zip and ImageMagick-6.9.1-6-portable-Q16-x64.zip

Softpedia entry (for Mac client) http://mac.softpedia.com/get/DTP-Prepre ... gick.shtml

Re: ImageMagick - command line image conversion

Posted: Sat Jun 27, 2015 10:41 am
by TP109
If it can't be added to the database, shouldn't the private entry be removed? Tempting to vote for it. I use IM quite often. Great app for automating custom conversions with a script.

Re: ImageMagick - command line image conversion

Posted: Sat Jun 27, 2015 4:20 pm
by webfork
TP109 wrote:If it can't be added to the database, shouldn't the private entry be removed? Tempting to vote for it. I use IM quite often. Great app for automating custom conversions with a script.
You might want to check with Andrew on this but if memory serves, it's better to just overwrite it with a different program rather than actually delete the entry.

Alternatively we may want to leave it as someone might write a front-end for it. *Shrug

Re: ImageMagick - command line image conversion

Posted: Tue Oct 03, 2017 6:48 pm
by webfork
I recently used this trick to amazing effect, letting me clean up a huge number of scans with an abundance of white space around them:

http://www.gimptalk.com/index.php?/topi ... l-at-once/

It was glorious.

---

In digging this up, I found a specifically portable version is available from the download page:

ImageMagick-[version]-portable-Q16-x86.zip
ImageMagick-[version]-portable-Q16-x64.zip

... given that it's command-line I'm not totally clear on what about it is portable (most CLI tools keep settings local). But oh well.

Requires: Visual C++ 2013 Redistributable Package.

I've noticed that even though we can't add it to the database, the tool powers some tools here on the site including (I believe) ShareX and FileOptimizer.

Re: ImageMagick - command line image conversion

Posted: Wed Oct 04, 2017 3:28 am
by Midas
webfork wrote:I recently used this trick to amazing effect, letting me clean up a huge number of scans with an abundance of white space around them:

http://www.gimptalk.com/index.php?/topi ... l-at-once/

It was glorious.
  • Wow! It makes me envious I don't have a bunch of files lying around to run this on...

    Now, something to do the same to PDF files would be the works, because I have a lot of those. :mrgreen:

Re: ImageMagick - command line image conversion

Posted: Wed Oct 04, 2017 6:08 am
by __philippe
ImageMagick

By and large, CLI is rather my cuppa tea, to a fault even...as some may have noticed... ;-)

Yet, at a mere 75.3MB / 84.9MB, either one of ImageMagick portable distro packages (never mind their countless uncompressed components)
feels a bit rich for my lean-and-mean inclinations :roll:

https://www.imagemagick.org/download/bi ... 16-x86.zip
https://www.imagemagick.org/download/bi ... 16-x64.zip

Re: ImageMagick - command line image conversion

Posted: Wed Oct 04, 2017 2:14 pm
by billon

Re: ImageMagick - command line image conversion

Posted: Thu Oct 05, 2017 3:10 pm
by __philippe
Midas wrote:...Now, something to do the same to PDF files would be the works, because I have a lot of those. :mrgreen:
You might want to look at PDF-cropper, from the same developer who produced PDFgrep.

Didn't try PDF-cropper yet, but the program description appears to fit your requirement.

Re: ImageMagick - command line image conversion

Posted: Thu Oct 05, 2017 7:59 pm
by webfork
Midas wrote:Now, something to do the same to PDF files would be the works, because I have a lot of those.
PDF Shaper will crop files but not by white space around the image.

PDF Multitool will easily convert files to TIFF and that might be something ImageMagick can work with.

Re: ImageMagick - command line image conversion

Posted: Fri Oct 06, 2017 3:42 am
by Midas
Please excuse my nitpicking but wasn't referring to images inside PDF files but rather to those files that contain selectable text, only with a lot of white space around pages -- 'prepress proofs' I believe they're called...

Re: ImageMagick - command line image conversion

Posted: Fri Oct 06, 2017 4:50 am
by __philippe
Midas wrote:...wasn't referring to images inside PDF files but rather to those files that contain selectable text, only with a lot of white space around pages -- 'prepress proofs' I believe they're called...
@Midas
Precisely what PDFcrop apparently purports to accomplish:

A. DESCRIPTION
==============
PDFCROP takes a PDF file as input, calculates the BoundingBox for each page
by the help of ghostscript and generates a output PDF file with removed margins.

B.REQUIREMENTS
==============
*Ghostscript:
please download the last version,install and set the path to pdfcropper to search

Caveat:
The Ghostscript dependency might be a bit hard to stomach...;-)

Re: ImageMagick - command line image conversion

Posted: Fri Oct 06, 2017 8:28 am
by Midas
Thanks for clarifying that, _philippe. And yes, being not readily portable and somewhat hefty, a Ghostscript dependency is a bummer... I'm sure something wil be worked out, though. ;)
webfork wrote:
TP109 wrote:If it can't be added to the database, shouldn't the private entry be removed? Tempting to vote for it. I use IM quite often. Great app for automating custom conversions with a script.
You might want to check with Andrew on this but if memory serves, it's better to just overwrite it with a different program rather than actually delete the entry.

Alternatively we may want to leave it as someone might write a front-end for it. *Shrug
  • IMHO and as stated in the past, private entries serve a documenting purpose and shouldn't be erased without strong motives and proper consideration.

    OTOH, this thread should probably be moved to "Resources & Links", where it would keep good company to other CLI based utilities. :|

Re: ImageMagick - command line image conversion

Posted: Fri Oct 06, 2017 10:48 am
by Cornflower
For trimming whitespace from PDFs, especially for eReaders, I use [b]Briss [/b]
[url]https://briss.en.softonic.com/[/url], a java-based pdf-cropper that can handle odd-even pages

It is GPL, java-based, and from my look at the registry, portable.

Re: ImageMagick - command line image conversion

Posted: Sun Oct 08, 2017 5:57 am
by webfork
IMHO and as stated in the past, private entries serve a documenting purpose and shouldn't be erased without strong motives and proper consideration.
I could track down the course of comments on this topic but the short version is that my comment is old. The thought was with entries that had gone bad or had wrong information didn't need to be deleted since they could just be overwritten. However, for entries where there's nothing really wrong with them, there's not much point in overwriting old entries -- better to just create a new one.
OTOH, this thread should probably be moved to "Resources & Links", where it would keep good company to other CLI based utilities. :|
Feeling like we might need a thread split somewhere in here. I'll see if I can figure out something that's not really convoluted.
For trimming whitespace from PDFs, especially for eReaders, I use Briss https://briss.en.softonic.com/, a java-based pdf-cropper that can handle odd-even pages
Really if we just had a whole thread on some kind of cropping for PDFs, that's certainly valuable.

Re: ImageMagick - command line image conversion

Posted: Sun Nov 05, 2017 7:55 pm
by webfork
[Moderator note: posts about CPDF (command line image conversion) were given their own thread.]