ImageMagick ™ was introduced in 1999 by ImageMagick Studio LLC for the first time. It is a graphical application used for performing image processing tasks. It is a powerful collection of tools and libraries to read, write, and manipulate images in about 100 formats.
In this book, I'll show how to use the various ImageMagick utilities to create amazing artwork from the command line. You may find doing some image processing tasks with this program is more convenient than using other solutions, like Adobe Photoshop.
Let me give you an example. How do you resize about 3000 photos of different sizes and formats and place a watermark on them? This question led me to examine ImageMagick for the first time and after a while I found it to be a powerful and easy to learn application.
You may not believe how easily ImageMagick can do it for you. With a single command you can resize, watermark, add effects, frame, arrange, convert, format, and do many more tasks on a single image or a bunch of various images.
To cut a long story short, I think it is the best command-line image processing application that I’ve ever seen. It is more than a command-line application. If you are a programmer using compilers like C, Delphi, Python, Perl, and so on or even server-side languages like PHP, then you can find your favourite ImageMagick API for your compiler.
Due to space limitaion, this book concentrates just on command-line utilities. Maybe in the future we will publish titles on other ImageMagick APIs.
Chapter 1 is an introduction, which provides you with a brief history about Imagemagick and its capabilities.
Chapter 2 contains useful steps for installing and configuring ImageMagick. There are some good resources for downloading the application—based on your OS—too.
Chapter 3 covers the convert
and mogrify
utilities. You can find practical workshops in this chapter.
Chapter 4 covers the composite
and montage
utilities and their role in combining and presenting images.
Chapter 5 mainly focuses on input (import
utility) and output (display
utility) in ImageMagick. There are some descriptions about obtaining useful information from images using identify
.
Chapter 6 teaches you how to create animations using ImageMagick.
Chapter 7 contains brief information about the ImageMagick command line programming language—conjure
. Moreover in this chapter the compare
utility, which compares the differences between two images of the same size, visually and mathematically will be studied too.
Chapters 8, 9, and 10 cover some practical web projects including building a confirmation-code box, online customized e-cards, and online customized templates (for a book cover).
Appendix A will show you how to install and use new fonts. There are some free resources for fonts and images too.
Appendix B covers the compression and quality trade-off in ImageMagick.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
There are three styles for code. Code words in text are shown as follows: "We can include other contexts through the use of the include
directive."
A block of code will be set as follows:
[default] exten => s,1,Dial(Zap/1|30) exten => s,2,Voicemail(u100) exten => s,102,Voicemail(b100) exten => i,1,Voicemail(s0)
When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:
[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)
Any command-line input and output is written as follows:
convert rectangles.jpg resize 900% rect_resized.jpg
New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "clicking the Next button moves you to the next screen".
Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply drop an email to <[email protected]>
, making sure to mention the book title in the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <[email protected]>
.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Visit http://www.packtpub.com/support, and select this book from the list of titles to download any example code or extra resources for this book. The files available for download will then be displayed.
Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the Submit Errata link, and entering the details of your errata. Once your errata have been verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
You can contact us at <[email protected]>
if you are having a problem with some aspect of the book, and we will do our best to address it.