O'Reilly logo

Painting the Web by Shelley Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Image Magic: Programming and Power Tools

There are an extraordinary number of tools that can create and manipulate images on the typical Linux-based web server. From native image support built into programming languages to tools that can be accessed via the command line, you can turn a photo into a postcard, resize and annotate images, create an instant slideshow, or toss in complex image manipulations at the call of a function.

For instance, popular web scripting languages such as PHP have built-in interfaces to external graphics libraries. With this support, we can create simple applications that can open a photo, access individual pixels to find colors at these points, and generate an entire web color scheme.

Going beyond this built-in language-based functionality, there’s the incredibly powerful ImageMagick software suit, with functionality that can be accessed via the command line, built into reusable scripts, or created as applications via libraries in PHP, Perl, Ruby, and Python, among others.

Most of the functionality covered in this chapter is available with the typical web-hosting package that provides Secure Shell (SSH) access, and is built into the Linux operating system. Most is also available easily on the Mac with the Macports package management system or comparable Fink system. In addition, the version of PHP for Windows includes access to the graphics functionality, and ImageMagick provides a one-click installation of the graphics suite for Windows.

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required