Beechlog‎ > ‎

February 2002

The on-line magazine of the Burnham Beeches Radio Club.

February 2002 Edition


Welcome to the February BeechLog.
Steganography, Something to do with dinosaurs?
Jpegs, How do they work, and why.
New radio, Will she notice?
Letter to the editor.
This months Useful Links.

Welcome to the February edition.

Yes, I even have managed to get this issue out in the right month! However it would be useful to get some input from you folk. My radio is generally limited to two metre FM mobile at the moment, so I don't have a lot to report.

As many of you know, I was made redundant at the end of October. A 'friendly' takeover meant that the company slimmed down somewhat. The new company decided that it didn't need any technical staff any more, so I was out. To be honest, there is one chap left, who took over the role of about nine others!

Do during November and December I had plenty of time to work the DX on six and HF, but somehow I didn't manage anything at all! Besides it was freezing cold or raining, so I didn't feel much like messing with aerials. But I did get a new job, it's in Woking, nothing to do with videoconferencing, and if anything it's even more specialised. There is quite a large RF element to the new job, as I sit in front of spectrum analysers and sig gens all day.

So it's possible I might get more interested in radio! After all, I can now check out my spurious emmissions and so on. Any maybe I'll build that auto- ATU I've been meaning to for the last year. I might be able to fit it in the shack, if I move some other stuff out of the way.

Picture of my shack

So for those who have never visited, here's a picture of my 'shack' in it's entirity. No prizes for spotting the deliberate error. I have reduced this to one-eighth full size, to fit in BeechLog, and to hide the cobwebs (you can still see them!).

Roger G0HZK, Editor

      Top of page Index Links


Recently I was looking on the net for some info on something or other, when I came across an old news article. It described how Osama bin Laden was beleived to be using steganograthy in his communications amongst the members of his terrorist network. To me it sounded like a technique used by the makers of Walking with Dinosaurs, but in reality it is the technique of hiding information inside something which is otherwise innocuous.

The idea probably goes back centuries, and indeed the wooden horse of Troy, which hid soldiers inside, is an early example. During WWII, examples crop up, where information was smuggled out of PoW camps. Broadcasts by the BBC also contained hidden messages, for example the personal messages which contained phrases with secret meanings.

Today, with all this technology about, there are numerous ways of hiding messages. Any type of computer file can contain hidden information, without anyone realising this. Many types of file are ideal, for example picture and sound files, which can play back normally without any signs of what is within. As an example, here are two pictures side by side. One is the original, and the other contains a hidden text file.

original Hidden file

There are many ways of hiding files. They can be simply embedded between non-picture flags, or encoded more subtly. Picture files can contain all sorts of info, the jpegs here can contain thumbnail pictures, technical details like the exif information written by digital cameras, copyright messages, etc. Most of these are easily detected, however. The subtle way uses a program to modify slightly the colour of some the pixels in the picture. A key phrase is used to seed a pseudo-random sequence which decided which pixels are changed. It is impossible to detect these changes with the human eye, and since an interceptor cannot know which pixels have been modified, or whether the picture contains secret data, this technique is very secure.

Similarly with music files. They will still play back and the very slight changes in wavform shapes are undetectable, especially where the original file is not available.

Any of these files can be posted on an innocuous web site, say a Geocities site. Unlike encypted email, there is nothing to suggest that something is being hidden.

There is plently of software available to try these techniques. See the links section of BeechLog for some of it.

      Top of page Index Links

The world of Jpeg files

I mentioned Jpeg files elsewhere in this issue. These files are used widely on the internet, as they are designed to reduce greatly the size of photographic images, while having a minimal effect on the viewed image. As such they are also used widely in digital cameras, where it is impractical to store very many uncompressed images due to their size. For example, my camera will save uncompressed TIF files, which are about 10 megs in size. After saving as a jpeg, the size varies depending on the subject matter, an average detailed photo will reduce to about a twentieth of the original size while looking just as good to the human eye.

Example pictures

The left image above is a section of a 2048 x 1536 pixel TIF image, magnified by 200%. The right image is from the same original, but compressed to 2% of the initial 9.5 meg size. You can hopefully see the degradation of the resistor values, and the white silk-screen lettering.

The technique used to reduce the size is similar to methods used for encoding moving pictures. It is quite complex, and has many optional processes, but goes something like this:

