Hacker News new | past | comments | ask | show | jobs | submit login
Examples of ImageMagick Usage (2016) (imagemagick.org)
133 points by brudgers 77 days ago | hide | past | favorite | 21 comments



Personally I prefer vips[0]. The CLI interface makes more sense to me than ImageMagick's and vips is automatically multi-threaded, so it runs fast and uses little RAM especially on large images.

[0]: https://libvips.github.io/libvips/API/current/using-cli.html


It depends on your use case. If you're doing relatively straightforward image processing, e.g. resizing on the fly, absolutely Vips is amazing. Check out imgproxy, imaginary, etc. But for more complex workloads like producing product mockups from incoming user images where you have multiple layers, blend modes, perspective warps, etc. ImageMagick is surprisingly good. We use IM for complex mockups where the inital design is created by a designer in Photoshop - we reproduce all the layer effects in ImageMagick so that it can run server-side with user uploaded images. Works great.


Thanks for sharing. It seems the low ram usage is because the developers specifically care about it and only process each input file in chunks rather than preload it in its entirety and even provide options to monitor ram usage; typically multithreading or otherwise adding parallel processing to a pipeline rather increases ram usage rather than is a reason for it to decrease.


This page is also worth taking a look: "Fred's ImageMagick Scripts" [0]

Fred seems to be an Imagemagick Expert who has written a lot of free shellscripts, over the years.

There are examples of multiline scripts for complex tasks (e.g. improving bad (greyed, inclined) scans or prints from a copymachine). Scroll down for illustrations, its a rather long webpage.

[0] http://www.fmwconcepts.com/imagemagick/index.php


"free of charge for non-commercial (non-profit) use, ONLY."


It also says that the author is open to discussing licensing for other cases.


  # Licensing:
  # 
  # Copyright © Fred Weinhaus
  # 
  # My scripts are available free of charge for non-commercial use, ONLY.
  # 
  # For use of my scripts in commercial (for-profit) environments or 
  # non-free applications, please contact me (Fred Weinhaus) for 
  # licensing arrangements. My email address is fmw at alink dot net.
  # 
  # If you: 1) redistribute, 2) incorporate any of these scripts into other 
  # free applications or 3) reprogram them in another scripting language, 
  # then you must contact me for permission, especially if the result might 
  # be used in a commercial or for-profit environment.
  # 
  # My scripts are also subject, in a subordinate manner, to the ImageMagick 
  # license, which can be found at: http://www.imagemagick.org/script/license.php
In 1999 this would have been normalish. In 2020 it’s a red flag given the range of standard licenses available and the simplicity of receiving payments for sales. It’s a legal mine field all around.


I do a lot of Mac/iOS UI development and use ImageMagick to make before and after GIFs from screenshots. It's incredibly useful. This is my one-line makegif bash script that I use by dragging images from the desktop to Terminal after the command:

convert -delay 80 -loop 0 +dither "$1" "$2" ~/Desktop/"`date +"%b %d, %Y, %H.%M.%S %p"`.gif"


GraphicsMagick is a great alternative. It has given me great performance gains on large images as well as being able to perform better on resource-contrained environments such as the RaspberryPi 1.

http://www.graphicsmagick.org/FAQ.html#how-does-graphicsmagi...


I found you can actually get pretty good performance out of ImageMagick if you recompile it to use an internal 8-bit per channel colour (QuantumDepth, giving a per-pixel 'Quantum Size' of 32-bits) setting which is good enough for web graphics. By default ImageMagick seems to have something large like a 32-bit quantum depth (which is equivalent to a fairly massive 128-bit per pixel). I don't know how this compares to GraphicsMagick out of the box but it might be interesting.


I'd say Imagemagick is still the best image software manipulation out there. As essential as ffmpeg is for video manipulation. Very few, if any others (whether standalone or in lib form) come even close.


GraphicsMagick? I've not done much comparison between them, but I've seen imagemagick source code, experienced output difference between versions and... I'd rather stay away if possible.


imo sharp is probably the only thing that comes close. It does not have the full feature set of imagemagick, but it is faster


I had to search what it is about:

https://sharp.pixelplumbing.com/

"The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions.

Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings due to its use of libvips."

https://github.com/libvips/libvips

"libvips is a demand-driven, horizontally threaded image processing library. Compared to similar libraries, libvips runs quickly and uses little memory. libvips is licensed under the LGPL 2.1+."


...which you can just use directly if you're not looking for integration with node js.


I used this lib so many times and in very thankful to the effort all contributors out into it. I just wish there was a graphic designer that could help them get a more appealing website.


Some comments mention GraphicsMagick as an alternative so a fyi...

I made previous comment[0] explaining why I initially used GraphicsMagick but it didn't work for Photoshop PSD files so I had to switch to ImageMagick.

[0] https://news.ycombinator.com/item?id=12825536


I have always been a (Net)PBM(Plus) guy, mostly because pbmplus was the first such software I used, and because I found it easier to keep track of what gets done in which order when it's an explicit pipeline. However, I haven't really updated my opinions in the last 20 years or so. Does Netpbm even still exist?


> Does Netpbm even still exist?

Yep. Most of my experiments that involve graphicals output a PxM file because it's trivial to do. There was a link on here a few {weeks,months} back about outputting PxM frames for video because it was fast and easy to feed into ffmpeg, avplay, etc.


For a simple and less feature rich option look at Jimp to see if it will do what you need and you’re programming in JavaScript.

It’s a breeze to use. I’ve used IM and GraphicsMagick too and they are insanely powerful, but just quite complex to use.


Still probably the most incomprehensible API I’ve ever encountered. Simply reading the parameters tells you little about how to use it, because they interact in totally surprising ways when combined. Simply tweaking the value of a parameter in something that almost works can have catastrophic results.

Also, any recipes or scripts you find online will be written against a different version than the one you’re using, and they won’t say which one. And there are big changes to how parameters function between versions.

Not recommended.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: