Batch conversion of DNG files to other file types with the Linux command line

At the time of writing, Google Drive is unable to accept DNG files, the Adobe file type for RAW images from digital cameras. The uploads themselves work fine but the additional processing at the end that I believe is needed for Google Photos appears to be failing. Because of this, I thought of other possibilities like uploading them to Dropbox or enclosing them in ZIP archives instead; of these, it is the first that I have been doing and with nothing but success so far. Another idea is to convert the files into an image format that Google Drive can handle and TIFF came to mind because it keeps all the detail from the original image. In contrast, JPEG files lose some information because of the nature of the compression.

Handily, a one line command does the conversion for all files in a directory once you have all the required software installed:

find -type f | grep -i “DNG” | parallel mogrify -format tiff {}

The find and grep commands are standard with the first getting you a list of all the files in the current directory and sending (piping) these to the grep command so the list only retains the names of all DNG files. The last part uses two commands for which I found installation was needed on my Linux Mint machine. The parallel package is the first of these and distributes the heavy workload across all the cores in your processor and this command will add it to your system:

sudo apt-get install parallel

The mogrify command is part of the ImageMagick suite along with others like convert and this is how you add that to your system:

sudo apt-get install imagemagick

In the command at the top, the parallel command works through all the files in the list provided to it and feeds them to mogrify for conversion. Without the use of parallel, the basic command is like this:

mogrify -format tiff *.DNG

In both cases, the -format switch specifies the output file type with tiff triggering the creation of TIFF files. The *.DNG portion itself captures all DNG files in a directory but {} does this in the main command at the top of this post. If you wanted JPEG ones, you would replace tiff with jpg. Shoudl you ever need them, a full list of what file types are supported is produced using the identify command (also part of ImageMagick) as follows:

identify -list format

Amazement

During the latter part of last year, the magazine Linux Format suffered a staff clear-out and I was left wondering why. It was as if a load of folk left at once and, even if I have seen that sort of thing happening at my current place of work, I was asking if something went wrong at Future Publishing.

What had passed me by was that the then staff of Linux Format were working on starting up their own magazine. They then went about crowdfunding the thing on Indiegogo and it only was the appearance of Linux Voice on a shelf in the Macclesfield branch of WHSmith’s that alerted me to what was happening in previous months.

It does sound risky to have an entire bunch of folk from one publisher’s magazine go off on their own and do their own variant of it, especially in these digital days when magazine publishing is not as secure as it once was. The mention of someone being held by no-compete covenant that reminded me of the mindset of where I work for a living. Quite what their old employers must make of it would make interesting reading because mine might be tempted to see me in court if I did something similar, assuming that was a possibility; I too would be bound by a covenant for six months after leaving.

As for the magazine itself, the content is good like it needs to be. There may be the occasional misspelling but articles on OwnCloud and Arch Linux installation would draw my attention along with reviews of Mageia 4 and FreeBSD 10. A lot of the old names from Linux Format appear too so there’s an air of continuity there. The design of the new upstart is less flashy than its longer standing predecessor and it will be interesting to see how they coexist.

It will take time for any new ideas to come to fruition and I wish the new magazine well. Its intentions are good in that half if profits are to go to open source software projects and articles are to be made available to all under a Creative Commons licence. First though, it needs to stay financially viable and the coming months could be interesting. The collective experience of who is behind the magazine should help though and that might stop it becoming like Walking World Ireland and Cycling World, other magazines whose appearance in newsagents is occasional. Having support from an enthusiastic community is a bonus too and there may come a time when I have to decide between Linux Voice and Linux Format as is the case with Linux Magazine and Linux User & Developer.  For what is supposed to be a niche operating system, users of Linux are not badly served when it comes to magazines.

A belated goodbye to PC Plus magazine

Last year, Future Publishing made a loss so something had to be done to address that. Computer magazines such as Linux Format no longer could enclose their cover-mounted discs in elaborate cardboard wallets and moved to simpler sleeves instead. Another casualty has been one of their longest standing titles: PC Plus.

It has been around since 1986 and possibly was one of the publisher’s first titles. It was the late nineties when I first encountered and, for quite a few years afterwards, it was my primary computer magazine of choice every month. The mix of feature articles, reviews and tutorials covering a variety of aspects of personal computing was enough for me. After a while though, it became a bit stale and I stopped buying it regularly. Then, the collection that I had built up was dispatched to the recycling bin and I turned to other magazines.

In the late nineties, Future had a good number of computing titles on magazine shelves in newsagents and there did seem to be some overlap in content. For instance, we had PC Answers and PC Format alongside PC Plus at one point. Now, only PC Format is staying with us and its market seems to be high home computer users such as those interested in PC gaming. .Net, initially a web usage title and now one focussing on website design and development, started from the same era and Linux Format dates from around the turn of the century. Looking back, it looks there was a lot of duplication going on in a heady time of expanding computer usage.

