Last year I turned these notes into a more-presentable e-book. You can find the results here.
Vector
- Vector formats represent images as a series of drawing instructions.
- Infinitely scalable.
- Common file type: SVG (Scalable Vector Graphics).
Raster
- Raster formats represent images as a grid of color values (pixels).
Raster File Types
- Uncompressed formats contain data for each pixel.
- Common file types: BMP, TIFF, RAW
- Compressed formats use a compression algorithm to minimize file size.
- Lossless vs. Lossy
- Lossless compression algorithms contain enough information to exactly recreate the original image.
- Common file types: PNG (Portable Network Graphics), GIF (Graphics Interchange Format)
- Lossy compression algorithms do not retain all the details of the original image.
- Common file type: JPEG (Joint Photographic Experts Group)
A family of uncompressed raster image file formats (more info).
File Type for this class: PPM (Portable PixMap)
- Pixel data is represented by RGB triplets in either ASCII or binary.
- All whitespace is equivalent.
- example file:
P3
4 3
255
255 0 0 255 0 0 255 0 0 255 0 0
0 255 0 0 255 0 0 255 0 0 255 0
0 0 255 0 0 255 0 0 255 0 0 255
- File Header
P3
: Type of PPM, 3-btye RGB, in ASCII (P6
is RGB in binary)
4 3
: Width x Height, in pixels
255
: Maximum value per color (will scale to 255 if not 255)
Color Spaces
If you want to fall down the deep hole of color, this is a good place to start