Presentation is loading. Please wait.

Presentation is loading. Please wait.

- orange white green - cyan - red - blue Example 1 24 bit RGB

Similar presentations


Presentation on theme: "- orange white green - cyan - red - blue Example 1 24 bit RGB"— Presentation transcript:

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

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

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

4

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

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

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

8

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

10 orange white - cyan Example 3 24 bit RGB Run length encoding RLE
237, 132, 30 120, 248, 254 orange white - cyan 255, 255, 255 Example 3 24 bit RGB Run length encoding RLE 1 byte count 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)

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

12

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

14

15 Table encoding, Special Case:
237, 132, 30 255, 255, 255 120, 248, 254 232, 68, 21 0, 59, 250 - orange white green - cyan - red - blue 67, 139, 23 Example 4 24 bit RGB Table Encoding Special Case: Limited to 4 colors Example 4 24 bit RGB Table encoding, Special Case: 6 colors in the image, only room for 4 colors in table (table too small to carry all the colors)

16 (orange, there are 6 of these) (cyan, there are 3 of these)
237, 132, 30 255, 255, 255 120, 248, 254 232, 68, 21 0, 59, 250 - orange white green - cyan - red - blue 67, 139, 23 Example 4 24 bit RGB Table Encoding Special Case: Limited to 4 colors Arrange colors in sequence from most frequently occurring to least frequent 237, 132, 30 120, 248, 254 255, 255, 255 232, 68, 21 67, 139, 23 0, 59, 250 (orange, there are 6 of these) (cyan, there are 3 of these) (white, there are 3 of these) (red there are 2 of these) (green) (blue) But the table only has room for 4 colors so we have to drop these two colors:

17 - 00 (orange, there are 6 of these) 01 (cyan, there are 3 of these)
237, 132, 30 255, 255, 255 120, 248, 254 232, 68, 21 0, 59, 250 - orange white green - cyan - red - blue 67, 139, 23 Example 4 24 bit RGB Table Encoding Special Case: Limited to 4 colors Assign the color codes for the 4 colors: 237, 132, 30 120, 248, 254 255, 255, 255 232, 68, 21 - 00 (orange, there are 6 of these) 01 (cyan, there are 3 of these) 10 (white, there are 3 of these) - 11 (red there are 2 of these) color table: 12 bytes X? X? Total: = bytes (excluding any header)

18 - 00 (orange, there are 6 of these) 01 (cyan, there are 3 of these)
237, 132, 30 255, 255, 255 120, 248, 254 232, 68, 21 0, 59, 250 - orange white green - cyan - red - blue 67, 139, 23 Example 4 24 bit RGB Table Encoding Special Case: Limited to 4 colors Assign the color codes for the 4 colors: 237, 132, 30 120, 248, 254 255, 255, 255 232, 68, 21 - 00 (orange, there are 6 of these) 01 (cyan, there are 3 of these) 10 (white, there are 3 of these) - 11 (red there are 2 of these) color table: 12 bytes

19 - 00 (orange, there are 6 of these) 01 (cyan, there are 3 of these)
237, 132, 30 255, 255, 255 120, 248, 254 232, 68, 21 0, 59, 250 - orange white green - cyan - red - blue 67, 139, 23 Example 4 24 bit RGB Table Encoding Special Case: Limited to 4 colors Assign the color codes for the 4 colors: 237, 132, 30 120, 248, 254 255, 255, 255 232, 68, 21 - 00 (orange, there are 6 of these) 01 (cyan, there are 3 of these) 10 (white, there are 3 of these) - 11 (red there are 2 of these) color table: 12 bytes bitmapped portion: 32 bits/8 = 4 bytes Total: = 16 bytes (excluding any header)

20

21

22

23

24

25

26


Download ppt "- orange white green - cyan - red - blue Example 1 24 bit RGB"

Similar presentations


Ads by Google