Slashdot Mirror


Graphics Tricks from the Command Line

An anonymous reader writes "There's nothing quite like command-line tools for handling large batches of tasks, and image manipulations are no exception. Web developers and administrators will appreciate the ability to handle large numbers of files easily, either at the command line or in scripts. This article presents the ImageMagick suite, a Linux toolkit for sizing, rotating, converting, and otherwise manipulating images, in a huge number of formats, whether one or a hundred at a time."

9 of 68 comments (clear)

  1. Gallery by L.+VeGas · · Score: 4, Informative

    ImageMagick is used quite a bit with online photo galleries. Here is one of the most popular.

    1. Re:Gallery by crisco · · Score: 4, Informative

      While it's true that ImageMagick is used quite often for online photo galleries and that Gallery is very popular, Gallery doesn't use ImageMagick (except for the forthcoming v2.0). Instead, it uses NetPBM, another set of opensource image manipulation tools that deserve a little pimping along with ImageMagick.

      --

      Bleh!

    2. Re:Gallery by L.+VeGas · · Score: 4, Informative

      Not true, but an understandable mistake.

      The latest version of Gallery (1.3.4) can and does use ImageMagick as well as NetPBM. I know many that have it running on their sites. It's just that Gallery's documentation is poor and rarely updated.

  2. Re:Wonderful program by Tolchz · · Score: 2, Informative

    You can install the libraries yourself. ./configure --prefix=/home/myusername/magicklibs/

    Then specify the location when you compiler ImageMagick.

  3. Re:Useful... by GigsVT · · Score: 2, Informative

    I use it with a reverse proxy system. My web app on the internet facing server runs a PHP script that makes a HTTP request to an internal host that does the image processing.

    Done this way, it mitigates most security risks. I still scrub the data that can be influenced by the user, just in case.

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  4. Re:Useful... by JimDabell · · Score: 2, Informative

    Its far easier to make a call to a command line image manipulation software than to call a library and do all the work yourself.

    Not particularly. For instance, with PHP:

  5. Re:netpbm tools? by Alan+Shutko · · Score: 3, Informative

    ImageMagick has all conversion type stuff in one "convert" program, so you don't have to pipe stuff between fifteen programs to get things done.

    OTOH, ImageMagick loads the entire file into memory to do its work, so on really big files you are better off shipping it through the pipe. (I've got a 150MB JPG around here that chokes convert, but pipes through netpbm great.)

    I like to have both on my machine.

  6. create multi-page PDFs by markjugg · · Score: 3, Informative
    ImageMagick can also be used to convert several image formats into a multi-page PDF. I used this just recently:

    convert -adjoin photos*.jpg one_big.pdf

  7. Re:Linux?? by Mikal · · Score: 2, Informative

    I think you'll find that the article is written that way because it is taylored for the IBM DeveloperWorks Linux site. It's not a comment on the Linuxness of IM.