S.B.C.C. ->
Computer Science -> Courses
-> COMSC 111 -> Class
Notes
Image Formats
Preliminaries
- How do images get into files?
- How does compression work?
- Are image files kept in HTML pages?
- Palettes? Color Depth
GIF
What are GIFs component parts: Blocks and Extensions. Blocks are the
most important. The following is a typical file structure:
- Header
- Logical Screen Descriptor Block
- Graphics Blocks
- Local Color Table
- Image or Text
- Trailer Blocks
JPEG
Similar block structure to GIF but with emphasis on compression. Process
to produce a JPEG file:
- Transform the image into a suitable color space.
- (Optional) Downsample each component by averaging together groups of
pixels.
- Group the pixel values for each component into 8x8 blocks.
- Convert to frequency space and quantize.
- Package it up.
PNG
Internet Media Type? (image/png)
- Signature (\211 P N G \r \n \032 \n)
- Chuncks
- Length
- Chunk Type
- Chunk Data
- CRC
Last Updated: February 19, 1998
Author: Dean Nevins <dn@picard.sbcc.cc.ca.us>