That expansion may have killed off PC Plus in the end. For me, it certainly meant that it no longer was a one stop shop like Dennis’s PC Pro. For instance, the programming and web design content that used to come in PC Plus found itself appearing in .Net and in Linux Format. The appearance of the latter certainly meant that was somewhere else for Linux content; for the record, my first dalliance with SuSE Linux was from a PC Plus cover-mounted disk. The specialisation and division certainly made PC Plus a less essential read than I once thought it.

Of course, we now have an economic downturn and major changes in the world of publishing alongside it. Digital publishing certainly is growing and this isn’t just about websites anymore. That probably explains in part Future’s recent financial performance. Then, when a title like PC Plus is seen as less important, then it can cease to exist but I reckon that it’s the earlier expansion that really did for it. If Future had one computing title that contained extensive reviews and plenty of computing tutorials with sections of programming and open source software, who knows what may have happened. Maybe consolidating the other magazines into that single title would have been an alternative but my thinking is that it wouldn’t have been commercially realistic. Either way, the present might have be very different and PC Plus would be a magazine that I’d be reading every month. That isn’t the case of course and it’s sad to see it go from newstands even if the reality was that it left us quite a while ago in reality.

Dispensing with temptation

The compact system camera arena is a burgeoning one with many manufacturers having followed Olympus into the fray. In latter months of last year, Nikon finally took the plunge though Canon have yet to do the same. Seeing offers on Olympus E-PL1 kits with a 14-42 mm zoom lens had me tempted, particularly with a price tag of the order of £250. In fact, I even got to looking into the competition too and a shortlist emerged. This also featured the Samsung NX-11 and the Sony NEX-C3 as well as the big brother of the latter, the NEX-5N.

What eventually countered the allure of shiny objects was the question as to why I needed such an item. After all, I already possess a Pentax K10D DSLR and a Canon Powershot G11 and these have been satisfying my photographic needs for a while now. The DSLR may date from 2007 but it is still working well for me and, if it ever needed replacing, I’d be going for another Pentax with the K-5 being a strong contender. The Canon is doing what’s asked of it so the recent launching of the G1 X isn’t so tempting either.

The whole dalliance has me wondering about how photographic equipment changeovers come about. After all, it was around a decade ago with the DSLR revolution was in the offing if not in progress. Until then, film photography was predominant but it looks as if it got as far as it could from a technological point of view when I look back at what happened. The digital photography area was new and untapped so moving there offered new possibilities and purchases more easily justified. The end result is that very few film cameras are being made nowadays. Ironically, it’s film photography that now is untrammelled terrain for many and it is holding its own too in an era when digital photography predominates.

The same sort of newness that came with digital photography also applies to CSC‘s to a certain extent. From the heritage of half-frame 35 mm film photography, Olympus has fashioned a different type of digital camera: essentially a compact with interchangeable lenses. Was it the fact that I have no CSC that caused me to be tempted and has it happened to others too? Also, is that what got digital photography going in the first place?

It almost feels as if camera manufacturers have to keep bringing to market new models and new types of camera in order to stay in business. After all, Minolta had to sell its camera division to Sony when they failed to get going in the DSLR market quickly enough. The same thing might have happened to Pentax too with the marque passing to first to Hoya, and then to Ricoh after the firm lost its independence.

What doesn’t help is the lack of longevity of camera models. The coming of digital photography has exacerbated this situated with models being launched at a frenetic rate. In the days of film photography, a model could last on the market for a few years and there was once a time when a twenty year lifetime wouldn’t have looked so ridiculous though there were incremental improvements made over that time too. For instance, a Pentax K1000 wouldn’t be exactly the same at the end of its production run as it was at the start though the model number may be the same. That world is gone.

Camera types have done better with the SLR design lasting around 50 years so far. However, mirror-less camera technology is adding pressure like never before. Even compact cameras allow live TTL type viewing and Olympus dug into its film camera heritage to add an interchangeable lens mount to give us the first E-P1. The original PEN cameras were half-frame 35 mm affairs and, appropriately enough, their descendants have small sensors in the micro four thirds mould. Then, there’s Sony’s efforts with translucent mirrors that do not move like their SLR counterparts. Canon tried this in the 1980’s with film cameras but never pursued the genre. After that, there are mirror-less SLR-style cameras from Samsung and Panasonic that make you wonder if a full size equivalent is in the offing with live viewing and an electronic viewfinder. Olympus is doing a teaser advertising campaign at the moment and it has some wondering if an OM-D is in the offing.

In parallel with all this, Sony is making a good impression with their CSC’s, the NEX series. These have APS-C sized sensors like many DSLR’s and in compact bodies as well. However, the feel very much is that of a compact camera and some have complained of a like of buttons on them though the photographic quality is very good. Samsung have gone for the same sensor size in their NX-11 thought they have gone for SLR styling. That may be more suitable for some than having to find settings buried in menus.

