Loading... Please wait...

The Digital Fine Print

 

Copyright © 2011
Jeremy Daalder

Digital Imaging Basics

(Chapter Three of The Digital Fine Print by Jeremy Daalder)


This chapter covers the basics of digital images - pixels, bits, bit depths, contrast ranges, resolution and image sharpness.

Contents of this section:


Introduction to the Basics of Digital Images – Pixels and Bits

Knowing how a digital image actually works is really useful, because it helps the-beast-that-is-Photoshop actually make a little sense.  Knowing the basic of pixels, bits, resolution, and colour models, help you solve real world problems like – how big can I print a file and get away with it?  How should I sharpen a print?  How do I move between CMYK and RGB most effectively?

So we’re just going to wiz through the basics of digital images, ending up in the strange land of colour spaces, where we’re going to spend some real time.

Pixels

A pixel is a single dot of a single colour. A digital image is made up of a grid of pixels.

Pixels in Grey Scale Files and Contrast (Dynamic) Range….

In a grey scale file, the value of that pixel indicates how bright it is, from 0 (black) to 255 (white).  People think of these things as black and white, but the way you might want to start thinking of them are as D-Max, or maximum ink black, and paper white (the colour of paper with absolutely no ink on it).

This is the tonal range we have to work with – we can’t print anything darker than maximum ink black (determined by the inkset we use), and we can’t print anything lighter than paper white (determined by the type of paper we choose).  But we’re free to roam within those boundaries, completely as we see fit.  Indeed we need to roam within these boundaries, and right up to the fence, but we really need to be careful stepping out of these boundaries.  Because over the fence bad things live.

While I’ve asked you to start thinking of the boundaries as max black and paper white, it’s important to remember that this isn’t necessarily the case – it’s only the case if our output medium is a print.  If your final output medium is a monitor, then 0 and 255 are simply the blackest black and brightest white the screen can reproduce.  The distance from black to white in any system is referred to as the contrast range or dynamic range of the system – ie the range of brightness levels a system can reproduce.

If we don’t get close to these boundaries, we won’t be taking advantage of the previously mentioned pathetically small amount of dynamic range available to us, and that is bad because our prints will be flat and muddy looking, but if we step outside of those boundaries (called clipping), we’re going to be in very big trouble because we’re going to run out of detail and start committing some of the cardinal sins of printing.

When we’re manipulating tonality in Photoshop, be it with levels, curves, or any other tool, it’s very important that we make sure we’re using the complete dynamic range we can (in general, occasionally you may deliberately want to keep your images within a narrow contrast range for effect), and the Threshold View in Photoshop is a really handy tool for this.  You’ve probably seen this before, but just in case you haven’t, here’s the scientific way to determine the black and white point in your photograph, thus maximising your images use of the available dynamic range.

The image that follows is, at the moment, flat and lifeless, and the histogram for the image shows us why – the tonality is compressed and we’re not taking full advantage of the available dynamic range available to us.  This can be seen because there are no pixels at either end of the tonal scale, that is, no pixels have values below about level 17 and above level 237.  This is a typical example of a ‘raw’ scan you would get back from a high quality scanning lab (like Image Science!) – it is deliberately scanned in an unclipped form, so that maximum detail is obtained from the sensor. 

6

(Image Science Raw Scan)

A typical lab scan will try and make the image ‘more appealing’ on screen, because it will be done by a scanning operator with very little training – this is what you will get back from a typical lab:

8

(Crappy scan from some lab)

You can see from the histogram that the image has been clipped – and the resultant image is way too high in contrast – printable detail in both the shadows and the highlights has been lost (e.g. the hair is now a black blob on the girl’s head).

So, starting with the first image which has all the detail from the original capture, rather than the second which is irreparably damaged, we now use the threshold view in levels to scientifically determine the black and white points.

