1 / 35

Digital Media

Digital Media. Lecture 4.1: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan. Refer to Supplemental text:. Ways to store an image as numbers: Bitmapped Graphics   Ways to store an image as numbers: Vector Graphics. Practice Examples.

galena-hull
Download Presentation

Digital Media

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Media Lecture 4.1: 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. Example 1 24 bit RGB 237, 132, 30 -orange 255, 255, 255 -white 67, 139, 23 -green 120, 248, 254 -cyan 232, 68, 21 -red 0, 59, 250 -blue

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

  6. Example 1 24 bit RGB 237, 132, 30 -orange 255, 255, 255 -white 67, 139, 23 -green 120, 248, 254 -cyan 232, 68, 21 -red 0, 59, 250 -blue orange | white | green | cyan |cyan | cyan | red | orange | white | red | white | blue 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. Example 1 24 bit RGB 237, 132, 30 -orange 255, 255, 255 -white 67, 139, 23 -green 120, 248, 254 -cyan 232, 68, 21 -red 0, 59, 250 -blue orange | white | green | cyan |cyan | cyan | red | orange | white | red | white | blue 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. Example 1 24 bit RGB Run length encoding RLE 1 byte for the count 237, 132, 30 -orange 255, 255, 255 -white 67, 139, 23 -green 120, 248, 254 -cyan 232, 68, 21 -red 0, 59, 250 -blue

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

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

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

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

  13. Example 1 24 bit RGB Table Encoding 237, 132, 30 -orange 237, 132, 30 orange 000 255, 255, 255 -white 255, 255, 255 white 001 67, 139, 23 -green 67, 139, 23 green 010 120, 248, 254 -cyan 120, 248, 254 cyan 011 232, 68, 21 -red 232, 68, 21 red 100 0, 59, 250 -blue 0, 59, 250 blue 101

  14. Example 1 24 bit RGB Table Encoding 237, 132, 30 -orange 237, 132, 30 orange 000 255, 255, 255 -white 255, 255, 255 white 001 67, 139, 23 -green 67, 139, 23 green 010 120, 248, 254 -cyan 120, 248, 254 cyan 011 232, 68, 21 -red 232, 68, 21 red 100 0, 59, 250 -blue 0, 59, 250 blue 101 color table: 18 bytes

  15. Example 1 24 bit RGB Table Encoding 237, 132, 30 -orange 237, 132, 30 orange 000 255, 255, 255 -white 255, 255, 255 white 001 67, 139, 23 -green 67, 139, 23 green 010 120, 248, 254 -cyan 120, 248, 254 cyan 011 232, 68, 21 -red 232, 68, 21 red 100 0, 59, 250 -blue 0, 59, 250 blue 101 color table: 18 bytes 000 001 010 011 011 011 100 000 001 100 001 101

  16. Example 1 24 bit RGB Table Encoding 237, 132, 30 -orange 237, 132, 30 orange 000 255, 255, 255 -white 255, 255, 255 white 001 67, 139, 23 -green 67, 139, 23 green 010 120, 248, 254 -cyan 120, 248, 254 cyan 011 232, 68, 21 -red 232, 68, 21 red 100 0, 59, 250 -blue 0, 59, 250 blue 101 color table: 18 bytes 000 001 010 011 011 011 100 000 001 100 001 101 bitmapped portion: 36 bits/8 = 5 (4.5) bytes

  17. Example 1 24 bit RGB Table Encoding 237, 132, 30 orange 000 237, 132, 30 -orange 255, 255, 255 white 001 255, 255, 255 -white 67, 139, 23 -green 67, 139, 23 green 010 120, 248, 254 cyan 011 120, 248, 254 -cyan 232, 68, 21 red 100 232, 68, 21 -red 0, 59, 250 -blue 0, 59, 250 blue 101 color table: 18 bytes 000 001 010 011 011 011 100 000 001 100 001 101 bitmapped portion: 36 bits/8 = 5 (4.5) bytes Total: 18 + 5 = 23 bytes (excluding any header)

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

  19. Example 2 24 bit RGB 232, 68, 21 -red 255, 255, 255 -white 237, 132, 30 -orange 0, 59, 250 -blue red | orange | white | white | red | white | blue | blue | red | white | white | white 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)

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

  21. Example 2 24 bit RGB Run length encoding RLE 1 byte for the count 232, 68, 21 -red 255, 255, 255 -white 237, 132, 30 -orange 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)

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

  23. Example 2 24 bit RGB Table Encoding 232, 68, 21 -red 232, 68, 21 red 00 255, 255, 255 -white 255, 255, 255 white 01 237, 132, 30 -orange 237, 132, 30 orange 10 0, 59, 250 -blue 0, 59, 250 blue 11 color table: 12 bytes 00 10 01 01 00 01 11 11 00 01 01 01 bitmapped portion: 24 bits/8 = 3 bytes Total: 12 + 3 = 15 bytes (excluding any header)

  24. Example 3 24 bit RGB 237, 132, 30 -orange 255, 255, 255 -white 120, 248, 254 -cyan orange | orange | white | orange | cyan | cyan | orange | cyan | orange 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)

  25. 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)

  26. Example 3 24 bit RGB Table Encoding 237, 132, 30 -orange 255, 255, 255 -white 120, 248, 254 -cyan 237, 132, 30 orange 00 color table: 9 bytes 255, 255, 255 white 01 120, 248, 254 cyan 10 00 00 01 00 10 10 00 10 00 bitmapped portion: 18 bits / 8 = 3 bytes Total: 9 + 3 = 12 bytes (excluding any header)

  27. Another table encoding example

  28. 237, 132, 30 -orange Example 4 24 bit RGB Table Encoding 237, 132, 30 orange 000 255, 255, 255 -white 255, 255, 255 white 001 67, 139, 23 -green 67, 139, 23 green 010 120, 248, 254 -cyan 120, 248, 254 cyan 011 232, 68, 21 -red 232, 68, 21 red 100 0, 59, 250 -blue 0, 59, 250 blue 101 color table: 18 bytes 000 000 001 010 000 011 011 011 000 100 000 001 000 100 001 101 bitmapped portion: 48 bits/8 = 6 bytes Total: 18 + 6 = 24 bytes (excluding any header)

  29. Additional practice images

More Related