Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Media Lecture 4.2: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.

Similar presentations


Presentation on theme: "Digital Media Lecture 4.2: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan."— Presentation transcript:

1 Digital Media Lecture 4.2: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan

2 Refer to Supplemental text: Ways to store an image as numbers: Bitmapped Graphics Ways to store an image as numbers: Vector Graphics

3 Practice Examples Each image encoded three ways: –24 bit RGB –Run Length Encoding –Table Encoding

4 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB

5 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green orange | white | green | cyan |cyan | cyan | red | orange | white | red | white | blue Example 1 24 bit RGB

6 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green orange | white | green | cyan |cyan | cyan | red | orange | white | red | white | blue Example 1 24 bit RGB 237, 132, 30 | 255, 255, 255 | 67, 139, 23 | 120, 248, 254 | 120, 248, 254 | 120, 248, 254 | 232, 68, 21 | 237, 132, 30 | 255, 255, 255 | 232, 68, 21 | 255, 255, 255 | 0, 59, 250

7 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green orange | white | green | cyan |cyan | cyan | red | orange | white | red | white | blue Example 1 24 bit RGB 237, 132, 30 | 255, 255, 255 | 67, 139, 23 | 120, 248, 254 | 120, 248, 254 | 120, 248, 254 | 232, 68, 21 | 237, 132, 30 | 255, 255, 255 | 232, 68, 21 | 255, 255, 255 | 0, 59, 250 36 bytes total (excluding any header)

8 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Run length encoding RLE 1 byte for the count

9 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green 1 orange | 1 white | 1 green | 3 cyan | 1 red | 1 orange | 1 white | 1 red | 1 white | 1 blue Example 1 24 bit RGB Run length encoding RLE 1 byte for the count

10 1 237, 132, 30 | 1 255, 255, 255 | 1 67, 139, 23 | 3 120, 248, 254 | 1 232, 68, 21 | 1 237, 132, 30 | 1 255, 255, 255 | 1 232, 68, 21 | 1 255, 255, 255 | 1 0, 59, 250 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green 1 orange | 1 white | 1 green | 3 cyan | 1 red | 1 orange | 1 white | 1 red | 1 white | 1 blue Example 1 24 bit RGB Run length encoding RLE 1 byte for the count

11 1 237, 132, 30 | 1 255, 255, 255 | 1 67, 139, 23 | 3 120, 248, 254 | 1 232, 68, 21 | 1 237, 132, 30 | 1 255, 255, 255 | 1 232, 68, 21 | 1 255, 255, 255 | 1 0, 59, 250 40 bytes total (excluding any header) notice that in this case, the RLE is larger than the 24 bit RGB 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green 1 orange | 1 white | 1 green | 3 cyan | 1 red | 1 orange | 1 white | 1 red | 1 white | 1 blue Example 1 24 bit RGB Run length encoding RLE 1 byte for the count

12 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Table Encoding

13 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Table Encoding 237, 132, 30orange000 255, 255, 255white001 120, 248, 254cyan011 232, 68, 21red100 0, 59, 250blue101 67, 139, 23green010

14 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Table Encoding 237, 132, 30orange000 255, 255, 255white001 120, 248, 254cyan011 232, 68, 21red100 0, 59, 250blue101 67, 139, 23green010 color table: 18 bytes

15 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Table Encoding 237, 132, 30orange000 255, 255, 255white001 120, 248, 254cyan011 232, 68, 21red100 0, 59, 250blue101 67, 139, 23green010 color table: 18 bytes 000001010 011011011 100000001 100001101

16 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Table Encoding 237, 132, 30orange000 255, 255, 255white001 120, 248, 254cyan011 232, 68, 21red100 0, 59, 250blue101 67, 139, 23green010 color table: 18 bytes 000001010 011011011 100000001 100001101 bitmapped portion: 36 bits/8 = 5 (4.5) bytes

17 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green Example 1 24 bit RGB Table Encoding 237, 132, 30orange000 255, 255, 255white001 120, 248, 254cyan011 232, 68, 21red100 0, 59, 250blue101 67, 139, 23green010 color table: 18 bytes 000001010 011011011 100000001 100001101 bitmapped portion: 36 bits/8 = 5 (4.5) bytes Total: 18 + 5 = 23 bytes (excluding any header)