Open levels.  Now, while holding down the ALT key (option on a Mac), drag the black slider to the right – the image will go completely white at first, and then as you drag the slider to the right you will see some pixels change colour.  Those pixels that are changing colour are clipping in that channel (i.e. they will be set to (0,something, something).  When the pixels go completely white, they are clipping in all three channels (ie are set permanently to 0,0,0 – maximum black).

Exactly where you want to set the black point is up to you – if you are trying to achieve maximum black in areas (e.g. an image with a totally black background) then this process can be used to set those pixels to absolute maximum black so that when printed their will be no chance of weak, muddy blacks.  However for most images, we generally only want the very darkest of pixels to print as max black, and to have detail in the image wherever possible, so we tend to set the black point to the value just on where the first pixels change colour:

10

Here I am allowing the very darkest areas of hair to go pure black.

Next, we do the same for the white point – hold down ALT (option) while dragging the white point slider to see where the threshold view lies – remember, any pixels that turn white will be permanently set to 255 (ie paper white)

12

Here, I am deliberately allowing the a few of the specular highlights off the girl’s top to be set to pure white.  In images without specular highlights, I would set the white point to the level just before ANY pixels turn white. These highlights are deliberately specular (i.e. have no detail) and small – otherwise we would want their value to remain below 255 (i.e. paper white).

The result of this process is an image with appropriate contrast -  making full use of the dynamic range available to us, but still with detail across the entire file (Might not reproduce very well in these small web jpgs but the histogram proves the details is there!).  The histogram runs all the way from 0 to 255.  The lump at the far right of the histogram are the specular highlights we have set to 255.

14

Clipping

So, we’ve looked at how to stretch the tonality of an image across the full tonal range to take advantage of what little contrast range we’ve got available to us.  The reason we use the threshold view is because it explicitly tells us which pixels we’re going to clip.  Clipping is when we cause values in our file to rise above or fall below the threshold – that is, they are (permanently) set to 0 or 255.  0, as we know, is maximum black, and it isn’t necessarily a big problem, but it does mean we’ve lost any printable detail in those pixels.  255 is paper white, and this means, in reality, that we’ll be sending a signal to the printer to not lay down any ink at all for those pixels.  This is bad, and it leads us directly to the first rule of printing…

Here’s the first of Jeremy’s Rules (and remember, every rule has an exception, and these rules are more like guidelines, but this first one is pretty much set in stone!):

JD’s Rule Number One

Never, ever, print paper white in your print.  It’s ugly, it stands out like a sore thumb and anyone who tells you different is blind or wrong.  Printing paper white in your print area is the number one thing that  will make your prints look dodgy and amateur.  Printing paper white in your print joins your image with the world outside your print.  It defeats the fundamental goal of a fine print – that of capturing and holding the eyes attention.

JD’s Exception to Rule Number One
Specular highlights (tiny reflections, like those on the edges of metal), are ok to print as paper white.  Even then, only if they are *very* small (like 0.5mm or less) and there aren’t thousands of them. 

JD’s Addendum to Rule Number One – About Blacks

Printing full ink black, on the other hand, is often very necessary.  Without it your blacks will look weak and grey. But printing too much of it is fatiguing (and dull)  to the eye.  Unless you’re doing a commercial type shot on a completely black background, be wary of large, detail-less areas in a print. Black paper doesn’t have much of a story to tell.


 

Pixels in Colour Files

Each pixel in a colour file is actually a composite of three colour components – a red value, a green value, and a blue value.  Mixed together these three colour components give us the pixels final colour.  Here are some examples:

  • (0,0,0) – No red, No green, No blue = BLACK
  • (128,128,128) – Midtone RGB  = 50% GREY
  • (255,255,255) – Most saturated red, green and blue = WHITE
  • (255, 0, 0) – Most saturated red
  • (0, 255, 0) – Most saturated green
  • (0, 0, 255) – Most saturated blue

The range we work between is still black (0,0,0) and white (255,255,255) but at the end of each tonal scale for each colour is not the brightest pixel of that colour, but the most saturated.  So with respect to each colour we’re working between zero saturation and maximum saturation.  If we clip a particular colour channel, just as we talked about clipping the grey channel above, we are clipping the channel to the maximum saturated colour.  This is bad because it’s going to lead to lumps of undifferentiated colour, which will really stand out in a fine print.  But more on this soon.

Colour Models

In truth, RGB triplets are only one of many ways to represent colour on computers.  For example, CMYK files actually use 4 values to represent colour.  There are quite a few other ways to represent colour on a computer, but there are only three that are really relevant.  RGB we’ll cover now, LAB we’ll cover in the next lecture, and CMYK we’ll get to quite a bit later.

Bits and Bit Depths

Why are the numbers we use always between 0 and 255?  Actually, they’re not.  Well, they are if we’re talking about 8 bit images, then the maximum numbers are indeed 0 and 255.  However, if we’re talking about 16 bit images, the real numbers are 0 and 65536!  But it’s pretty hard to draw a graph on screen that is 65000 odd columns wide, so Photoshop always pretends the numbers are between 0 and 255.

Why 0 and 255 though?  Well, this has to do with binary numbers.  Basically, if you use 8 bits, or a maximum of 8 ones/zeros, the biggest number you can represent is 255.

000000000 = 0
111111111 = 255

And if we use 16 bits:

0000000000000000 = 0
1111111111111111 = 65536

Colour, in digital form, is like points on a line.  The starting point on that line is black, or the absence of that colour.  The ending point on that line is the most saturated version of that colour (lets use red).  Note – and this is really important – whether you are using 8 or 16 bit images, the end points of those lines does not change.  0 is still black and 255 (or 65335 or whatever) is still most saturated red.

16

This means 16 bit does not mean more gamut is available to us (as everyone normally claims).

It means that there are more points on the line – that is, more tones in-between black and our most saturated red.  So it means we have more smoothness of tonality between black and colour, not that we have extended our gamut.  People get this wrong all the time.

With 8 bit, by mixing three colours (R,G,B), each between 0 and 255, together, we can get any one of 16.7 million possible colours.  With 16 bit, by mixing our three values between 0 and 65536 together, there are more than 4 billion tones possible. 

16 bit is always better – always use it if you can.  If you don’t have a 16 bit version of PS yet, beg/borrow/steal (ie buy) one.  CS2 is great and well worth the dollars.

Here’s why 16 bit is better - because of the very nature of Photoshop (it’s really just a big maths engine), the operations you perform on colour numbers invariably result in a loss of tonality.  Here’s a simple example:

  • Pixel one is 9
  • Pixel two is 8
  • Pixel three is 7

We want to halve the value of these three pixels.

9/2 = 4.5 – hmmm, that’s no good, we can’t have 4.5, only 4 or 5.  Ok, lets choose to round all pixels down.

Pixel one is now 4.

8/2 = 4  - Ok.

7/2 = 3.5.  Round down as per the above = 3.

So we get:

  • Pixel one 4
  • Pixel two 4
  • Pixel three 3

Hmmm, suddenly instead of having a nice gentle tonal drop, we’ve compressed the tonalities of pixel one and two together such that they are now the same value.  Stretch this example out over a file with millions of pixels, and maybe do several operations, and you’ve got a big problem pretty quickly – all your tonality is bunching up around the same values.  The real result of this in your print is colour banding – that ugly, hyper-digital look where smooth tonality transitions are replaced by crude bands of tones.

With an 8 bit image, we have at most 255 levels for each colour.  This means it doesn’t take too many operations before we run out of levels.  With 16 bit images, there are 65000 odd levels, so considerably less chance the pixels will land on the same values, and therefore considerably less chance of banding.

The thing with levels is, we only really go down in the number we’re actually using.  Sure, 255 (or 65536) are available in theory, but odds are when we capture/scan, we won’t use all of them – because they don’t exist in the original, or our sensor is incapable of differentiating those levels.  Then, with a few basic operations in PS like levels or curves, we end up using even less (due to maths stuff like rounding errors).  Finally, when we get to printing, we translate the few colour levels we are using into the printer’s colour levels.   So in the end, we’re probably not using that many at all!  Luckily, it doesn’t actually take too many to create convincingly smooth tonality, but this is much easier to achieve if you start off with high bit depth scans/captures and then work in 16 bit in PS (and 32 bit editing is on the horizon).

Even if you don’t follow this (it will become clearer later), the take home point is capture and work in 16 bit whenever possible.

Resolution Basics

We’ve talked about individual pixels, but a pixel on its own is no good to us.  We need millions of them all squished together to make a decent image.

A complete greyscale digital image is made up of a grid of pixels:

18
The resolution of an image is how many pixels it has – X by Y pixels. 

A typical digital camera file from a has 3500 by 2200 pixels.  A typical 35mm film scan has 5400 by 3600 pixels.

In reality a colour image is really three grids exactly like the one above, overlayed, one for each channel – the red channel, the green channel and the blue channel. 

Resolution and Image Sharpness

Please read these sections of the wesbite before moving on to Chapter 4: