Using ImageMagick to Batch Convert Photos

Back when I posted my photoset from WordCamp Minneapolis 2013, rather than performing any post processing, I just uploaded the full images from my camera’s SD card. Normally, I would open up the Gimp and reduce the resolution by 50% and then crop to a 3:2 or 16:10 ratio depending on what was appropriate for the images. This produces small files that are easy for the server to handle.

Since WordPress generally does a good job generating the image sizes it needs, I didn’t worry about uploading the full, unreduced images. Normally, the end users would never see the full size images, so no harm, right? Wrong. At least if you use Jetpack.

If you use the tiled gallery feature in Jetpack (like I do on this site) you end up using the WordPress.com CDN. Unfortunately, Jetpack tries to load the full image size when caching for the tiled gallery. Trying to pull 50 or so images, at 1 MiB to 2 MiB a piece to cache didn’t work too well. Naturally, Jetpack could do things slightly more intelligently and request for the closest, already existing, image size to be used, but that’s a topic for another day.

To get things to play nicely I needed to reduce the ‘original’ file sizes. Thankfully, Weblogs.us has ImageMagick installed. Thus, fixing the issue was as simple as running:

convert P*.jpg -resize 50% \
-quality 88 \
-set filename:newsize '50_%t' '[filename:newsize].jpg';

Then, after inspecting the results, all that was left to do was to rename the 50_ prefixed files back to the original file name.

-John Havlik

[end of transmission, stay tuned]

Worldwide WordPress 5k 2012

Err, make that a 21.7k. Since I did not see a post about the World Wide WordPress 5k earlier this month, I had assumed it was going to be one of of those “one shot” initiatives. However, today I saw they just moved it to the end of April (to today). Due to this, theĀ MSP WordPress user group did not get together for the WWP5k as we did last year. None-the-less I put in double digits worth of miles weekly again, so I’m going to count Saturday’s 13.4 mile run as my WWP5k run.

Saturday we had some sleet as we left for the run. Luckily, less than 5 minuets into the run we had run out of the rain/sleet and had about 11 very nice miles. During the last 2 miles the wind picked up and the sleet started again.

My goal for next year, other than not forgetting and organizing an run with the MSPWUG, is to get WP Trainer to a more usable state.

-John Havlik

[end of transmission, stay tuned]

Cisco Valet Connector Constant Reboot

A few Sunday mornings back, I was woken up by the dog, who was in a quite agitated state. The media center had been trying to come out of hibernation to check TV schedules and do the other miscellaneous stuff that brings it out of sleep. However, it kept rebooting instantly out of the BIOS. Every time the memory check passed, it would beep, annoying the dog, who passed the annoyance onto me.

Unplugging the Cisco Valet Connector allowed the media center to boot properly. Cool, well not really, as a WiFi adapter should not keep a computer from booting. The fact that the Valet Connector shows up as a USB flash drive before becoming a WiFi adapter seemed odd to be before. And, I’m placing part of the blame on that behavior for this constant rebooting. To resolve the issue, I removed USB flash drives from the boot list in the motherboard’s BIOS.

When the media center finally booted, I noticed another issue. The Valet forgot that it was supposed to be in WiFi adapter mode. This one was my fault. If you do not complete the device setup using the included easy setup software, the device may not remember its state after reboot. Awesome, right? After completing the setup within the included easy setup software I have not had either issue reappear for a week now.

-John Havlik

[end of transmission, stay tuned]

What I Look for in a Laptop

After having a slight scare with the “h” key on my trusty Vostro 1400 (the key mechanism was binding slightly so that it had to be firmly pressed from the top to register), I began casually perusing the laptop market to see what was available.

Since I’ve had this laptop for over 3 years now, it is nearing the end of its normal service life. Lithium Ion batteries are only good for 3 to 5 years. Based on previous experience, I probably have about a year left before the battery stops holding a charge. Even though I could just buy a replacement battery, getting something new may be a better alternate (already have a fatigue crack near the ExpressCard slot).

Continue reading