www.xbdev.net
xbdev - software development
Sunday May 19, 2024
home | contact | Support | Image File Format... Storing Graphics using Bits and Bytes.. | JPEG File Formats Squeeze more pixels per bytes...

     
 

JPEG File Formats

Squeeze more pixels per bytes...

 

Exploring, Decoding, Hacking, Breaking, Coding,.. ... the JPG File Format

by bkenwright@xbdev.net


Well everyone has come across the jpg file format! Its biggest popularity has come because of the boom in the internet, people using a 56k modem can't be downloading images of 100-500k... it would take ages! So the jpg format fixes that my compressing the the image format ... so where you would have a typical .bmp file of 200k you could expect to reduce this to a 20k .jpg file.


I've put together some pieces of code and tutorials in the hope that it will open your eyes to the internal workings of the jpg file format and its reasons. Again its an advanced topic... it involved for one thing loads of bit shifting and hex!


The tutorials/code will be broken into pieces... I'll be outlining the parts of the jpeg, then expanding on each sub-section as I go along... I'll also be putting together some hex dumps so you can actually see what each part of the file is doing! For example a hex dump of the SOS (Start Of Scan) data section contains the variable length data bits, by looking at this data closely and looking at the corresponding Huffman tables you can de-duce what is going on better I think.



Tutorials


JPEG File Format Basics

Coding a decoder - Dumping Tags

Tags - Image Dimensions, Tag Names, ...


Ideas and Hints


JPG File Layout

SOS Section in Detail

JPEG Gems - Code Snippets

JPEG Decoder Source Code (DumpJpeg)


Demo Code


Full Simplified Jpeg Encoder & Decoder Source Code Demo

'Robust' version of the Jpg Decoder/Encoder Demo

JPG Hex Viewer Javascript Browser Code


















 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.