Firstly divide the picture into chrominance and luminance information, for example the YUV method. The Y part represents the luminance, i.e. the brightness of the picture, and appears as a black and white image. This is unchanged. The U and V parts represent the full range of colours. The human eye is less sensitive to detail in colour - the cells in the eye that respond to colour are larger than those which respond to luminosity. So both the U and V can be resampled. Two horizontally adjacent pixels are usually reduced to one, and optionally two vertically adjacent pixels may also be combined. Using both horizontal and vertical resampling, the whole picture is reduced to two thirds its original size. I might add that resampling is optional, and some jpegs leave the colour information unchanged.

The next stage is to apply the DCT (discrete cosine transform) to each of the Y, U and V data. This is a relative of the Fourier Transform. It takes small blocks of pixels, typically 8x8, and calculates the average value of each block, plus values representing data for successive higher frequency corrections. So you end up with a list of 64 values for each block, the most significant (and larger) values at one end, and the least at the other.

Depending on the amount of compression, those values of least significance are discarded: a 'quantization coefficient' is divided into each value, and the result rounded to a whole number. Thus the larger these coefficients are, the more values are reduced to zero, thus increasing compression. Thus this is where most of the size-reduction occurs. Different coefficients are applied to each value in the block - and different algorithms use different tables of coefficients. Different tables are applied to the Y and the U and V transforms. Thus the jpeg images produced by different software packages vary from one to another.

Click here to see a simple diagram of how it is done (in a new window).

The remaining data is now coded, usually using Huffman coding - as this method does not attract licence fees! No data is lost by this part of the process.

Finally the headers, quantization coefficient tables, Huffman coding tables, etc., are added to the remaing data, and you now have a jpeg file.

There have been new versions of jpeg proposed, in order to provide improved pictures and more facilities. One extension is variable quantization, which allows the use of different quantization tables in different parts of the picture. Another allows the picture to be divided into larger blocks, all of which can contain the image at different resolutions, compressions, colour forms,etc. This also breaks the current limitation that restricts an image size to 65536 pixels per side.

Another extension allows the storing of the image at multiple resolutions. Each succesive image is described as changes from the previous one, which keeps the file size down. A similar system is already in use by Kodak, although licences and fees are required in this case.

Jpeg is very good for complex pictures like photographs, but no good for simple images like the title of BeechLog. Jpeg coding falls over where there are large areas that are the same colour. For the title I have used PNG-8 which is much more efficient . I could have used GIF, but that attracts licence fees to Unisys due to the patented LZW coding method (The US patent runs out in 2003). Both these formats use 8-bit colour palettes against jpegs RGB 24-bit colour, and produce poor compression of photographs. (Note that there is also a PNG-24 format, which preserves the RGB 24-bit colour, and provides lossless compression with larger file sizes).

One of the problems with jpeg files occurs if you decide to edit them. The file has to be decompressed for display by your graphics application, and compressed again after you have finished manipulating it. This can lead to degradation, especially if your program saves at a different compression ratio than the original was created with.

Some actions can be carried out without decompression. Things like rotating an image through 90 degrees to correct the way you held your camera, flipping the image, mirroring it, or converting to display progressively. Since the jpeg image data is effectively held in tables, these can be easily rearranged. Most graphics software cannot do this however (because it has to decode the picture to display it), but there is a useful command line tool to do this (available for many operating systems). Search for jpeg6b - or see the links section.

DOS window
This set of programs contains jpegtran which is the tool we need. It can carry out all the transformations I mentioned above, and many more, without decompressing or degrading the image. I am writing a Windows front end for this, if it's ready, you can click on this image.


In my ramblings on steganography, I mentioned that jpeg files can hold all sorts of information like thumbnails, picture information. etc. Jpegtran can also remove all these, if required. Images from cameras often contain this sort of stuff, which bloats the file size.

I mentioned cameras, which are an interesting example of technologies not keeping up with each other. To get the best results, you might aim for a camera with the largest ccd size. But the issue here is file size, especially if you want uncompressed images for making large prints. You can calculate the files sizes like:

horizontal pixels x vertical pixels x 3

So a 640x480 image would be almost a meg in size. My 2048x1536 images are about 9.5 megs in size. The 2560x1920 images from 5 megapixel cameras are about 15 megs.

There are two issues with these files, the time it takes the camera to write them, and the space taken to store them. Usually cameras have some sort of flash memory card, there are many types. My camera came with a 16 meg card, which can store only one uncompressed image! My 64 meg card can store 8 images. I would need a 384 meg card to hold 36 images!

