If you open a RAW file in Aperture and compare the size of the picture with another application, it is very possible that the size is different.
This is not a bug. In contrast to tiff or jpeg, RAW files do not necessarily have the exact number of pixels defined, but small variations can take place.
I did some tests on one particular nef file from a Nikon D300.
First I converted the file to DNG, so I could open it in Photoshop CS2.
I then opened both DNG and NEF in the gimp with UCRaw. Result for both files: 4320*2868 pixels.
I then opened both DNG and NEF in Aperture. Result for both: 4304*2852 pixels.
I then opened the NEF in Capture NX. Result: 4288*2848 pixels.
And finally I opened the DNG in Adobe Camera Raw and Photoshop. Result: 4288*2848 pixels.
As you can see, out of four unrelated applications with different development teams, only two agreed on the number of pixels. And the applications that agreed, opened two different files (the dng and the nef).
Notes about digital photos and photo editing using mainly Nikon DSLRs, Canon S90, Photoshop, Aperture and Capture NX on Mac OS X.
Tuesday, June 24, 2008
Monday, June 23, 2008
Why is the sea red?

Sometimes you may encounter images that look like complete inversions of the original colours. They may be on web pages, embedded in PDF or MS Word documents or in about any location. The picture may for example turn all blue to red and vice versa, so the sea looks red.
The reason for this "corruption" may be that the document reader or the original document generator was not able to handle CMYK colours. If the image uses CMYK and the document reader tries to interpret the picture as RGB, that gives inverted colours.
The solution may be to open the document in another reader, or extract the image and open it in a better image reader, that correctly interprets the colours.

The problem may not have anything to do with CMYK of course. A similar problem with red sea water appears in Picasa 2.7, when you try to read compressed NEF files from a D300.
Sunday, June 22, 2008
LAB colour
LAB is a colour space, like RGB or CMYK. RGB is used to describe colours on a computer screen. CMYK is often used to describe colours for printed material. LAB's main advantage is that it is very easy to adjust colours using it.
The secret trick is to keep all lightness information in L.
If you have an RGB picture and you use curves to adjust the values for R (red), you inevitably make parts of the picture lighter or darker, and you will probably have to adjust G (green) and B (blue) as well to get the lightness of the original back. In LAB you have no such problem.
The L value (channel) goes from 0 to 100 and indicates Lightness:
This is more or less a black and white version of the image.
The a channel is the axis green-magenta. "A" is admittedly not a good abbreviation for green magenta, but that's the way things are.
Negative values, from -128, indicate green while positive values, up to 128, indicate magenta. In the image above, the dark areas are negative, so they will turn out greenish. The light areas are positive, so they will be more red. Note that the shadow on the flower is almost entirely invisible. A shadow is lightness, not colour, so it should not be visible in the a-channel, and it is not.
The b channel is the axis blue-yellow.

Negative values, from -128, indicate blue and positive values, up to 128, are yellow.
If we add the three channels we get this picture:

A typical modification in the lab colour space is to emphasize the colours using curves, like this for the b cannel:

The values that seem to be cut off at the edges here are unlikely to actually be used in the picture. The extreme values of Lab describe colours that the human eye cannot see or that do not exist. The modification to the curve is basically just to make it steeper.
Below is a stone that at first may seem mostly grey, but looking a little closer one can see that parts of it have a shift towards red. With LAB colour adjustment, one can emphasise the red, so a casual onlooker will see it much quicker. At the same time the moss got a little more intense green, and the image becomes more interesting.
Before LAB colour adjustment.
After LAB colour adjustment.
Clearly, this is not the only way to increase the colours of a picture. Often, it is quicker to simply increase the saturation. But LAB adds a different kind of flexibility, which may be just what you need.
The secret trick is to keep all lightness information in L.
If you have an RGB picture and you use curves to adjust the values for R (red), you inevitably make parts of the picture lighter or darker, and you will probably have to adjust G (green) and B (blue) as well to get the lightness of the original back. In LAB you have no such problem.
The L value (channel) goes from 0 to 100 and indicates Lightness:
This is more or less a black and white version of the image.The a channel is the axis green-magenta. "A" is admittedly not a good abbreviation for green magenta, but that's the way things are.
Negative values, from -128, indicate green while positive values, up to 128, indicate magenta. In the image above, the dark areas are negative, so they will turn out greenish. The light areas are positive, so they will be more red. Note that the shadow on the flower is almost entirely invisible. A shadow is lightness, not colour, so it should not be visible in the a-channel, and it is not.The b channel is the axis blue-yellow.

