CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Images (GIF)
Red Green Blue (RGB)
R G B
R G B
R G B
R G B
R G B
R G B
Camera
Display
Colour conversions
RGB
(Red, Green,
Blue)
CMYK
(Cyan,
Magenta,
Yellow, Key)
YUV
(Luminosity,
Blueness,
Redness)
Name (R,G,B) Hex (C,M,Y,K)
Black (0,0,0) #000000 (0,0,0,1)
White (255,255,255) #FFFFFF (0,0,0,0)
Red (255,0,0) #FF0000 (0,1,1,0)
Green (0,255,0) #00FF00 (1,0,1,0)
Blue (0,0,255) #0000FF (1,1,0,0)
Yellow (255,255,0) #FFFF00 (0,0,1,0)
Cyan (0,255,255) #00FFFF (1,0,0,0)
Magenta (255,0,255) #FF00FF (0,1,0,0)
Y=0 Y=0.5 Y=1
U
V
Y and RGB
• Link
• In the images, the
lighter the colour
intensity (Red, Green,
Blue), the more the
contribution it has.
Colour Image Capture and Conversion
R G B
R G B
R G B
Camera
RBG RBG RBG RBG
RBG RBG RBG RBG
RBG RBG RBG RBG
RBG RBG RBG RBG
BMP Image
(Raw)
JPEG
JPEG Image
(DCT
Conversion)
GIF GIF Image
(LZW)
10101010 10101010 10101010
24-bit colour
Camera
sensors
Graphics Elements
Key elements of an image are:
• The picture resolution. This is defined by the number of pixels in the
x- and y-directions.
• The number of colors per pixel. If N bits are used for the bit color
then the total number of displayable colors will be 2N. For example,
an 8-bit color field defines 256 colors, a 24-bit color field gives 224 or
16.7M colors. Most computer systems allow for 32-bit color, which
gives over 4 billion colors.
• Palette size. Some systems reduce the number of bits used to display
a color by reducing the number of displayable colors for a given
palette size.
Image Resolution
RBG RBG RBG RBG
RBG RBG RBG RBG
RBG RBG RBG RBG
RBG RBG RBG RBG
BMP Image
(Raw)
Image resolution (X × Y)
x pixels
y pixels
Bytes used = (Bytes per
colour × X × Y
Graphics Formats
File Compression
type
Max. resolution
or colors
TIFF Huffman RLE
and/or LZW
48-bit color TIFF (tagged image file format) is typically used to
transfer graphics from one computer system to
another. It allows high resolutions and colors of up to
48 bits (16 bits for red, green and blue).
PCX RLE 6553665 536
(24-bit color)
Graphics file format which uses RLE to compress the
image. Unfortunately, it make no provision for
storing gray scale or color-correcting tables.
GIF LZW 6553665 536
(24-bit color, but
only 256
displayable
colors)
Standardized graphics file format which can be read
by most graphics packages. It has similar graphics
characteristics to PCX files and allows multiple
images in a single file and interlaced graphics.
JPG JPEG
compression
(DCT,
Quantization
and Huffman)
Depends on the
compression
Excellent compression technique which produces
lossy compression. It normally results in much
greater compression than the methods outlined above.
Graphics file magic numbers
Description Extension Magic Number
Adobe Illustrator .ai 25 50 44 46 [%PDF]
Bitmap graphic .bmp 42 4D [BM]
JPEG graphic file .jpg FFD8
JPEG 2000 file .jp2 0000000C6A5020200D0A [....jP..]
GIF graphic file .gif 47 49 46 38 [GIF89]
TIF graphic file .tif 49 49 [II]
PNG graphic file .png 89 50 4E 47 .PNG
Photoshop Graphics .psd 38 42 50 53 [8BPS]
Windows Meta File .wmf D7 CD C6 9A
PDF Document .pdf 25 50 44 46 [%PDF]
Link
[00000000] 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 .PNG........IHDR
[00000016] 00 00 00 F3 00 00 00 C3 08 06 00 00 00 57 8C 27 .............W.'
Sample Compression Rates
Type Size(B) Compression(%)
BMP 308278 100.0 BMP, RBG encoded (640480, 256 colors)
BMP 301584 97.8 BMP, RLE encoded
PCX 274050 88.9 PCX, Version 5
GIF 124304 40.3 GIF, Version 89a, non-interlaced
GIF 127849 41.5 GIF, Version 89a, interlaced
TIF 136276 44.2 TIF, LZW compressed
TIF 81106 26.3 TIF, CCITT Group 3, MONOCHROME
JPG 28271 9.2 JPEG - JFIF Complaint (Standard coding)
JPG 26511 8.6 JPEG - JFIF Complaint (Progressive coding)
Compression with highly redundant
information
Type Size (B) Compression (%)
BMP 750054 100.0 BMP, RBG encoded (500500, 16.7M colors)
BMP 7832 1.0 BMP, RLE encoded (256 colors)
PCX 31983 4.3 PCX, Version 5 (256 colors)
GIF 4585 0.6 GIF, Version 89a, non-interlaced (256 colors)
TIF 26072 3.5 TIF, LZW compressed (16.7M colors)
JPG 15800 2.1 JPEG (Standard coding, 16.7M colors)
JPG 12600 1.7 JPEG (Progressive coding 16.7M colors)
GIF Colour Table
GIF uses a colour table
of 256 24-bit colours
(768 bytes near start of
file)
1
256
RGB
RGB
GIF File Format
• Link
• Link
[00000000] 47 49 46 38 39 61 64 00 55 00 E6 00 00 FF FF FF GIF89ad.U.......
[00000016] F7 F7 F6 F1 F4 F2 EE EE EF E7 E7 E7 E1 E4 E6 DF ................
[00000032] DE DF D7 DA DD EF CE CE D5 D5 D5 D5 D3 D0 D9 D1 ................
Type: GIF (47,49,46)
Version: 89a (38,39,61)
Width: 100 (64,00)
Height: 85 (55,00)
Packed: E6 (E6)
Color Index: 00 (00)
Aspect: 00 (00)
First colour in colour
table (FF FF FF – White)
LZW Compression
R G B R
R B G R
R G B B
G G R R
LZW Table
Entry Colour
0 Red
1 Blue
2 Green
3 Black
4 Red, Green
5 Green, Blue
6 Blue, Red
7 Red, Red
8 Red, Blue
9 Blue, Green
10 Green, Red
11 Red, Red, Green
12 Green, Blue, Blue
13 Blue, Green, Green
14 Green, Red, Red
CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Images (GIF)

Images (GIF)

  • 1.
    CSN08704 Data, Audio, Videoand Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan Images (GIF)
  • 2.
    Red Green Blue(RGB) R G B R G B R G B R G B R G B R G B Camera Display
  • 3.
    Colour conversions RGB (Red, Green, Blue) CMYK (Cyan, Magenta, Yellow,Key) YUV (Luminosity, Blueness, Redness) Name (R,G,B) Hex (C,M,Y,K) Black (0,0,0) #000000 (0,0,0,1) White (255,255,255) #FFFFFF (0,0,0,0) Red (255,0,0) #FF0000 (0,1,1,0) Green (0,255,0) #00FF00 (1,0,1,0) Blue (0,0,255) #0000FF (1,1,0,0) Yellow (255,255,0) #FFFF00 (0,0,1,0) Cyan (0,255,255) #00FFFF (1,0,0,0) Magenta (255,0,255) #FF00FF (0,1,0,0) Y=0 Y=0.5 Y=1 U V
  • 4.
    Y and RGB •Link • In the images, the lighter the colour intensity (Red, Green, Blue), the more the contribution it has.
  • 5.
    Colour Image Captureand Conversion R G B R G B R G B Camera RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG BMP Image (Raw) JPEG JPEG Image (DCT Conversion) GIF GIF Image (LZW) 10101010 10101010 10101010 24-bit colour Camera sensors
  • 6.
    Graphics Elements Key elementsof an image are: • The picture resolution. This is defined by the number of pixels in the x- and y-directions. • The number of colors per pixel. If N bits are used for the bit color then the total number of displayable colors will be 2N. For example, an 8-bit color field defines 256 colors, a 24-bit color field gives 224 or 16.7M colors. Most computer systems allow for 32-bit color, which gives over 4 billion colors. • Palette size. Some systems reduce the number of bits used to display a color by reducing the number of displayable colors for a given palette size.
  • 7.
    Image Resolution RBG RBGRBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG RBG BMP Image (Raw) Image resolution (X × Y) x pixels y pixels Bytes used = (Bytes per colour × X × Y
  • 8.
    Graphics Formats File Compression type Max.resolution or colors TIFF Huffman RLE and/or LZW 48-bit color TIFF (tagged image file format) is typically used to transfer graphics from one computer system to another. It allows high resolutions and colors of up to 48 bits (16 bits for red, green and blue). PCX RLE 6553665 536 (24-bit color) Graphics file format which uses RLE to compress the image. Unfortunately, it make no provision for storing gray scale or color-correcting tables. GIF LZW 6553665 536 (24-bit color, but only 256 displayable colors) Standardized graphics file format which can be read by most graphics packages. It has similar graphics characteristics to PCX files and allows multiple images in a single file and interlaced graphics. JPG JPEG compression (DCT, Quantization and Huffman) Depends on the compression Excellent compression technique which produces lossy compression. It normally results in much greater compression than the methods outlined above.
  • 9.
    Graphics file magicnumbers Description Extension Magic Number Adobe Illustrator .ai 25 50 44 46 [%PDF] Bitmap graphic .bmp 42 4D [BM] JPEG graphic file .jpg FFD8 JPEG 2000 file .jp2 0000000C6A5020200D0A [....jP..] GIF graphic file .gif 47 49 46 38 [GIF89] TIF graphic file .tif 49 49 [II] PNG graphic file .png 89 50 4E 47 .PNG Photoshop Graphics .psd 38 42 50 53 [8BPS] Windows Meta File .wmf D7 CD C6 9A PDF Document .pdf 25 50 44 46 [%PDF] Link [00000000] 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 .PNG........IHDR [00000016] 00 00 00 F3 00 00 00 C3 08 06 00 00 00 57 8C 27 .............W.'
  • 10.
    Sample Compression Rates TypeSize(B) Compression(%) BMP 308278 100.0 BMP, RBG encoded (640480, 256 colors) BMP 301584 97.8 BMP, RLE encoded PCX 274050 88.9 PCX, Version 5 GIF 124304 40.3 GIF, Version 89a, non-interlaced GIF 127849 41.5 GIF, Version 89a, interlaced TIF 136276 44.2 TIF, LZW compressed TIF 81106 26.3 TIF, CCITT Group 3, MONOCHROME JPG 28271 9.2 JPEG - JFIF Complaint (Standard coding) JPG 26511 8.6 JPEG - JFIF Complaint (Progressive coding)
  • 11.
    Compression with highlyredundant information Type Size (B) Compression (%) BMP 750054 100.0 BMP, RBG encoded (500500, 16.7M colors) BMP 7832 1.0 BMP, RLE encoded (256 colors) PCX 31983 4.3 PCX, Version 5 (256 colors) GIF 4585 0.6 GIF, Version 89a, non-interlaced (256 colors) TIF 26072 3.5 TIF, LZW compressed (16.7M colors) JPG 15800 2.1 JPEG (Standard coding, 16.7M colors) JPG 12600 1.7 JPEG (Progressive coding 16.7M colors)
  • 12.
    GIF Colour Table GIFuses a colour table of 256 24-bit colours (768 bytes near start of file) 1 256 RGB RGB
  • 13.
    GIF File Format •Link • Link [00000000] 47 49 46 38 39 61 64 00 55 00 E6 00 00 FF FF FF GIF89ad.U....... [00000016] F7 F7 F6 F1 F4 F2 EE EE EF E7 E7 E7 E1 E4 E6 DF ................ [00000032] DE DF D7 DA DD EF CE CE D5 D5 D5 D5 D3 D0 D9 D1 ................ Type: GIF (47,49,46) Version: 89a (38,39,61) Width: 100 (64,00) Height: 85 (55,00) Packed: E6 (E6) Color Index: 00 (00) Aspect: 00 (00) First colour in colour table (FF FF FF – White)
  • 14.
    LZW Compression R GB R R B G R R G B B G G R R LZW Table Entry Colour 0 Red 1 Blue 2 Green 3 Black 4 Red, Green 5 Green, Blue 6 Blue, Red 7 Red, Red 8 Red, Blue 9 Blue, Green 10 Green, Red 11 Red, Red, Green 12 Green, Blue, Blue 13 Blue, Green, Green 14 Green, Red, Red
  • 15.
    CSN08704 Data, Audio, Videoand Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan Images (GIF)