| Preface | p. ix |
| Acknowledgments | p. xi |
| Introduction | p. 1 |
| The Representation of Images | p. 1 |
| Vector and Bitmap Graphics | p. 3 |
| Color Models | p. 5 |
| True Color versus Palette | p. 9 |
| Compression | p. 10 |
| Byte and Bit Ordering | p. 13 |
| Color Quantization | p. 16 |
| A Common Image Format | p. 18 |
| Conclusion | p. 21 |
| Windows BMP | p. 23 |
| Data Ordering | p. 23 |
| File Structure | p. 24 |
| Compression | p. 28 |
| Conclusion | p. 29 |
| XBM | p. 31 |
| File Format | p. 31 |
| Reading and Writing XBM Files | p. 33 |
| Conclusion | p. 34 |
| Introduction to JPEG | p. 35 |
| JPEG Compression Modes | p. 36 |
| What Part of JPEG Will Be Covered in This Book? | p. 39 |
| What are JPEG Files? | p. 40 |
| SPIFF File Format | p. 40 |
| Byte Ordering | p. 41 |
| Sampling Frequency | p. 41 |
| JPEG Operation | p. 44 |
| Interleaved and Noninterleaved Scans | p. 45 |
| Conclusion | p. 46 |
| JPEG File Format | p. 47 |
| Markers | p. 47 |
| Compressed Data | p. 49 |
| Marker Types | p. 49 |
| JFIF Format | p. 55 |
| Conclusion | p. 57 |
| JPEG Human Coding | p. 61 |
| Usage Frequencies | p. 61 |
| Huffman Coding Example | p. 63 |
| Huffman Coding Using Code Lengths | p. 65 |
| Huffman Coding in JPEG | p. 71 |
| Limiting Code Lengths | p. 72 |
| Decoding Huffman Codes | p. 73 |
| Conclusion | p. 75 |
| The Discrete Cosine Transform | p. 77 |
| DCT in One Dimension | p. 78 |
| DCT in Two Dimensions | p. 84 |
| Basic Matrix Operations | p. 85 |
| Using the 2-D Forward DCT | p. 87 |
| Quantization | p. 88 |
| Zigzag Ordering | p. 89 |
| Conclusion | p. 90 |
| Decoding Sequential-Mode JPEG Images | p. 91 |
| MCU Dimensions | p. 91 |
| Decoding Data Units | p. 94 |
| Decoding Example | p. 97 |
| Processing DCT Coefficients | p. 98 |
| Up-Sampling | p. 99 |
| Restart Marker Processing | p. 99 |
| Overview of JPEG Decoding | p. 100 |
| Conclusion | p. 100 |
| Creating Sequential JPEG Files | p. 105 |
| Compression Parameters | p. 105 |
| Output File Structure | p. 111 |
| Doing the Encoding | p. 111 |
| Down-Sampling | p. 112 |
| Interleaving | p. 113 |
| Data Unit Encoding | p. 115 |
| Huffman Table Generation | p. 117 |
| Conclusion | p. 119 |
| Optimizing the DCT | p. 121 |
| Factoring the DCT Matrix | p. 121 |
| Scaled Integer Arithmetic | p. 137 |
| Merging Quantization and the DCT | p. 138 |
| Conclusion | p. 148 |
| Progressive JPEG | p. 149 |
| Component Division in Progressive JPEG | p. 149 |
| Processing Progressive JPEG Files | p. 151 |
| Processing Progressive Scans | p. 152 |
| MCUs in Progressive Scans | p. 153 |
| Huffman Tables in Progressive Scans | p. 153 |
| Data Unit Decoding | p. 154 |
| Preparing to Create Progressive JPEG Files | p. 160 |
| Encoding Progressive Scans | p. 162 |
| Huffman Coding | p. 162 |
| Data Unit Encoding | p. 162 |
| Conclusion | p. 169 |
| GIF | p. 171 |
| Byte Ordering | p. 172 |
| File Structure | p. 172 |
| Interlacing | p. 178 |
| Compressed Data Format | p. 178 |
| Animated GIF | p. 186 |
| Legal Problems | p. 187 |
| Uncompressed GIF | p. 188 |
| Conclusion | p. 188 |
| PNG | p. 189 |
| History | p. 190 |
| Byte Ordering | p. 190 |
| File Format | p. 190 |
| File Organization | p. 195 |
| Color Representation in PNG | p. 195 |
| Device-Independent Color | p. 197 |
| Gamma | p. 201 |
| Interlacing | p. 202 |
| Critical Chunks | p. 203 |
| Noncritical Chunks | p. 206 |
| Conclusion | p. 212 |
| Decompressing PNG Image Data | p. 215 |
| Decompressing the Image Data | p. 215 |
| Huffman Coding in Deflate | p. 221 |
| Compressed Data Format | p. 222 |
| Compressed Data Blocks | p. 223 |
| Writing the Decompressed Data to the Image | p. 227 |
| Conclusion | p. 231 |
| Creating PNG Files | p. 233 |
| Overview | p. 233 |
| Deflate Compression Process | p. 234 |
| Huffman Table Generation | p. 238 |
| Filtering | p. 241 |
| Conclusion | p. 243 |
| Glossary | p. 245 |
| Bibliography | p. 249 |
| Index | p. 253 |
| Table of Contents provided by Syndetics. All Rights Reserved. |