Sandisk has just announced a 1 gig Compact Flash card, but with a huge price tag. IBM make CF hard drives, these may be more cost effective, but are a heavier drain on camera batteries. Of course you can transfer the images to a PC. But if you are on holiday, you won't want to carry a PC around with you (OK for business trips though). There are a few devics appearing now which contain a hard drive, a USB port, and a card slot. These are also extemely expensive.

For most people, saving their pictures as jpegs are the only solution. My 9.5 meg images are reduced to about 1.2 megs with the least compression, and about 350k with the most.

matrix of images

Above you can see how far you can compress without noticing much difference. The original TIF file is 9.5 MByte, size 2048 x 1536.

1. A section of the original 9,500k file.
2. Compressed to 260k, 2.7% of the original size.
3. Compressed to 200k, 2.1% of the original.
4. Compressed to 87k, 0.9% of the original.

See how well the perceived quality survives (It took me ages to make this composite picture, each image is a 290x290 pixel section of a 2048x1536 pixel original).

As you can see from the composite image above, comparing all these side by side reveals little difference, apart from the extreme example in image 4. Seen without the uncompressed file, you would not notice the degradation.

Flash cards are getting cheaper, but they ought to cost less in the high street. There is a dealer in Guernsey whose prices are a quarter of those in Dixons. At the moment there just isn't any alternative technology, although there are some new type 1 Compact Flash hard drives in the pipeline (the IBM drives are type 2 and too thick for my camera). With camera CCD sizes getting bigger, there is going to be a need for cheaper high capacity storage. Until then, jpeg reigns.

      Top of page Index Links

What's this new radio?

Colin brought this new radio along to the club in February, just the job to brighten up the winter gloom.

Colin Nice new Kenwwod, it's all mine!

Club picture 1

Hmm, just the job. Will the power go down to 10 watts?

Club picture 2

Trouble is, what will Eileen say?

      Top of page Index Links

Letter to the editor

I was sorry to hear about your extended period out of work In the last Beechlog and the problems you encountered. Likewise I am happy to hear that something has apparently appeared on the horizon to cheer you up. You have explained quite succinctly a situation which is frankly a nightmare to haunt almost all of us either in late 40s or 50s and it seems to be part of a mid life crisis that many people particularly men, today have to face up to, and its not clever.

I have recently finished reading a set of books entitled "Conversations with God " by Neale Donald Walsch and these have been helpful to me ( If you can come to an understanding that all experiences in life are sent to fulfill you as an individual, then you perhaps can make sense of this. We all have similar choices to make such as those outlined in the article, and perhaps there is a downside to them all, but we all end up as a fuller individual capable of saying to ourselves later on that we have been through he expereince and are wiser and better for it. I would submit that whatever choice you would have made would not be either "wrong" or "right" but simply what you thought was the best one you could have made for yourself at that time given your particular set of circumstances. What is more every day we all make similar choices, and these add up at the end of our lives to a portrait of the kind of individual that we happen to be. Remember there is always someone worse off than you are, but maybe their life experience is also sent to them to help them become better.

So keep on keeping on, don't get stressed about it, and enjoy the best of your life whilst you have it to enjoy!

Cheers John G0GCL

      Top of page Index Links

Useful links

Here are some links pertaining to the articles above.

Here you can find a program which allows you to hide data in an otherwise playable mp3 file. It was written by Fabian Petitcolas at Cambridge University. The site also contains some general info on steganography. ttp://

Another free program, this one embeds hidden data in bitmap files.

This application does the same, but with jpeg files.

Here is a list of stego applications for all manner of computers.

The Independent JPEG Group software can be found here; there are many sites containing this software, and here are two: The current jpeg6b suite , and an earlier version, jpeg6a. These two differ only in the latter version which is able to read and write GIF files - this being withdrawn due to the patent issues.

A general FAQ on JPEG files:

Irfanview, Irfan Skiljan's free image software for Windows, which can also perform lossless transformations.

Infamous GB50 web site.

The RSGB web site.

      Top of page Index Links

Copyright and Technical Stuff.

This issue is Copyright Burnham Beeches Radio Club 2002.

Any opinions inside this issue of BeechLog are those of the authors, and must not be assumed to be also of the BBRC.

BeechLog is written in XHTML version 1.0 and contains a few differences from the last issues. However different browsers handle XMTML and the associated style sheets in different ways, so there is the possibility that you may not see BeechLog as I intended! If there is anything that seems amiss, please let me know: Roger G0HZK, Editor