Occasionally at work that we need to do some simple task that involves converting images or finding their sizes etc. The problems with tasks that are “Occasional” is that you can never remember the way you did it the last time.
What size if that jpeg, gif or png?
How can I resize that image?
You can’t be bothered firing up gimp or some other tool so what can you do……
@debian:$ identify truman.gif truman1.gif GIF 258x333 258x333+0+0 PseudoClass 32c 24kb 0.000u 0:01
That was easy, wasn’t it. What if we needed much more info than this, well thats much harder we need to do the following:
@debian:$ identify -verbose truman.gif
The hard part is the extra typing. I will leave it to the reader to try that one (there is too much output for here).
What about those times when you just wish one of your images was half the size. Well here comes another great tool to the rescue
@debian:$ convert -sample 50%x50% truman.jpg truman_half.jpg
For those that are after a little bit more info on these handly little tools head on over to IBM developer works to get more information.
Even the article above only scratches the surface of what convert can do.