At my $OLDJOB, I used ImageMagick to compare snapshots during some automated front-end testing on our public Drupal site. It would compare the running test to previously accepted images, highlighting pixel diffs in red. It would also generate a 4 frame animated gif with of the original, highlit changes, the running test version, and back to the highlit changes (so it could loop for better comparison). Imagemagick sav…
Thanks for sharing this tip! Are there any guides you recommend? Edit: Here’s one guide for the legacy Imagemagick (may not work for the latest release), https://legacy.imagemagick.org/Usage/compare/ I’m trying to encourage my front end developers to use visual diffs to validate rendering rather than use Protractor to test HTML/CSS. I’ve known about BackstopJS, https://garris.github.io/BackstopJS/ and am on the looko…
ImageMagick: CLI for Image Editing
71–80 of 101 posts
Re: ImageMagick: CLI for Image Editing
#72ImageMagick, ffmpeg, exiftool and YouTube-dl are 4 of the most useful tools via command line.
youtube-dl seems to be abandoned, now. yt-dlp (an actively developed fork of youtube-dl) seems to be it's accepted replacement, I think. fyi
Re: ImageMagick: CLI for Image Editing
#73See also vips and libvips, presenting a much cleaner library interface and faster processing: https://www.libvips.org/
Re: ImageMagick: CLI for Image Editing
#74I always found it fascinating the grade-A executable names which imagemagick was able to claim in the global namespace: imagemagick /usr/bin/animate imagemagick /usr/bin/compare imagemagick /usr/bin/composite imagemagick /usr/bin/conjure imagemagick /usr/bin/convert imagemagick /usr/bin/display imagemagick /usr/bin/identify imagemagick /usr/bin/import imagemagick /usr/bin/mogrify imagemagick /usr/bin/montage imagemag…
No self-respecting Unix tool would use such long names, so that's why they were free. "compare" vs "cmp", etc.
Re: ImageMagick: CLI for Image Editing
#75Earlier quoted context omitted.
No self-respecting Unix tool would use such long names, so that's why they were free. "compare" vs "cmp", etc.
Image magick isn't something you use frequently and quickly like changing directories or moving a file. A longer more descriptive name is better here. Also easier to speak. Telling someone to write "compare" is easier than "C-M-P"
Re: ImageMagick: CLI for Image Editing
#76I always found it fascinating the grade-A executable names which imagemagick was able to claim in the global namespace: imagemagick /usr/bin/animate imagemagick /usr/bin/compare imagemagick /usr/bin/composite imagemagick /usr/bin/conjure imagemagick /usr/bin/convert imagemagick /usr/bin/display imagemagick /usr/bin/identify imagemagick /usr/bin/import imagemagick /usr/bin/mogrify imagemagick /usr/bin/montage imagemag…
No self-respecting Unix tool would use such long names, so that's why they were free. "compare" vs "cmp", etc.
Re: ImageMagick: CLI for Image Editing
#77Earlier quoted context omitted.
Thankfully as of v7 these are all bundled under a single "magick" command (with symlinks for compatibility). Hopefully in the future these can be removed
tbf this sounds like a problem that doesn't need to be fixed... Ironically this would introduce problems where many scripts sort of assume the binaries have the names they have.
Re: ImageMagick: CLI for Image Editing
#78Earlier quoted context omitted.
Imagemagick is one of the few bits of software where the functionality is worth the risk. Simply find a way to remove any network access and use it. I used to run it in a docker container with (almost) all capabilities dropped but with a directory mapped into it to run.
Not sure if this is common knowledge (??) but I feel I should note here: in my job we absolutely do not consider containers to be a security boundary[1]. On the other hand I still tend to use them for isolation on my personal boxen, because they at least reduce the blast radius of bugs or shitty packaging. [1] Random search result that appears to corroborate my claim: https://blog.aquasec.com/container-isolation
If the security folks at your job truly doesn't consider containers security boundaries then they are wrong. What seems more likely is they don't consider containers alone a _good enough_ security boundary. And that's fine, some places consider separate processes with different rights good enough security boundaries. Others consider two boxes that are able to interact with each other not a good enough security boundary. It doesn't change that things that weren't secure enough for the use case are still security boundaries.
Re: ImageMagick: CLI for Image Editing
#79If you ever need something actually performant or that uses far less memory, have a look at libVIPS
This is really interesting. In the past I've used netpbm for this kind of work, but it has been on life support for at least a decade now. I never used ImageMagick very much because each time I tried I found a new and exciting crash bug somewhere in the path, plus it tended to be much slower.
Re: ImageMagick: CLI for Image Editing
#80ImageMagick is an incredible bit of kit. It really is a piece of magic that surrounds us daily, that most people don't ever think about, but is easy to use, and insanely powerful.
Ditto for ffmpeg when you move into the audio or video realms.