In summary, we are in an exciting if unnerving time in camera technology at the moment. On one hand, we are seeing a great deal of miniaturisation and what formerly were still cameras can do movie making as well. The latter may not be an interest of mine and it looks like a time-consuming hobby too. A lot is in flux right now and a recent court case reminded us of the difficulties in doing original work these days with image processing in Photoshop forming the basis of a victorious copyright claim. Because the number of images that are getting created everywhere, it could be hard for some to avoid this one and that could be exacerbated if the government changes the law so that intellectual property claims can be processed in the small claims courts. That sort of thing makes film photography seem attractive and it does seem that it isn’t disappearing either, even if Kodak has its financial problems. Novelty seems to change photographic tastes and it seems that film photography is novel again. It’s a changing world and who knows where it take us. Maybe a new DSLR body might make a good purchase in case CSC’s usurp their place entirely. Photographic technology is interesting yet again.

A new acquisition

Back in the early days of this blog, I mulled over the idea of having a high-end digital compact camera to complement a DSLR that then was delivering very dusty images; that Canon EOS 10D was cleaned since then and comes in for occasional use to this day. That was nearly three years ago and a first generation Ricoh GR Digital was the item that then was catching my eye. At the time, I failed to justify spending that much money on such a thing and ended up acquiring a new Pentax K10D DSLR instead. The question that rattled about my head was this: what was the point of spending DSLR money on a compact camera? Its one that never really went away and comes to mind when you see the prices of interchangeable lens compacts like Olympus’ Pen and equivalent offerings from Panasonic and Ricoh (there, it’s interchangeable lens units rather than actual lenses).

The strongest counterpoint to the cost conundrum is the little matter of size. SLR (film or digital) cameras are sizeable things and there is a place for having something that drops into a pocket. It is that which has propelled me into taking delivery of a Canon PowerShot G11. It may need a good-sized pocket but, unless you are going out with no jacket, it shouldn’t be a problem most of the time. For those shorter sorties when I don’t fancy bringing an SLR out, it well-built and looks the business though some acclimatisation is in order to make the best of the knobs, buttons and menus. Nevertheless, the included manual will help with this process (there’s a paper quick start guide and more detailed documentation on CD).

Canon PowerShot G11

The camera hasn’t seen extensive use just yet so here are a few early impressions. Firstly, there’s the matter of size: it’s even smaller than the first camera that I ever bought (more than fifteen years ago) and that was a Ricoh 35 mm compact film camera. That comparison is even more striking when you consider the feature sets. The Ricoh was a fixed 35 mm lens affair with things like date and time stamping, ISO choice and a nod towards scenic mode selection. In contrast, the much newer Canon is loaded with the sorts of things that normally are found almost exclusively on SLR’s, starting with its effective 28-140 mm focal length range.

Exposure modes such as manual, aperture priority and shutter priority complement scene-based modes and another for movies (not a concern of mine, it has to be said). As if that weren’t enough, there’s exposure compensation too. It came as a surprise to me to find a form of manual focussing included though it is not as convenient as turning a focussing ring on a lens. You can see the inbuilt flash above but there’s also a hotshoe and a place to attach a tripod too. Settings like white balance and file format are accessed using the Function/Set button with the lever underneath the shutter release button controlling the focal length of the lens. In addition, there’s also image stabilisation and that’s important when you’re using live view to compose a photo. Spot metering and focal point selection are other things that find their way into the package. Some may be excited by other things but exposure and focussing are essential for any photographic efforts.

An optical viewfinder is included and it has dioptre settings too but my first impressions are that live view though the rear screen trumps it and I see no need for such things on SLR’s. That also flips out from the camera body and can be rotated either for self-portraiture or for folding back in on the camera body for use like a non-articulated screen. Another use is with those occasions when the subject means holding the camera in positions that would be impossible with a conventional screen; holding the camera over your head or down low on the ground are the sorts of situations that come to mind.

Of course, there’s more there than those features that I have listed and the specifications on the Canon website are as good a place to start as any. So far, my only testing has been of the cursory checks variety and to make sure that the thing works properly. Still, this has given me more of a feel for the camera and how it operates. As you’d expect, high ISO settings are noisy but a bigger surprise was that the smallest aperture setting is f/8. Being used to SLR’s, I was expecting to get f/16 and its like on there but a spot of internet investigation showed that I should have been taking the size of the sensor into account with my expectations. Any trials so far have been in dull weather so I’d need to use it in a wider variety of conditions before giving it the sort of wider appraisal that you’d find in the likes Outdoor Photography (who liked it, it has to be said). For what it’s worth, I have found no major criticism so far though I cannot see it usurping my SLR’s but that never was the intention anyway.