18

19 237, 132, 30-orange 255, 255, 255-white 232, 68, 21-red 0, 59, 250-blue Example 2 24 bit RGB

20 237, 132, 30-orange 255, 255, 255-white 232, 68, 21-red 0, 59, 250-blue red | orange | white | white | red | white | blue | blue | red | white | white | white Example 2 24 bit RGB 232, 68, 21 | 237, 132, 30 | 255, 255, 255 | 255, 255, 255 | 232, 68, 21 | 255, 255, 255 | 0, 59, 250 | 0, 59, 250 | 232, 68, 21 | 255, 255, 255 | 255, 255, 255 | 255, 255, 255 | 36 bytes total (excluding any header)

21 Example 2 24 bit RGB Run length encoding RLE 1 byte for the count 237, 132, 30-orange 255, 255, 255-white 232, 68, 21-red 0, 59, 250-blue

22 Example 2 24 bit RGB Run length encoding RLE 1 byte for the count 237, 132, 30-orange 255, 255, 255-white 232, 68, 21-red 0, 59, 250-blue 1 red | 1 orange | 2 white | 1 red | 1 white | 2 blue | 1 red | 3 white 1 232, 68, 21 | 1 237, 132, 30 | 2 255, 255, 255 | 1 232, 68, 21 | 1 255, 255, 255 | 2 0, 59, 250 | 1 232, 68, 21 | 3 255, 255, 255 | 32 bytes total (excluding any header)

23 Example 2 24 bit RGB Table Encoding 237, 132, 30-orange 255, 255, 255-white 232, 68, 21-red 0, 59, 250-blue

24 Example 2 24 bit RGB Table Encoding color table: 12 bytes 0010 0101 00011111 00010101 bitmapped portion: 24 bits/8 = 3 bytes Total: 12 + 3 = 15 bytes (excluding any header) 237, 132, 30-orange 255, 255, 255-white 232, 68, 21-red 0, 59, 250-blue 255, 255, 255white01 237, 132, 30orange10 232, 68, 21red00 0, 59, 250blue11

25

26 orange | orange | white | orange | cyan | cyan | orange | cyan | orange Example 3 24 bit RGB 237, 132, 30 | 237, 132, 30 | 255, 255, 255 | 237, 132, 30 | 120, 248, 254 | 120, 248, 254 | 237, 132, 30 | 120, 248, 254 | 237, 132, 30 27 bytes total (excluding any header) 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan

27 Example 3 24 bit RGB Run length encoding RLE 1 byte for the count 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 2 orange | 1 white | 1 orange | 2 cyan | 1 orange | 1 cyan | 1 orange 2 237, 132, 30 | 1 255, 255, 255 | 1 237, 132, 30 | 2 120, 248, 254 | 1 237, 132, 30 | 1 120, 248, 254 | 1 237, 132, 30 28 bytes total (excluding any header)

28 Example 3 24 bit RGB Table Encoding 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 237, 132, 30orange00 255, 255, 255white01 color table: 9 bytes 120, 248, 254cyan10 000001 001010 001000 bitmapped portion: 18 bits / 8 = 3 bytes Total: 9 + 3 = 12 bytes (excluding any header)

29 Another table encoding example

30 237, 132, 30-orange 255, 255, 255-white 120, 248, 254-cyan 232, 68, 21-red 0, 59, 250-blue 67, 139, 23-green 237, 132, 30orange000 255, 255, 255white001 120, 248, 254cyan011 232, 68, 21red100 0, 59, 250blue101 67, 139, 23green010 color table: 18 bytes Example 4 24 bit RGB Table Encoding 000000001010 000011011011 000100000001 000100001101 bitmapped portion: 48 bits/8 = 6 bytes Total: 18 + 6 = 24 bytes (excluding any header)

31 Additional practice images

32

33

34

35


Download ppt "Digital Media Lecture 4.2: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan."

Similar presentations


Ads by Google