Negative values, from -128, indicate blue and positive values, up to 128, are yellow.
If we add the three channels we get this picture:

A typical modification in the lab colour space is to emphasize the colours using curves, like this for the b cannel:

The values that seem to be cut off at the edges here are unlikely to actually be used in the picture. The extreme values of Lab describe colours that the human eye cannot see or that do not exist. The modification to the curve is basically just to make it steeper.
Below is a stone that at first may seem mostly grey, but looking a little closer one can see that parts of it have a shift towards red. With LAB colour adjustment, one can emphasise the red, so a casual onlooker will see it much quicker. At the same time the moss got a little more intense green, and the image becomes more interesting.
Before LAB colour adjustment.
After LAB colour adjustment.Clearly, this is not the only way to increase the colours of a picture. Often, it is quicker to simply increase the saturation. But LAB adds a different kind of flexibility, which may be just what you need.
Why does not Aperture read my DNG file?
If you have a DNG file that Aperture refuses to open, is it possible that the DNG file is from a camera which has a strange format. Aperture 2.1 has support for DNGs from many cameras, but not all.
In some cases Aperture opens some DNG from a particular, camera, but not all. It then may depend on the lens, like in the case of an Olympus E-P2 ORF file.
Another possible explanation is that the DNG was generated with the "Convert to Linear Image" option turned on in Adobe DNG Converter. It has to be turned off. This is not obvious. The Linear Image option is there to increase compatibility compared to "Preserve Raw Image", but it is increased in a way that Aperture cannot handle.

Wrong setting in Adobe DNG converter.
Then, there is of course also the possibility that you cannot import the file, because you do not have any project, or because you highlight the wrong part of the screen, when you do the import. But in this case no files can be imported, DNG or not.
In some cases Aperture opens some DNG from a particular, camera, but not all. It then may depend on the lens, like in the case of an Olympus E-P2 ORF file.
Another possible explanation is that the DNG was generated with the "Convert to Linear Image" option turned on in Adobe DNG Converter. It has to be turned off. This is not obvious. The Linear Image option is there to increase compatibility compared to "Preserve Raw Image", but it is increased in a way that Aperture cannot handle.

