Thursday, 15 September 2011

How to speak publisher - D is for digital

This post is not what you expect. It's not going to waffle on about the advantages or disadvantages of e-books and apps or digital rights. There's enough of that out there already. Instead I am going to tell you what digital really means. There is a lot of mystification going on - some deliberate and some just the result of extensive ignorance.  

Let's start from the very beginning. 'Digital' means relating to or made from numbers. In terms of information technology, it means anything that can be reduced to the binary state of being stored as 0 and 1, or 'charge' and 'no charge' on a magnetic disk, tape, yadayadayada. A paper book has extension in 3-D space and cannot be stored as a sequence of 0s and 1s. However, it is produced (these days) from computer files that are digitally stored. You could see distributing and consuming books in digital form as a way of cutting out the final stage (paper). That's effectively what an e-book does.

On the other hand, an app adds extra bells and whistles. The book-words are still there, but there are also moving pictures, sound, interactivity. Those are still all stored digitally, though the creation and storage are more complex.

Here's a tekky bit. Look away if tekky bits make you queasy. Jump to the end of the purple part.

Converting just the book-words to the most basic digital format is extremely easy. Look, I can do it now. Take that first sentence: 'Let's start from the very beginning'. I won't do all of it, but here's how it goes:
Let -  three letters. Each is an ASCII (American Standard Code for Information Interchange) character
L = 76
e = 101
t = 116

Now we reduce these to binary 
76 = 1001100
101 = 1100101
116 = 1110100

So the first word is stored at the most basic level as 01001100 01100101 01110100 (without the spaces, but that shows you where the breaks are). Now you see why we aren't doing the whole sentence.

Anywhere in the world in any computer system that sequence will translate to 'Let'. That doesn't come with any information, such as font or colour or size, but the sequence of letters is the same. That is all your Kindle does - it converts the numbers back to letters and shows them on the screen. That's not so scary, is it? When you change the size, it's just showing the same thing differently. The 'change the size' instruction is separate from the storage of the text. So a simple e-book is very easy to create. It takes a bit of software that strips out all the crap from your Word File, or InDesign file, or whatever, and leaves pretty much just the letters, the part that can be digitised easily. It's slightly more complex than that, as there are things such as markers that tell the page of contents where to go to. But essentially it is a sequence of letters (ultimately, binary numbers) which is poured into a sort of software envelope that tells the e-book reader how to display it and what to do when you want to follow a link or turn the page. That's all there is to it. The different e-book readers use different envelopes and instructions, which is why you can't read all the different types on all the different readers.

An app is a very different kettle of fish. In an app, the text is the least of your worries. An app is essentially a computer program all on its own, whereas an e-book is not. Digitising pictures and sounds  follows the same principle as digitising text. Do you want more tekky stuff? Look away if not.

A picture on the computer is stored as a series of tiny dots, called pixels. How many pixels are displayed in a given area determines the resolution of the picture. If there are more pixels, more detail can be shown in the picture and so it is a higher resolution picture. Each pixel is a colour. The colour is defined as a combination of red, green and blue light. For the proportion of each, there is a number showing the intensity of that colour. The numbers are in the range 0-255 (there is a reason for this range, but we don't need to go there now). 

So, for each pixel, you have three numbers in the range 0-255.

Black is 000,000,000 (ie no light).
Bright red it 255,000,000 (ie all red and nothing else).
White is 255,255,255 (all colours in equal intensities).

A computer image (displayed, not for hi-res printing) typically has 72 pixels per inch. Is that number familiar? It should be if you are serious about this publishing lark. There are 72 points to an inch. Coincidence? No.

Back to the point: for each inch of image, we now have 72 sets of three numbers. The three numbers are each converted to binary. So that red pixel is represented by the sequence 01111111,00000000,00000000 - and there are 72 x 72 of these for a square inch of screen image, so you can see the info becomes very extensive very quickly. One letter is represented by just one of those numbers, remember.

(So is a picture worth a thousand words? Only if the picture is very small. I counted 90 characters in a square inch of text, so that would be 30 pixels-worth of info (three numbers per pixel, remember). A thousand words, at about six characters per word (including spaces), gives 333 pixels, or a picture about a quarter of an inch square. I'll go for the words, thanks.)

There are ways of compressing this information to make it much smaller, and the processes for compressing it are complicated. The computer, iPad, or whatever has to take the compressed picture information and restore it to full picture information - there's an extra step there that is not there with plain text.

Digitising the text, pictures and sound is the easy bit. The difficult bit is making the app work through time, with interactivity and animation. The techniques have all been around for a long time, but they take expert knowledge to do well - just as book design takes expert knowledge to do well. Animation is moving pictures - just one of those digitised pictures after another in a rapid sequence (a minimum of ten per second). Making the app do different things at different times or in response to the reader's actions takes proper computer programming. And that's where the problems start for publishers who don't have their own programmers. But we won't go into that just now.

The worst apps just present text and pictures with minimal animation or interactivity. There are apps out there (plenty of them, but I won't name names) which are no better than sort of animated stories we had on the BBC micro in the 1980s. They give digital a bad name. The good apps - Nosy Crow's Three Little Pigs, Faber's The Waste Land, Wolfram Alpha's The Elements - are brilliant marriages of interactivity, text, images and sound that deliver more than a paper book can. And they cost a fortune to develop. That's why all bets are off in the digital royalties department for a decent app, but you should get a decent (25% minimum) royalty on a straight e-book. Which point is why all this was relevant to you, as a writer. You need to know WHY a deal is good or bad.


1 comment:

  1. Thank you for this useful and entertaining summary.