Convert an Image to Grayscale with ImageMagick
A few years ago I bought a DSLR camera with a bunch of filter effects built in and it's been worth every penny. I took some incredible photos in London, Paris, and Jamaica, and tooks some really special photos of my son during his first few years. And many of my favorite photos were taken with grayscale filter but some I took in color and badly wanted them in grayscale. Of course I can use Photoshop to convert the image to grayscale but that's too much work. I have ImageMagick -- why not use the shell to very quickly convert it to grayscale?
Converting the image to grayscale with ImageMagick is simple:
convert my-image.jpg -colorspace Gray my-image-gray.jpg
The command is self-explanatory and executes in milliseconds. And since Photoshop takes a few seconds to start and I have to do the work manually, ImageMagick makes everything so much easier.
Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
Chris Coyier's CSS-Tricks blog is everything mine isn't. Chris' blog is rock star popular, mine is not. Chris prefers jQuery, I prefer MooTools. Chris does posts with practical solutions, I do posts about stupid video-game like effects. If I...
Events play a huge role in JavaScript. I can't name one website I've created in the past two years that hasn't used JavaScript event handling on some level. Ask yourself: how often do I inject elements into the DOM and not add an...
How about sepia tones? After all, it’s just like converting to grayscale with a different balance of red, green and blue.