Blog of Software

There are 17 blog entries within the category of Software

Configuring ImageMagick RAW Delegates with DCRAW and UFRAW-Batch
November 6th, 2015 | View Post
It's not very often that I take the time to make technical posts for all of the complexities that go into my personal website, but this one was so frustrating and time-consuming that I figured I would share my findings with the world. I've also been having to do a lot of ImageMagick work in my professional life lately and so I fully understand the frustration of not having good documentation on some of this.

The problem:

I have a bunch of .CR2 files in my photo gallery (RAW image files shot on a Cannon). I am using ImageMagick for a bunch of different processing components including resizing the images for my gallery. Unfortunately ImageMagick was failing due to UFRAW-batch not being found. The error would look something like this:

convert: delegate failed `"ufraw-batch" --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i"' @ error/delegate.c/InvokeDelegate/1061.

After doing a ton of research and trying to hunt down ways to make ufraw-batch work with ImageMagick, I finally went down a different path of deciding to configure DCRAW as my RAW-file ImageMagick delegate. This method wound up working perfectly, but it does require some special configuring. I've detailed that process below.


The following installation was done on an Amazon AMI instance (essentially a CentOS machine), with ImageMagick 6.7.8-9 2015-10-08 Q16 installed. It also assumes the user has ROOT access and that all of the steps are performed as ROOT.

Installing DCRAW:
  • If you haven't already, sudo to root:

    su root
  • Create a directory to work with somewhere in your home:

    mkdir ~/dcraw
    cd ~/dcraw/
  • Download DCRAW

  • Install the RPM package

    rpm -Uvh dcraw-8.96-1.1.el6.x86_64.rpm

Installing DCRAW Dependencies (if necessary):

At this point you may find that you need to install the liblcms dependency. If this has happened then the installation of your RPM package will have failed. If DCRAW installed without any problems then skip to the libJpeg section below. If there was a dependency problem, take a look at the following:
  • Download liblcms:

  • Install liblcms

    rpm -Uvh lcms-libs-1.19-5.fc17.x86_64.rpm
  • Attempt to install DCRAW again

    rpm -Uvh dcraw-8.96-1.1.el6.x86_64.rpm
Please note that there could certainly be other dependencies missing as well. This was simply a problem that I ran into with a pretty typical modern Linux installation.

Installing libJpeg (for cjpeg):

At this point DCRAW should be installed on your system. The best you'll really be able to do is to convert to either a TIFF file or get a raw stream of JPG. The problem with the RAW stream (assuming you're wanting to export to a jpeg as most people will want to do) is that it doesn't help you to actually compress the JPG stream into a usable file. If you try to simply pipe the STDOUT to a file (xxx.jpg for example), the image won't load as it won't be properly compressed for jpeg specs. You'll need to use cjpeg (or a similar tool) to accomplish this final piece.
  • Download cjpeg

  • Unzip the gzip file and extract the tarball:

    gunzip libjpeg-turbo-1.4.2.tar.gz
    tar -xvf libjpeg-turbo-1.4.2.tar
  • Go into the newly extracted directory and install libjpeg:

    cd libjpeg-turbo-1.4.2
    make install

Testing cjpeg:

At this point you should have DCRAW, any necessary dependencies, and cjpeg installed on your system. Incidentally, cjpeg will likely have been installed to /opt/libjpeg-turbo/bin/cjpeg. If you can't find it, do the following:
  • Update the mlocate database and find the jpeg tool:

    locate cjpeg
From here you'll have the fully qualified path of where the cjpeg executable lives. Mine was installed to /opt/libjpeg-turbo/bin/cjpeg (which I assume is a standard location for this program).

Configuring ImageMagick Delegates:

So the final part of this process is to configure the RAW delegate for ImageMagick so that instead of trying to use ufraw-batch it instead uses your newly installed dcraw. Be sure to backup your delegates.xml file before making any changes to the file! You can break your installation of ImageMagick if you're not careful!
  • Find your ImageMagick delegates file

    locate delegates.xml
  • Be sure to backup the delegates file first!

    cp /etc/ImageMagick/delegates.xml ~/
  • Open the file with your favorite editor:

    vim /etc/ImageMagick/delegates.xml
  • Search the document for ufraw-batch

Replace the ImageMagick Delegates:

That untouched line in the delegates.xml file should look something like this:

You'll want to change it to look like this (using your path to cjpeg):


The most amazing server uptime!
October 26th, 2015 | View Post
I've been running a reasonably-sized farm of servers for almost a decade now. They were meticulously designed to meet the needs of my infrastructure and custom-secured to prevent intrusions. Given how long the boxes were up for I would have to say that they were pretty successful at their job.

The longest uptime I had at 5.97 years!

Slightly less at 4.35 years!

I had to install some software about 2 years ago and hence the mere 1.8 years of uptime.

The fourth server in my cabinet was reset with some regularity

Older Software Projects
October 1st, 2012 | View Post

About My SoftwareOver the years I have written a bit of software under the GNU/GPL license. Although some of the software that I wrote was originally distributed under my "AustinSmoke Scripts" software label, I have now just assumed distribute it under my own name. All downloads are free and can be used however the license was intended.At the moment I'm not really supporting any of the software. That said, if you run into any problems I probably won't be of much help. Still, you're welcome to contact me.Finally, I have received a number of questions regarding the released of my openFace software and despire the current project name having the word 'open' in it, it is not currently open-source and I have no intentions of making it open source in the near future. Sorry for the let down :(
AustinSmoke GasTracker v1.0.0 (demo)
This script will allow you to keep track of your gas mileage and have the results displayed in an easy to read website. None of the data is harvested from anywhere on the web but is rather entered manually by the user and for the user.Currently the program only supports the English system of miles and gallons. Future versions intend to include the metric system as well as conversions between the figures.If the demand seems to exist, a future version will allow the user to import a CSV file (or something similar). This should satisfy any users who have historically kept up with such data with Excel and other spreadsheets.

FilenameFile SizeFile MD5 Checksum
AS-GasTracker_v1_0_0.tar.gz43789 bytesf8e080a0948becb174496990c84e22fc
AS-GasTracker_v1_0_0.zip62133 bytes1c90e4cccbe1a49c14f718a405f81f1f
Same Gnome 2.8.0+ Custom Image Pack 0.1
This is just a pretty simple image pack that I put together for the popular open-source game, Same Gnome. The top left image is the default pixmap for the game, and the other three images are custom pixmaps that I made. Included in the tarball are: rotating_pills.png (topright), three_lens_flares.png (bottomleft), and mexican_numbers.png (bottomright). I can not guarantee that they will work with all versions of Same Gnome, but were designed to work with v2.8.0.While the Mexican Numbers and the Rotating Pills themes were meant to be graphically appealing, the Three Lens Flares pixmap was simply designed to allow the user to more easily see what particular color appears most in the game (thus allowing for higher scores - or so was the idea).How to use: Read your Same Gnome help section on 'Creating Scenarios'. Simply unTar/GZip the file and copy the .PNGs into your /usr/share/pixmaps/same-gnome/ directory (note: directory may be slightly different depending on your Linux distribution.)

FilenameFile SizeFile MD5 Checksum
same-gnome-pixmaps0.1.tar.gz110354 bytesc89fa40e7016eada6b42f69704b0444a
AustinSmoke Currency Converter v2.0
riginal msg thread: Anyone looking for a Currency Converter (169 different currencies included) or that is already using AS-Currency 1.0, I have finally completed AS-Currency 2.0. Tons of new features including a redesigned and more powerful admin interface, market gain and loss calculations, ability to use graphical images, new flag sets (for 45 countries), and plenty more. Previous bugs have been worked out and I have included a thorough documentation set as well as an easy to use install script. For use with PHP Nuke 6.9+nukecops download thread: Heavily redesigned PHPNuke block/module combination built off of the existing v1.0. The block displays current exchange rate information - displaying countries that the administrator defines. The module is a currency converter. New to v2.0 are: -market gains and losses displayed within the block. -graphical displays available for both gains and losses, and for numerical values -new flag images included -redesigned admin interface -redesigned module interface -multiple data servers can be selected for each currency used -ability to edit specific currency information Version 2.0

FilenameFile SizeFile MD5 Checksum
AS-Currency-v2.0.tar.gz129013 bytese22f8246efa5c5ae44315503a7820d5a
AS-Currency_v2_0.zip205880 bytesbbdb80946c60c7ec0cdd887b072af0dc
AustinSmoke Currency Converter v1.0
nukecops download thread: A PHPNuke block/module combination. The block displays current exchange rate information - displaying countries that the administrator defines. The module is a currency converter. Version 1.0

FilenameFile SizeFile MD5 Checksum
AS-Currency.zip119866 bytes9374d3958cee0aad1906623bd83b139a
OS X 10.8 / Terminal / VIM / xterm-color
September 24th, 2012 | View Post
It's not often that I make pure technology posts on my blog, but I thought this problem demanded some attention after I couldn't find the cause, much less the solution online.

I recently upgraded my MacBook Pro (as I do every two years) and ran into an extremely frustrating issue with the new version of Terminal. I will stop and say that this is probably an extremely niche problem. It is also almost certainly limited to software developers, not end-users.

That all prefaced, this is pretty much limited to people who happen to use the Terminal program in OS X, happen to run VI / VIM as their text editor, and happen to prefer syntax highlighting to be enabled. This may even be limited to certain color schemes (I prefer the "evening" scheme).

If these conditions are met, then you've probably noticed that your color scheme has more or less been destroyed as of recent - at least destroyed in the sense that your eyes are trained to see certain programatic statements in a certain color, and now that no longer applies. I've been using the "evening" scheme for over a decade now and can barely read it now on my new Apple. But why?

A basic PHP in VIM with the evening color scheme enabled using xterm-16color OS X 10.8, or just xterm-color on previous OS X versions.

A basic PHP in VIM with the evening color scheme enabled using xterm-256color OS X 10.8 (the new default).

The new version of Terminal has extended the Terminal TTY settings. The previous version allowed the user to switch between xterm and xterm-color (amongst others). The new version allows the user to switch between xterm, xterm-16color, and xterm-256color. It just so happens that the old version of xterm-color ran with 16 colors, and the new version defaults to xterm-256color.

This is all fine and good, but it doesn't fly very well with most of the VIM syntax schemes. If you use standard Linux/BSD color highlighting, you may have also noticed that some of those colors are slightly different now. This is also due to the change.

To fix the problem, open up the Preferences in Terminal. Select the Advanced tab and where it says "Declare terminal as:", change that to xterm-16color.

You'll need to restart Terminal (or at least open a brand new window) for the change to take effect.

The two different terminal declaration types in the new OS X 10.8

Updated Sunday June 24th, 2018: After moving forward with yet another Apple OS X version and having to reconfigure my terminal settings, I discovered that this newer version has the same problem whether the xterm-color is set to xterm-16color OR xterm-256color. I changed the setting to the oldest one, xterm, restarted Terminal, and the problem seemed to be fixed.

Ideally you would be able to use the full color palette while using Terminal, but if you are just using the older standard ANSI colors like I am, it seems to work exactly the same as you would want it to.

This new change is specifically for OS X 10.13.5 (High Sierra).
Simple Podcast Manager v1.1
May 30th, 2012 | View Post
The Simple Podcast manager is a podcast manager designed to work specifically with iTunes. It has no bells and whistles, but allows one to quickly and easily put a new podcast online.

I actually built this project as a favor for Bill Burr a few years back. He had just started his now famous, Monday Morning Podcast, and needed a way to manage his podcasts. His audience eventually grew beyond the capacity that I could keep up with and so I suggested implementing a commercial solution. When we eventually stopped using the Podcast Manager in exchange for something else, I decided I'd go ahead and release it for public consumption. It comes with no guarantees or warranties, but it works well.

I've released it under the GPL license, so please do what you will with it.

Download from Freecode at:

Download directly from:

Tar/GZ: SimplePodcast.v1.1.tar.gz (32,530 bytes)
15 Terabytes: New Servers Up and Running!
January 16th, 2012 | View Post

Installing one of my new 3TB drives into the Synology RS-411
I've been waiting years for this little treat, but the new installation finally has a huge disk array available for consumption. In all, there is about 15 terabytes of usable space. For the time being I've only dedicated a few TB specifically to this site, but it's very easy to scale it now. Of course I do still have a business to run, so that does take some priority.

In addition to the new disk space has come all sorts of redundancy, which quite frankly is much more important to me. Not that a disk failure wouldn't still be a huge pain in the ass, but at least I am no longer worried about data loss. There would have to be a pretty cataclysmic failure at this point to lose anything. Many thanks to Dave G. for all of his help in picking out equipment and helping to get things setup. Hopefully his Amazon coffers are a bit better padded now. Over the coming weeks I'll be working on solidifying the new site layout and getting everything online that I want to. It will be several more months before I have all of my new content fully displayed, but I'll get there. Hopefully I can start keeping things updated at a much more rapid pace from here on out.

I'll post some pictures of the new setup just as soon as I have some time.