Be inspired and inspiring.

Text

I’m working on a little command line tool for generating HTML photo galleries and needed to resize some images with RMagick. Unfortunately there were a shortage of good, concise examples of how to use it. So, for my own future reference and yours, here’s how to resize an image to maximum dimensions while preserving its aspect ratio. You can provide a width and height to resize_to_fit, or just one value as I am here.

require 'rmagick'

# Read first image from file
image = Magick::Image::read(image_path).first

# Resize image to maxium dimensions
image.resize_to_fit!(250)

# Write image to file system
image.write(thumb_path)

# Free image from memory
image.destroy!

In this example, we’re reading an image, resizing it, and then writing it to a new path. Do make sure you write it to a new path so that you don’t overwrite all your images. That would be sad.

Alternatively, you can use resize_to_fill to have the image fill the dimensions provided. This is great for generating square crops of your images.

image.resize_to_fill!(250)

The destroy method also turns out to be quite important. Because the Ruby garbage collector doesn’t know how much memory is being used inside of ImageMagick, the library underlying RMagick, it doesn’t garbage collect often enough. This can turn into a big problem if you’re resizing a large number of images in a loop. Fortunately it’s easy to address.

image.destroy!

Lastly, if you’re working with JPGs and would like to change the quality, you can pass a block to write.

image.write(thumb_path) { self.quality = 75 }

RMagick is great and does all kinds of neat stuff. Now that you’re up and running, take a look at the rest of the instance methods for more cool image manipulation goodness.

Dry the River on Black Cab Sessions

Speak with Conviction

Poem by Taylor Mali. Kinetic Type by Ronnie Bruce.

Source: vimeo.com

Better Password is now “mo betta” because the haters wanted symbols in their passwords. I hope you’re happy now haters.

Better Password is now “mo betta” because the haters wanted symbols in their passwords. I hope you’re happy now haters.

My biggest kodak moment (via Jon Tan)
“What do you call taking a photo of a volcanic eruption together with the Northern lights on a starry night ? ‘Once in a lifetime opportunity’ doesn’t really cover it. “

My biggest kodak moment (via Jon Tan)

What do you call taking a photo of a volcanic eruption together with the Northern lights on a starry night ? ‘Once in a lifetime opportunity’ doesn’t really cover it. “

Source: Flickr / ice-cold

Editorial: Engadget on Microsoft Kin

I’m completely confused by the Kin. Here’s Engadget trying to make sense of it. I like this quote from Josh:

It was literally one month ago that the company was extolling the possibilities and benefits of its completely rethought OS, a ground-up, reboot effort from the Windows Mobile team. An OS which taps into the Zune ecosystem, plays Xbox Live games, is built around the concept of social networking integration (sound familiar?), will have rich apps and great options for developers, and is built for state-of-the-art hardware. So, how does the company move from its halo mobile devices to the Kin and have it make any kind of sense? From high-end, iPhone-stomping phones, to two devices which are seriously under-spec’d (4GB, really guys?), severely lacking in services (no apps? no calendar?), and questionably designed (uh, the Turtle). How does this make sense for Microsoft, and more importantly, the consumer?
Source: Engadget

As part of my commitment to abandon the Adobe apps, I’m making the switch to Aperture 3. I love the Aperture feature set, but I’m having a hard time with white balance. Without any adjustment the Lightroom white balance is far superior and under difficult lighting situations its Auto setting really shines.
Here’s a photo of Will where the left is from Aperture without adjustment and the right is from Lightroom with white balance set to Auto. I don’t see anywhere in Aperture to automatically adjust the white balance. I’ve attempted to pick a neutral color from the photo with disappointing results. Am I missing something?

As part of my commitment to abandon the Adobe apps, I’m making the switch to Aperture 3. I love the Aperture feature set, but I’m having a hard time with white balance. Without any adjustment the Lightroom white balance is far superior and under difficult lighting situations its Auto setting really shines.

Here’s a photo of Will where the left is from Aperture without adjustment and the right is from Lightroom with white balance set to Auto. I don’t see anywhere in Aperture to automatically adjust the white balance. I’ve attempted to pick a neutral color from the photo with disappointing results. Am I missing something?

After visiting my favorite password generator and finding that they’re now charging monies, I decided to create my own. I therefore present to you, in all its minimalistic glory, Better Password. The passwords are 12 character alpha-numeric with confusing characters and vowels removed. 44 billion billion-ish combinations are awaiting your use, so get over there and get yourself a long, pseudo-random, and unmemorable password today!

After visiting my favorite password generator and finding that they’re now charging monies, I decided to create my own. I therefore present to you, in all its minimalistic glory, Better Password. The passwords are 12 character alpha-numeric with confusing characters and vowels removed. 44 billion billion-ish combinations are awaiting your use, so get over there and get yourself a long, pseudo-random, and unmemorable password today!

"Opera Mini: like VNC-ing from your iPhone to a Motorola Razr with a really fast connection."

Source: twitter.com

"Cross-platform tools dangle the old ‘write once, run everywhere’ promise. But, by being cross-platform, they don’t use, they erase ‘uncommon’ features. To Apple, this is anathema as it wants apps developers to use, to promote its differentiation. It’s that simple. Losing differentiation is death by low margins. It’s that simple."

The Steve used Bryan’s game to demonstrate multitasking (14:00) in iPhone OS 4.0 last week. Yes, I’m basking in his moment and also taking any credit that I can for it.

The Steve used Bryan’s game to demonstrate multitasking (14:00) in iPhone OS 4.0 last week. Yes, I’m basking in his moment and also taking any credit that I can for it.

Bangarang

Happy Monday morning!

Source: youtube.com

"I guess it’s about respect. It’s about a relationship I had, and I think many of us had, with Twitter, that doesn’t seem to be there anymore. And that’s frustrating, and disappointing. But mostly I guess it’s just sad."

Source: funkatron.com