Blowing Shannon’s JPEG

‘…Once more unto the halftone breach my friend’s once more…’as Shakespeare would have written – well at least in my mind.   I have found an interesting side effect of this – it blows Shannon’s Entropy totally off course.   Now I am no information scientist so what I am about to write might not be exactly correct but Shannon’s Entropy is a formula upon which JPEG reductions are based.  How it works is that the software looks at each individual pixel and asks a simple question – is the colour data different from the previous pixel?   If the answer to this is no then the software records no data for that pixel.  If the answer is yes then it asks by how much.   If the answer doesn’t reach above a certain threshold then it doesn’t then no information is recorded.   This way files are reduced in size and still retain all the data needed for the human brain to understand what it is viewing.

So these two images demonstrate just how this works.    The first one has significant areas that are just one colour so the JPEG software doesn’t record any data for this and when the file is decoded the software just populates the pixels with the same colour value.   The second image is even simpler, having only three colours, white, black and grey and so should be an even smaller file but unfortunately it isn’t because as the software examines each pixel it comes across significant changes – the halftone dots – and so has to record more data – the JPEG file is 40% larger than the first one.   I’m not really sure why that interests me but it does.



About Guthlac

An artist, historian and middle aged man who'se aim in life is to try and enjoy as much of it as he can
This entry was posted in Apple Pencil, Art, Graphic Art, Halftone and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.