;
0 index
1 Image Format Summary
2 Image Questions
3 More Image Questions
4 GIF Images
5 GIF Bit Depth
6 GIFS and Transparency
7 GIF Animation
8 GIF Compression
9 GIF Strengths
10 GIF Weaknesses
11 The JPEG (JPG) scheme
12 JPG Background
13 JPG Bit Depth
14 JPG Compression Algorithm
15 JPG compression pt 1 - YCbCr
16 JPG compression pt 2 - DCT
17 JPG compression pt 3 - Quantization
18 JPG compression pt 4 - Huffman Encoding
19 JPG Strengths
20 JPG Weaknesses
21 PNG (Portable Network Graphics)
22 PNG characteristics
23 PNG Compression Algorithm
24 PNG Strengths
25 PNG Weaknesses
26 Native Formats
27 Native Format Strengths
28 NativeFormat Weaknesses

outline
created using slideshow.cgi by Andy Harris















Image File Formats

1. Image Format Summary



































Image File Formats

2. Image Questions

  • Does a grayscale GIF image take up less space than a color image?
  • How about a black and white (2 colors only) image?
  • Does storing an image in JPG or PNG change the answer to this question?
  • Can an animated gif have more than 256 colors?
  • Can an animated gif have more than one transparent color?


































Image File Formats

3. More Image Questions

  • Can PNG handle animations?
  • Why is JPG sometimes called JFIF?
  • How does the variable compression of a JPG work?
  • Which is the best format for an image with text?


































Image File Formats

4. GIF Images

  • Graphic Interchange Format
  • Standard format
  • One of oldest formats
  • flexible and well-known
  • falling from favor


































Image File Formats

5. GIF Bit Depth

  • 256 element palette of 24-bit colors
  • Only 256 colors in image, but each is defined in 24 bits
  • 8 bits per pixel, which refer to color numbers
  • 'paint by number' approach
  • Non-registered colors are dithered


































Image File Formats

6. GIFS and Transparency

  • One color can be stored as transparent
  • Replaced with background on rendering
  • no true alpha


































Image File Formats

7. GIF Animation

  • Multi-frame images are animated
  • Each frame can have an independant palette
  • Control blocks determine time between frames
  • Automated in The Gimp, Gif Construction Set
  • Animation can be optimized (store only changes in frames)


































Image File Formats

8. GIF Compression

  • LZW (Limpel-Ziv-Welch) Compression
  • Based on RLE (Run-Length Encoding)
  • Patent owned by Unisys
  • Unisys requires a licensing fee for any software using the LZW codec
  • lossless compression


































Image File Formats

9. GIF Strengths

  • solid color images
  • Images with irregular boundaries
  • Images needing transparency
  • animation


































Image File Formats

10. GIF Weaknesses

  • limited color depth
  • no true alpha
  • animated images can be quite large
  • legal questions regarding LZW


































Image File Formats

11. The JPEG (JPG) scheme

  • Joint Photographic Experts Group
  • Useful for photos
  • No transparency
  • Loses data


































Image File Formats

12. JPG Background

  • Not a file format at all
  • Compression algorithm
  • Used by Tiff 6.0, Mac Pict
  • Version usually called JPG is actually JFIF
  • (JPEG File InterChange Format)
  • placed in public domain by C-Cube Microsystems


































Image File Formats

13. JPG Bit Depth

  • 24 bit true color
  • 8 bits each Red, Green, Blue
  • No Alpha, No Transparency
  • No animation or multiple images


































Image File Formats

14. JPG Compression Algorithm

  • Lossy Compression
  • Variable Compression Rate
  • Use psychological tricks to emphasise important visual information
  • Drop less important info
  • "perceptually faithful"


































Image File Formats

15. JPG compression pt 1 - YCbCr

  • Convert to YCbCr color scheme
  • Y = brightness
  • Cb = blue chrominance
  • Cr = red chrominance
  • Human eye responds more to brightness than anything else
  • Chrominance values are downsampled (1 value for each 2x2 block)
  • Results in 50% of savings in file size


































Image File Formats

16. JPG compression pt 2 - DCT

  • Discrete Cosine Transform
  • Human eye is more sensitive to gradual changes in brightness than sudden ones
  • DCT throws out less important data
  • Groups image into 8x8 blocks


































Image File Formats

17. JPG compression pt 3 - Quantization

  • Quantization
  • divides each 8x8 block by a Q factor
  • This is where variable compression rate occurs
  • Quantization is where most visible information loss occurs


































Image File Formats

18. JPG compression pt 4 - Huffman Encoding

  • Applies another encoding scheme (Huffman run-length encoding
  • Provides one more level of compression


































Image File Formats

19. JPG Strengths

  • Completely free algorithm
  • Excellent compression
  • High color depth
  • Works well with photographic data
  • Variable compression to meet exact needs
  • Visual loss of detail can be unnoticable


































Image File Formats

20. JPG Weaknesses

  • No alpha or transparency
  • Some image loss inevitable
  • No support for animation
  • Does not handle sharp edges well
  • Text reproduces very badly
  • Generates recognizable artifacts
  • Repeated storage can degrade quality


































Image File Formats

21. PNG (Portable Network Graphics)

  • Devised as a replacement for GIF
  • Free and unencumbered algorithm (no LZW)
  • Can use 24 bit or color table to save space
  • Improvement over GIF design


































Image File Formats

22. PNG characteristics

  • True Alpha support
  • No animation support
  • Color Depth
  • TrueColor
  • Full 8-bit Alpha channel
  • 32-bit color


































Image File Formats

23. PNG Compression Algorithm

  • Lossless algorithm
  • Works well with solid colors (like GIF)
  • No problems with proprietary algorithm


































Image File Formats

24. PNG Strengths

  • Good replacement for GIF
  • Better color scheme than GIF
  • Few legal problems
  • Best support for transparency


































Image File Formats

25. PNG Weaknesses

  • No animation (although a version called MBG is in the works)
  • Support is increasing but not completely universal
  • Cannot compress some images as well as lossy algorithms (JPG)


































Image File Formats

26. Native Formats

  • General Description
  • File formats native to image editors
  • XCF for Gimp
  • PSD for Photoshop


































Image File Formats

27. Native Format Strengths

  • Contain complete image data
  • Include layers
  • Include channel and path data
  • Easiest for revising image
  • No image loss


































Image File Formats

28. NativeFormat Weaknesses

  • Very large files
  • Not supported by browsers
  • Ancillary information (layers, channels, paths) not needed by user


































outline

Image Format Summary

Image Questions

More Image Questions

GIF Images

GIF Bit Depth

GIFS and Transparency

GIF Animation

GIF Compression

GIF Strengths

GIF Weaknesses

The JPEG (JPG) scheme

JPG Background

JPG Bit Depth

JPG Compression Algorithm

JPG compression pt 1 - YCbCr

JPG compression pt 2 - DCT

JPG compression pt 3 - Quantization

JPG compression pt 4 - Huffman Encoding

JPG Strengths

JPG Weaknesses

PNG (Portable Network Graphics)

PNG characteristics

PNG Compression Algorithm

PNG Strengths

PNG Weaknesses

Native Formats

Native Format Strengths

NativeFormat Weaknesses