Digital Photo Workflow for the EEE Pc
Being a passionate photographer and a happy Asus EEE owner, I sometimes would like to take a photo and post it immediately in this blog. I tried to do that last week, at QCon, and it turned out it isn’t exactly a smooth process. In fact, I had to:
- Change my camera settings to create JPG images instead of NEF (Nikon’s RAW format) files
- Take the picture
- Import it in the EEE pc
- Use the provided Paint application to resize it and lower its quality
- Post the picture using Wordpress‘ web interface
- Remember to change again the camera settings to shoot in NEF
This process is far from being practical. First of all, I never use JPG format for my camera images; I always shoot in RAW/NEF, because it’s a far more flexible and editable format. Secondly, the provided Paint application isn’t very practical (due to the well-known screen constraints). Thirdly, for the same reasons, Wordpress’ web interface isn’t the most usable web application with the EEE pc.
What I’d like to achieve is a digital workflow like this:
- Shoot in NEF/RAW format
- Import in the EEE pc and convert it in JPG with a simple, command line tool
- Resize the image, lower the quality, rotate it (if necessary) with a simple, command line tool
- Publish it in the simplest possible way
It turned out it’s very simple to setup this workflow (at least for points 1, 2 and 3). You need only two simple, powerful and open source tools called dcraw and imagemagick. Installing them is a snap:
sudo apt-get install dcraw
sudo apt-get install imagemagick
How does the workflow work?
First of all, shoot your picture (in RAW) and attach the camera to the eeepc. Navigate in the memory and find the picture you want to import. Now you can use dcraw to convert it in JPG. A little known fact is that RAW files usually have a JPG thumbnail embedded; an even less known fact is that this “thumbnail” is often a high-resolution, middle-high quality image. My Nikon D80 NEF files, for example, contain a 3872×2592, 1MB JPEG thumbnail, more than adequate for blog posting.
So what I need to do is simply extract the thumbnail typing
dcraw -e <nameofthenexfile>
Now I can use ImageMagick to make the picture ready for publishing. I can resize it,
convert <jpgThumbnailName> -resize 600×400 <newJpgThumbnailName>
lower the quality
convert <jpgThumbnailName> -quality 70% <newJpgThumbnailName>
and rotate it if necessary
convert <jpgThumbnailName> -rotate -90 <newJpgThumbnailName>
…or make one of the hundreds of image manipulations described in ImageMagick documentation.
At the end of this process (which takes less than a minute to complete) I have a JPEG photo ready to be published in my blog. How? I’m still trying to figure out the simplest way. Ideally, I’d like to find a command line client interface for Wordpress, but I haven’t found yet a good tool.

1 Comment