image processing

Updated batch-cropping script

By far the most popular post on this blog has been “How to batch separate & crop multiple scanned photos” (click to link to original post). Thank you for your support, everyone!


While the script seems to have worked pretty well for most of you for the past three (!) years, there was actually a bit of a bug in it, making it not work for non-white backgrounds. This is now fixed!

In addition to fixing the bug, I’ve added a few new features including

  • Ability to set output JPEG quality
  • Setting a base name manually
  • Manually selecting the background colour (in case the auto-selection doesn’t work as it should)
  • The ability to automatically save output to the source directory

I hope you enjoy this new and improved script, which can be downloaded by clicking on the following link:

Instructions for installing and using this script are identical as for the original one (click here to see the original instructions, under the “Gimp”heading).

Here is a screenshot of the new and improved DivideScannedImages script’s user interface:




How to batch separate & crop multiple scanned photos

In this post I’ll show you two ways in which you can automatically split a (collection of) scanned pages, each containing several photos, into individual image files. My experience is that for this GIMP works better than Photoshop, and as an added bonus: it’s free!

Caveat: The “deskew” operation in the GIMP script only works on Windows computers due to its dependence on “deskew.exe”. If you use Apple or Linux this step will be silently skipped, and the rest of the script will work.

[2013-05-16 Update: the GIMP script can now handle TIF files as well]
[2014-10-02 Handles reading .tiff and .jpeg extensions too. Output dpi set to 600.]
[2016-02-14 The GIMP script has been revamped, with new functions as well as a bugfix for non-white backgrounds. Works for all OS’es!]


Just like you, I also have old photo albums at home. Albums with family photographs, glued to paperboard pages. And you also probably want to have them in digital format – e.g. to share with family members, to protect them from degradation and loss, or just for your digital library.

Read More»

12bit vs 14bit RAW and compressed vs uncompressed… Does it matter?

You know that to get the most of your DSLR you should be shooting in RAW, right? But these days Nikon cameras gives you even more options: 12-bit or 14-bit, and compressed or uncompressed RAW (NEF) files. Which should you choose?

Short question: Does it matter? Will you see any difference between compressed (lossy) and uncompressed (lossless) RAW? And between 12 and 14 bits?

Short answer: No it does not matter. Choose 12-bit compressed (because they take up less space) and forget about this topic. Or choose 14-bit uncompressed because theoretically you’re getting the “most” from your camera – you just have to live with the file sizes.

 Approximate RAW file
size on a Nikon D7000
12 bit 14 bit
compressed 12.6 MB 15.7 MB
uncompressed 14.9 MB 18.8 MB

Not happy with the short answer? Then read on…

Read More»

The Olympus PEN E-PL1 vs Nikon D3000 paradox

Petavoxel recently bemoaned the fact that the majority of sensors in recent micro four thirds EVIL cameras (or MILCs, if you prefer) perform poorly compared to contemporary APS-C sized sensors in digital SLRs. The only exception was the Panasonic GH1, which put up quite a respectable showing compared to its μ4/3 stablemates.

Yesterday dpreview posted their review of the E-PL1, and they were very happy with its high ISO performance. I quote:

Overall, the E-PL1’s images are the most natural and convincing here – avoiding the D3000’s overly contrasty, noisier images …  Most impressive is the E-PL1’s ability to produce results comparable with the EOS 500D and Pentax K-x, despite its smaller sensor.

But what does DXO Labs have to say? They disagree, showing that the big three leave the E-PL1 gasping for photons with a lowly 487  points in the low-light ISO stakes.

Hence, the paradox.

How do these two $500-ish cameras weigh up against each other?

How can this be? Is either DXO Labs or dpreview writing nonsense? The keen observer will notice that there are two significant differences in the way these two respected websites measure image quality:

Read More»

So, what's so great about "raw" files?

Have you ever heard an enthusiastic photographer saying something like “I shoot everything in raw”? But what is a “raw” file? Sounds like raw meat, doesn’t it? Why do people use these?

Few people think about it twice, but pretty much every photo on the internet is stored as a JPEG file. This also happens to be the kind of file you get out of most digital cameras. In fact, most consumer-grade cameras can give nothing else but JPEG output. This is no coincidence: JPEG’s been around since 1992, and it turns out that it’s a really great file format for photographs. JPEG allows you to store a lot of image information in a reasonably small file, and is quick to decode and write. Unfortunately JPEG is a lossy standard, which means you always lose some image information when creating a JPEG.

Contrary to common belief, this “lossy” property is not the main reason to avoid using JPEG. The JPEG algorithm is actually really clever in the way it loses its information, meaning the human eye often can’t see the difference between a lossy JPEG and its lossless equivalent. Look at the seagull below to see what I mean.

A JPEG file compressed at 95% quality. (click for detail)
File size = 78 KB
Scarcely any degradation artefacts, despite the fact that a losslessly compressed PNG would have required more than 300 KB.
Compressed JPEG at an extremely low 30% quality. (click for detail)
File size = 9 KB.
Compression artefacts are visible (sky, detail in lantern glass), but the image remains perfectly recognizable due to the clever way JPEG works. And this is an extreme example.

No, the reasons why you should be interested in raw files are more subtle…

Read More»