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 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, 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]

Fix Plex Placing Albums into “Various Artists”

Plex is a pretty nifty media server and app for deices such as Roku. However, with a large music library, it can do some goofy things. One of the most annoying is placing albums under the “artist” Various Artists (when they shouldn’t be there).

Case in point, two albums that I ripped from CD ended up in this category. The first was Jay-Z’s The Blueprint 3, and the second was Daft Punk’s Discovery. Neither of these should be under Various Artists. What was the problem? Plex’s media scanner picks up on the Artist ID3 tag. If for a given album there are two or more artists it will throw it in the Various Artists group. The easy solution is to use an ID3 tag editor (EasyTAG and Kid3 are two open source options) to clean up and homogenize the artist field for all tracks in the album.

-John Havlik

[end of transmission, stay tuned]

9 Comments Updated:

vBulletin Style Breadcrumbs for WordPress

vBulletin is a somewhat popular forum software package that has a unique breadcrumb design. Rather than the normal, single lined breadcrumb trail, it drops the current item’s breadcrumb to a second line. It also happen to have two folder icons for flair, but those are trivial to add in with CSS3. Even without CSS3 adding the icons is fairly easy (set as a non-repeating background image).

Continue reading

Fixed: BSODs Caused by garmnusb.sys in Windows 7

Since Windows 7 was released, I have had intermittent BSODs when plugging my Garmin Forerunner 305 into its USB cradle. The cause of the issue was always garmnusb.sys. A little searching shows that many users are experiencing the same issue. No one had a solution that worked consistently. Sure, you could connect the Forerunner before booting the PC, but that’s quite inconvenient.

A few weeks back, out of curiosity, I tried clicking on the “Update Driver” button for the device within Device Manager. To my surprise, a new driver was available.  Garmin released version of the driver back in April.

Since updating to, I have not experienced any BSODs on my system. Going from crashing every other time I connected my Forerunner to zero BSODs is a great improvement. Unfortunately, this is something Garmin should have had fixed three years ago, before Windows 7 was released.

-John Havlik

[end of transmission, stay tuned]

Make Firefox Use Dolphin for “Open Containing Folder”

In KDE 4, Konqueror has been replaced for the most part by Dolphin for all folder/directory viewing. However, by default Firefox will end up opening Konqueror if you right click on a downloaded item and select “Open Containing Folder”. It would be nice if Firefox would open the containing folder for downloads in Dolphin. There is a simple way of achieving this, and no command line work is required!

Continue reading