Black cat in a coal hole taken at midnight
The picture on the left should open in a twinkling while the one on the right might take a some time to appear. (Actually, this will probably only be the case the first time you look. Thereafter both pictures are likely to be cached in your PC and will appear immediately.)
My fairly ordinary camera takes pictures that are 4000 dots (pixels) wide and 3000 high. That’s 12 million dots altogether making it a 12 Megapixel camera. These dots get saved in a computer file where the colour of every dot is defined by 3 bytes. So, for the full unblemished definition, my pictures needs 36 Megabytes.
That’s the file that gives the right hand picture (it’s in png format). It’s an awfully big file to send to your screen just to provide a small black rectangle! The one on the left comes from a more sensible 1 kilobyte file (in jpg format) but I defy you to see the difference even though the left hand file size is 3600 times smaller.
You’d probably guess that my camera takes bigger pictures than this tiny image, but how big was the original? The important answer is that it doesn’t a have physical size (or resolution)! It depends on the screen or printer you use to look at it. If the dots on the device are big, so is the picture, if they’re small, so is the picture. Older screens have resolutions of around 70-100 pixels per inch so my black cat picture would need a screen about 4 feet wide to show every pixel in the original.
However, I’ve set the width of both the pictures on this page to 3cm. On an old style screen this would be about 100 dots wide and 75 high – 7500 in total. Even the best iPad with its amazing 326dpi retina display would only use about 111 thousand pixels. So, what happens to rest the of the 36 million that were supplied for the right hand picture? Some sort of averaging of pixel colours has to be done by your computer and detail will be lost – even though you can’t see it. If you do this averaging before sending the file there are big gains to be made in speed.
Reducing the number of pixels to match the expected display device is sensible, but there are even more gains to be made by lumping together adjacent pixels of the same colour. Both Jpeg and png formats do this, but jpgs use a technique that also allows close colours to be merged depending on a quality factor. At 100% the data is compressed as much as possible but nothing is lost. At values lower than about 80% you can begin to see some deterioration of fine detail.
Neither of my pictures is absolutely black – otherwise both the left hand jpg and the right hand png would have been compressed to give very small files. Instead there’s a random selection of almost black pixels. The left hand jpg has been set to 200x150px with a quality of 70% making it a uniform very, very dark grey. The png (4000X3000px with every pixel defined) also shows up as a very very dark grey but the work to reduce it and average the colours was done by your computer after it received the file.
Be careful when you are changing the size of pictures. Increasing size will automatically drop the quality because your computer can’t add detail that isn’t there. Reducing the size is less likely to cause problems, but some software may drop the resolution at the same time without you realising. It may also drop the resolution when you export the file unless you have set it correctly.
So what resolution should you use?
Download speed is vital for websites and screen resolution is fairly poor so there is no point in using high definition pictures. 96dpi is usually fine and you should compress jpgs by the maximum amount possible without losing detail on the picture.
Print requires higher resolution so pictures that look fine on screen may appear fuzzy or blocky on paper and the curves may have jagged edges. 300dpi works well for print books, ebooks and covers but double-check your printing company’s requirements before you create your book. Higher resolutions are usually fine, although they may increase the file size of the ebook enough to push up the delivery cost on Amazon for books with a large number of pictures.
However much effort you put into getting the resolution right for your print book, you can still run into problems if your pdf creation software compresses the pictures. It’s sensible to check the settings before you create the file to make sure nothing is compressed lower than 300dpi.
Colours
There’s another little hassle with files intended for print rather than screen – colour definition. In the camera and on screen, colours are defined in terms of the proportion of red, blue and green light (RGB). Having all three together at 100% gives white. But if you print all three colours together you get a muddy grey. To get white you just need white paper – you don’t have to print anything!
Printing companies use Cyan, Magenta. Yellow and Black ink (CMYK) and yours may insist that pictures are defined in that system. Don’t panic if your picture is in RGB. There’s an equivalent CMYK setting for every RGB one so, if you set it correctly, good pdf software can change the RGB colours to CMYK when it creates your file.
As the technology of inks is not quite the same as the science of colours, there may be some difference between what you see on screen and the printed result. That’s why the printers ask for the definition in their own terms – it takes away any uncertainty.