Wrong setting in Adobe DNG converter.
Then, there is of course also the possibility that you cannot import the file, because you do not have any project, or because you highlight the wrong part of the screen, when you do the import. But in this case no files can be imported, DNG or not.
Saturday, June 21, 2008
What's that... eh... thing, in Capture NX?
The documentation of Capture NX is not perfect and the usability of the product is far from perfect. Here are a few things I have not found in the documentation.
Sometimes you see a yellow warning triangle in the window title bar.
This triangle stays as long as the the text "updating image" stays in the title bar, so it probably means the same thing. In other words, it does not mean the file is corrupted or contains bad data or too much highlight or that anything else is wrong. It simply means "wait".
When you display the white balance settings for a file in Base Adjustments > RAW Adjustments > White Balance, you may see numbers and letters after the Camera WB. It may be something like "Auto, A3, G2" or "Incandescent, 0,0" or "6000K, A2, G3".
The first information is the white balance type or the colour temperature expressed in Kelvin. The following two numbers are the adjustments you may have done in your D300, under Shooting Menu > White Balance > right arrow.
The first adjustment is the value on the Amber (A) - Blue (B) axis, and the second one is the value on the Green (G) - Magenta (M) axis. Coincidentally, this corresponds to the LAB colour model. The amber-blue axis confusingly corresponds to colour temperature as well, with each step equivalent to about 5 mired. The green-magenta axis is simply an adjustment of green-magenta, like a cc filter (colour compensation/colour correction filter).
Sometimes you see a yellow warning triangle in the window title bar.
This triangle stays as long as the the text "updating image" stays in the title bar, so it probably means the same thing. In other words, it does not mean the file is corrupted or contains bad data or too much highlight or that anything else is wrong. It simply means "wait".When you display the white balance settings for a file in Base Adjustments > RAW Adjustments > White Balance, you may see numbers and letters after the Camera WB. It may be something like "Auto, A3, G2" or "Incandescent, 0,0" or "6000K, A2, G3".
The first information is the white balance type or the colour temperature expressed in Kelvin. The following two numbers are the adjustments you may have done in your D300, under Shooting Menu > White Balance > right arrow.
The first adjustment is the value on the Amber (A) - Blue (B) axis, and the second one is the value on the Green (G) - Magenta (M) axis. Coincidentally, this corresponds to the LAB colour model. The amber-blue axis confusingly corresponds to colour temperature as well, with each step equivalent to about 5 mired. The green-magenta axis is simply an adjustment of green-magenta, like a cc filter (colour compensation/colour correction filter).
Thursday, June 19, 2008
The Lure of DNG
DNG, Digital NeGative, is Adobe's attempt at a unified RAW file format for all cameras world wide. Some people are all worked up about this and list numerous advantages.I am not one of them.
There is nothing wrong with dng, it just so happens that it is not much better than other things either. Some people duly convert all their Nikon nef files to dng, but that may be a waste of time and a loss of some data.
However, if your camera produces dng files, by all means, keep them. They are not worse than other raw formats.
Let's look at some of the alleged benefits.
Archiving is one of the often quoted arguments for dng. As dng is supposed to be a universal standard, it seems reasonable to assume that support for it will be around for ever, right?
The answer is perhaps. A standard does not become a standard by someone calling it a standard. The internationally defined format for writing dates is year-month-day, like 080619 for today. However, apart from Finland and Sweden hardly any country uses that date format in daily life.
Adobe supports dng, and a few camera makers support it, but most camera makers do not see much advantage. The by far biggest SLR camera makers, Nikon and Canon, do not support it. That means that most raw pictures that are taken today use other formats than dng.
It is very possible that there will be dng readers in 50 years time, but it is equally likely that there will be readers for Nikon's nef files and Canon's cr2 files.
And it seems reasonable to assume that a program that can read one dng can read all, right?
But that is not the case. Just like for tiff or psd files, there are many flavours and extensions. If a program cannot read the native raw file from a particular camera, it is quite possible that the program cannot read dng files from that camera either. It is also possible that it can read some files but not all, depending on the lens used.
In some ways, a dng is simply a wrapper around some other file format. A dng can even embed the full original of another raw file. If the program cannot read the original, it cannot read the dng.
One claimed benefit for dng is the file size. The story is that raw files for early cameras were only lightly compressed. The nef file of a Nikon D1X from 2001, for example, weighed in 7.8 Megabyte, while an equivalent dng file only was 4.8 Megabyte. A Canon 300D from 2003 had a crw file of 6.0 Megabyte, while the equivalent dng was just 4.2 Megabyte.
However, there is nothing inherently large with Nikon or Canon files. The companies can modify the formats, and they compress them more and more. A lossless compressed 14 bit nef of 14.4 MB from a new Nikon D300, for example, is converted into a 13.3 MB lossless compressed dng file, which hardly is any significant gain. A non-compressed dng with embedded jpeg preview turns out to be 25.4 MB - much bigger than the original.
There are still cameras that have huge raw files, and in these cases a conversion to dng has a certain sense. However, often it may be as useful to convert the raw to tiff or even jpeg - formats that are easier to manipulate for other purposes.
If you convert a raw file to dng, you may not lose any information - at least not unless you use the "Linear Image" option. However, there may be camera specific information in the raw file, like the Picture Control data in a NEF file, that no program can interpret correctly when it hides in a dng. The information is definitely there, but it may in practice be impossible to actually use it.
But then, as said before, there is nothing wrong with a dng. If you see any use for dng, by all means use it. I for example convert my nef files from my D300 to dng in order to open them in Photoshop CS2. It is either that or upgrade to Photoshop CS3 or use Aperture. Most often I actually use Aperture, as I prefer to work on the original file.
Wednesday, June 18, 2008
D50 vs. D40X & D300
There are two things I consider incredibly important in a camera:
The D40X I use when I travel or go on hikes, and the D300 I use when I want to actually take good pictures.

D40X with AF-S DX VR 18-200 f/3.5-5.6G lens. Light and powerful.
For a comparison between these and other Nikon DSLRs check for example Nikonians' comparison chart and Imaging Resources' reviews, which have some interesting performance information regarding auto-focus speed.
- It should be good.
- It should be light.
The D40X I use when I travel or go on hikes, and the D300 I use when I want to actually take good pictures.

D40X with AF-S DX VR 18-200 f/3.5-5.6G lens. Light and powerful.
For a comparison between these and other Nikon DSLRs check for example Nikonians' comparison chart and Imaging Resources' reviews, which have some interesting performance information regarding auto-focus speed.
Image Authentication
There is a menu item in the Nikon D300 to switch on "Image Authentication". This applies to several old professional Nikon cameras like the D3, D700 and all the way back to the D200.
Forget it. It is only of any use if you are willing to invest even more time and money, and even then the use is limited.
This is how it works. If you have the option activated, when you take a picture in nef, tiff or jpeg format, then a flag is stored in the file which can be read to check if the file has been changed.
The files can still be modified without any problem using for example Capture NX or Photoshop.
To read the flag, you need to invest in Nikon's Image Authentication Software. The software costs a few hundred dollars/euro.
This is clearly interesting for legal purposes. But if you just want to prove that the neighbours' cat really walked through your living room, it is probably overkill.
Besides the system was cracked in 2011, so there is no certainty left that the images were not modified. The new professional cameras, D4 and D800 do not seem to have the feature.
Updated 7 July 2012.
Forget it. It is only of any use if you are willing to invest even more time and money, and even then the use is limited.
This is how it works. If you have the option activated, when you take a picture in nef, tiff or jpeg format, then a flag is stored in the file which can be read to check if the file has been changed.
The files can still be modified without any problem using for example Capture NX or Photoshop.
To read the flag, you need to invest in Nikon's Image Authentication Software. The software costs a few hundred dollars/euro.
This is clearly interesting for legal purposes. But if you just want to prove that the neighbours' cat really walked through your living room, it is probably overkill.
Besides the system was cracked in 2011, so there is no certainty left that the images were not modified. The new professional cameras, D4 and D800 do not seem to have the feature.
Updated 7 July 2012.
Should I use RAW or JPEG?
The disappointing answer to that question, is that it is up to you to choose.
Raw (Nikon's nef) files contain more information.
Jpeg pictures are quicker to load and quicker to save. Many more of them fit on a memory card, and they can be sent straight to all your friends without more ado.
If you try to send a nef file to a computer illiterate person, or even an experienced Windows user, he will probably have problems opening it. It is even possible that his or your mail system does not allow the file to be sent, as it is too big. A 14-bit uncompressed nef file from a Nikon D300 weighs in at around 25 Mb.
If you try to take the ultimate perfect picture, then nef is probably the format for you. However, you may want to consider the number of small jpeg pictures you quickly could have taken and processed in the same time.
Raw (Nikon's nef) files contain more information.
Jpeg pictures are quicker to load and quicker to save. Many more of them fit on a memory card, and they can be sent straight to all your friends without more ado.
If you try to send a nef file to a computer illiterate person, or even an experienced Windows user, he will probably have problems opening it. It is even possible that his or your mail system does not allow the file to be sent, as it is too big. A 14-bit uncompressed nef file from a Nikon D300 weighs in at around 25 Mb.
If you try to take the ultimate perfect picture, then nef is probably the format for you. However, you may want to consider the number of small jpeg pictures you quickly could have taken and processed in the same time.
What a NEF contains
As a raw nef file is a dump of camera information and not an actual image, it is very different how the nef file is displayed in different applications.
Let's for example assume that you take a black-and-white picture with your Nikon. FastStone, IrfanView and xnview all display the image as black-and-white. However, the gimp, Picasa, Aperture 2.1 and Mac OS X' Preview ignore the tag that says that the image should be black-and-white, so they display the image in colour.
Nikon's Capture NX keeps the camera information, so it appears black-and-white, but one can also go back to the original colours.
White balance is, by the way, one camera setting that Aperture takes into account.
This may appear confusing for a simple reason: it is confusing. Not only are the names for the features sometimes confusing, but the concept itself is confusing.
There are a couple of metaphors one can use.
Think of the raw data from the camera as a Word document. If you switch on Track Changes in Word (or Record Changes in OpenOffice) you can make as much modifications you want. Add text. Remove formatting. Change pictures. You can always select Reject All Changes to go back to the original. You can also reject some changes and keep others. In the same way, you can always go back to the original camera raw data in a nef file, no matter how many changes you have made. You can also revert some changes, even if they were made in the camera, but keep others.
A more real life metaphor is a dinner table. Let's say you change the tablecloth every day. You use different kinds of china and put different dishes on the table every day, so it looks very different from one day to the next. No matter what things you add, you can always remove them at the end of the day. What you are left with is the original naked wooden table. In the same way, you can add effects to a nef file - sharpening, blur, white balance, noise reduction. But at the end of the day, you can remove them all, and what you are left with is the original camera raw data.
Many applications open nef files, but they almost never save to nef format. If you make a modification, you will have to save the image as tiff, jpeg or some other more mainstream format.
Capture NX is an exception, as it saves the modifications in the nef file itself. However, it does not touch the actual raw data in the nef file.
Some of the data that can be stored in a nef without touching the actual raw data.
Let's for example assume that you take a black-and-white picture with your Nikon. FastStone, IrfanView and xnview all display the image as black-and-white. However, the gimp, Picasa, Aperture 2.1 and Mac OS X' Preview ignore the tag that says that the image should be black-and-white, so they display the image in colour.
Nikon's Capture NX keeps the camera information, so it appears black-and-white, but one can also go back to the original colours.
- Go to Base Adjustments > Camera Adjustments > Picture Control.
- In the dialogue that comes up, change "Non-Picture Control" to "Picture control".
- Change the settings to what you prefer.
White balance is, by the way, one camera setting that Aperture takes into account.
This may appear confusing for a simple reason: it is confusing. Not only are the names for the features sometimes confusing, but the concept itself is confusing.
There are a couple of metaphors one can use.
Think of the raw data from the camera as a Word document. If you switch on Track Changes in Word (or Record Changes in OpenOffice) you can make as much modifications you want. Add text. Remove formatting. Change pictures. You can always select Reject All Changes to go back to the original. You can also reject some changes and keep others. In the same way, you can always go back to the original camera raw data in a nef file, no matter how many changes you have made. You can also revert some changes, even if they were made in the camera, but keep others.
A more real life metaphor is a dinner table. Let's say you change the tablecloth every day. You use different kinds of china and put different dishes on the table every day, so it looks very different from one day to the next. No matter what things you add, you can always remove them at the end of the day. What you are left with is the original naked wooden table. In the same way, you can add effects to a nef file - sharpening, blur, white balance, noise reduction. But at the end of the day, you can remove them all, and what you are left with is the original camera raw data.
Many applications open nef files, but they almost never save to nef format. If you make a modification, you will have to save the image as tiff, jpeg or some other more mainstream format.
Capture NX is an exception, as it saves the modifications in the nef file itself. However, it does not touch the actual raw data in the nef file.
Some of the data that can be stored in a nef without touching the actual raw data.
Subscribe to:
Posts (Atom)