O'Reilly logo

Wicked Cool Ruby Scripts by Steve Pugh

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

Photo Utilities

Photo Utilities

photoUtility.rb

This script combines most of the scripts found in Chapter 4 and presents them in one file. This could be converted into a customized picture library or used as presented below. Some of the reasons I chose to create this suite is the focus on photographic manipulations. Scripts with a commonality are good candidates for consolidation and even warrant refactoring the code for easier maintainability. One of the advantages that I found most significant is having a lot of functionality all in one script. You can imagine how cumbersome it could be, having to hunt down multiple scripts to do the tasks included in this single Ruby script.

The Code

# == Synopsis # # photoUtility.rb: manipulate images to resize, ...

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