Saturday, 8 December 2012

Pink 650D RAW images under Ubuntu

Underwater photos are usually blue

The versions of libraw and dcraw currently in the Ubuntu repos have a slight problem. When accessing RAW files from Canon's latest 650D, they display them entirely in pink - which probably isn't what you want.

The problem is simple enough: the versions of dcraw/libraw used by all the RAW processing apps in Ubuntu 12.10 (aside from eog - so Shotwell, UFRaw, RawTherapee, etc.) don't have the 650D listed yet, so the ICC profiles aren't getting properly interpreted.

One solution is to rebuild your applications, such as Shotwell, with the appropriate versions of the underlying raw libraries. That can be a pain, so I took the easier option, and opted to convert the images to JPEG first, thereby circumventing the issue.

sudo apt-get install libjasper-dev libjpeg-dev liblcms1-dev graphicsmagick
gcc -o dcraw -O4 dcraw.c -lm -ljasper -ljpeg -llcms
sudo mv dcraw /usr/local/bin/dcraw
echo alias rawtojpg="\"find . -name '*.CR2' -print0 | xargs -0 -n 1 -P 8 -iIMG gm convert IMG -format jpg IMG.jpg\"" >> ~/.bashrc
source ~/.bashrc

At least it's better than pink
Thereafter, you should be able to use the primitive alias rawtojpg to convert all .CR2 files in the current directory to JPEGs (leaving the original CR2 files as-is). Note the -P 8 flag, which runs 8 conversion threads in parallel - adjust as appropriate. You can obviously change the alias to a proper function which takes some args too, but the above was sufficient for my purposes.

Update, 8th August 2013

See my comment below for a complete solution to this problem.

Assuming you've already followed the preceding instructions in this post, all you need to do is install gimp-dcraw; then you'll be able to open your 650D CR2s with GIMP:

sudo apt-get install gimp-dcraw

Has the Apple bubble burst?

This week, the Apple share price tanked. In one day alone, it lost market capitalization of some 35bn USD.

Apple Inc. hit its all-time peak in September after stunning growth in the 1st quarter of 2012. Since then, it's just been sliding back downhill (barring a brief reversal in the last half of November, which has just been wiped off the board this week).

I'll leave the detailed analysis for others, but there are a few drivers from the tech side that seem worthy of comment.
  • The top of the hill: With such a large percentage of mobile phone and tablet sales, and with an ever increasing number & quality of players in the market, it's hard to see how they could make significantly greater inroads here. It's now more about maintaining customers than onboarding new ones. What Apple needed was a new market; a new product, and I don't see one on their horizon at present.
  • Litigation: Apple has been suing companies left, right and centre. These cases haven't been to uphold moral principles, or to protect complex designs from illegal duplication; they've simply been attempts at money-grabbing (from the largest US corporate by capitalization). Now the victims have started to fight back against their attacker, turning Apple's insatiable greed into unappetizing risk. Meanwhile, end users stuck in the middle are increasingly becoming disillusioned with Apple's aggressive tactics, and seeking alternative companies to support.
  • Google Maps: If you're going to sue them, you'd better not be reliant on their services. By ditching Google Maps and running with their homegrown solution, Apple removed one risk from its risk register, but in doing so created a certainty: an immature product. No matter how much Apple may improve Siri, or how much polish they put on the icon set, it isn't going to make up for taking away from users what they already had.
  • Gradual improvement: This sounds good; it's what we often see with each iteration of the Linux kernel: a number of small improvements, which may or may not impact users much, depending on their individual interests. The problem in terms of commercializing it is that few people need or want to upgrade for each and every small set of improvements. Yet, since Apple has reached near-saturation in the western markets, it is reliant on users upgrading frequently. It either has to persuade users that they really do need those extra pixels on the screen, or it has to continually innovate. This is where they've slowed down, and understandably so. How much more can and should be packed into devices in everybody's pockets?
  • Competition: Apple led the way with the all-round quality of their first music players, smartphones and tablets. Competition existed, but it was either inferior or small-scale. Now, that simply isn't the case: competitors have caught up, and in some instances actually surpassed Apple. For example, when asked, I presently recommend the S3 for smartphones, and the Galaxy Tab for tablets. Again, it comes back to a lack of innovation on Apple's behalf. The phrase "sitting on one's laurels" comes to mind.
  • Remember from whence you came: Before Apple's runaway success with the iPod and its succeeding foray into small form factor mobile devices, it was best known as a niche hardware/software provider. Its primary market was for digital design artists across audio and visual spaces. This was back in 2001. Roll forward eleven years to 2012, and the PC space has remained largely similar; Apple hasn't made any major inroads into mainstream computing (it has gained market share, as some buyers of Apple mobile devices buy into the Apple ecosystem, but the overall impact to the global PC market share is small - we're talking a few percentage points change). Without the success of the mobile device space, Apple is just a comparatively small, niche hardware/software provider. It is reliant on the mobile space's - and iOS's - continued growth. If, for example, desktop OSs were to become popular on mobile (Ubuntu with Unity springs to mind), would there still be room for iOS?
Does Apple still have some cards hidden up its sleeve, or is it floundering precariously on the proverbial ledge, mourning the loss of direction from its most inspirational and charismatic late leader?