Graphics Tricks from the Command Line 68
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."
Useful... (Score:3, Insightful)
Re:Useful... (Score:2, Informative)
Done this way, it mitigates most security risks. I still scrub the data that can be influenced by the user, just in case.
Re:Useful... (Score:3, 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:
Gallery (Score:4, Informative)
Re:Gallery (Score:5, Informative)
Re:Gallery (Score:4, Informative)
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.
XV (Score:2)
Re:XV (Score:3, Insightful)
Do you have some code to change now?
Re:XV (Score:2)
Duh. I meant you have to purchase a licencs fo commercial use. It's 'free as in beer' for non-commercial use.
it's free (Score:2)
Oh, and it has that API and a library that third-party apps use directly, so having XV on my system would involve a lot of redundancy, while having ImageMagick just means a small app that uses the already-installed library.
I Love Image Magick! (Score:5, Interesting)
It still runs today producing the map of asteroids (http://szyzyg.arm.ac.uk/~spm/), even though I've moved on a long time ago.
For a while I even used ImageMagick as the core for a webcam motion detection program - rescale, blur, edge-detect, subtract differences and then count the total intensity of the output image - it worked pretty well, although it was a little slow.
I think I've created more art with ImageMagick than I've done with the Gimp.
Wonderful program (Score:5, Interesting)
But the downfall of Image Magick is the installation. It is the most god awful spaghetti mess of all time when it comes to its dependancies. You see, what they don't tell you right off the bat is ImageMagick doesn't actually work with the file formats internally. AFAIK, it relies on all of the format specific libraries out there. If your application is hosted by a virtual hosting provider, good luck getting all that installed.
Once it *is* installed, however, IM rocks.
Re:Wonderful program (Score:2, Informative)
Then specify the location when you compiler ImageMagick.
Not hard at all to install (Score:2)
Re:Not hard at all to install (Score:2, Insightful)
Mind you, NetPBM isn't under-represented, either.
Re:Not hard at all to install (Score:2, Insightful)
Re:Wonderful program (Score:1)
Unless, of course, you're running it on FreeBSD...
EXACTLY! hehe (Score:2)
I dunno about you, but...
cd
isn't all that hard to do, now is it ?
Re:EXACTLY! hehe (Score:1)
pkg_add ImageMagick-5.5.6.tgz is even easier...
Tiff libraries (little OT) (Score:1)
Ideally something that works with msjava (java 1.1). I know in java 1.4 there is jai, but atleast immediately that does not seem to be a very understandable api.
Anyways, we'll see if this gets any hits.
Re:Tiff libraries (little OT) (Score:1)
Re:Tiff libraries (little OT) (Score:2)
It's great! (Score:2, Interesting)
I also expect some commercial image procssing software (e.g., Adobe photoshop) may export some command-line programs.
netpbm tools? (Score:2)
Re:netpbm tools? (Score:4, Informative)
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.
Re:netpbm tools? (Score:2, Interesting)
in the end, (after we had left and done our part of the
Re:netpbm tools? (Score:1)
Re:netpbm tools? (Score:1)
Just curious... (Score:2)
Re:Just curious... (Score:2)
Hue (Score:2)
I broke a picture of a map down into all the edges (roads) and then changed the images into various different hues.
Now in a web page, you can see the roads change colour
DeskTop Backgrounds (Score:2)
-sirket
if only graphs were pretty (Score:1)
The problem is that for Joe Nerd, the output of a scripted graph is "good enough" - I use GD for a lot of things and it looks fine and is fast enough to be generated on the fly.
But my current need is to get graphs that look really good so that they can be used on a brochure type site, but can be updated frequently with the most recent market data (not updated in real time, every time the page is loaded - but updated by a script
Keynote on the Mac (Score:2)
The files are in XML, so they would be a snap to generate them through scripts, and the display engine produces stunningly beautiful graphs.
The graphs are so much prettier than Excel's it isn't even funny.
If you play with it at an Apple Store, I think you'd get sold on it pretty quick.
Hope that helps.
D
Re:if only graphs were pretty (Score:2)
Here's an example JScript script that creates a graph:
var excel = new ActiveXObject ("Excel.Application");
var book = excel.Workbooks.Add ();
var sheet = excel.Worksheets (1);
sheet.Range ("A1") = "foo";
sheet.Range ("B1") = "bar";
sheet.Range ("C1") = "goo";
sheet.Range ("A2") = "1";
sheet.Range ("B2") = "2";
sheet.Range ("C2") = "3";
var chart = sheet.ChartObjects.Add (100, 100, 200, 200).Chart;
chart.ChartWizard (
sheet.Range ("A1:C2"),
Re:if only graphs were pretty (Score:1)
I have done that in the past, but for whatever reason (stupidity on my part?), I haven't seen the Export functionality. Very useful.
I will have to play with it to see about font size, weight, and positioning - but that looks like that would be quite nice.
Thanks again.
Re:cat myBinaryFile.jpg (Score:2)
2) How do you cat something to "stdio"?
Re:cat myBinaryFile.jpg (Score:2)
Life saver! (Score:4, Interesting)
10,000 1.5MB bitmaps had to be delivered to the Food and Drug Administration in their original format and resolution (they needed to see things exactly as they were reviewed in a drug safety study), but wanted a visual 'menu' of the images, by patient over time.
Using the index of the images, I was able to create a labeled page-per-patient visual menu in PDF (FDA's preferred format -- but it would be a 3-character change to make it anything else). Using other tools, the same index was munged into a CSV file that was applied as hyperlinks atop the PDF menu (non-Open-Source tool, but I might have been able to find an open-source one).
In one day, the entire set of 15GB of data could be processed. In fact, putting it on a tape took longer than the image assembly.
PIL (Score:3, Interesting)
After using many, many different tools for this type of thing (including IM, netPBM, GD, and my own tools), PIL has by far become my favorite for image processing.
Check out this simple tutorial [pythonware.com] for some examples of what you can do.
Linux?? (Score:3, Interesting)
WTF has this got to do with Linux? AFAIK IM pre-dates any kind of wide-spread use of Linux. IM compiles on most unixes and is available for mac, win32, vms and more. It has nothing to do with Linux.
Sigh.
Re:Linux?? (Score:2, Informative)
create multi-page PDFs (Score:3, Informative)
convert -adjoin photos*.jpg one_big.pdf
Re:create multi-page PDFs (Score:1)
MOD PARENT UP (Score:2)
aah, but can it stitch images together? (Score:2)
How would you go about this?
Re:aah, but can it stitch images together? (Score:2)
Raw CCIT G.4 anyone ? (Score:1)
Now one thing I've been looking for is something to let me read RAW (headerless) CCIT G.4 (fax-type encoding),ImageMagick doesn't support it and the few free tools I found didn't work quite well. Anybody got recommendations ?
Re:Raw CCIT G.4 anyone ? (Score:1)
Re:Raw CCIT G.4 anyone ? (Score:1)
Re:Raw CCIT G.4 anyone ? (Score:1)
question (Score:1)
colour conversion (Score:1)
I found that it has problems converting an image to 256 color. It seems to mess up conversion of pixels with alpha transparency. The fix I found was to convert to gif format, then back to png (which automatically converts to 256 colour).
This may be fixed in later versions though.
What about the GIMP? (Score:3, Interesting)
The GIMP is scriptable with Scheme or with Perl or other languages... perhaps all it needs is a good set of command-line interfaces as well?
Not "a Linux toolkit"! (Score:2)
ImageMagick is quite portable, and compiles under almost every general purpose operating system that runs on 32-bit or 64-bit CPUs. ImageMagick is available for virtually any Unix or Unix-like system, including Linux. It also runs under Windows '95 and later ('95, '98, ME, NT 4.0, 2000, and XP), Macintosh (MacOS 9 and 10), VMS, and OS/2.
Once again, remember that freely available software, and software that comes with the source code, is NOT a Linux-specific phenomenon. In fact