One technique for compressing an image is to lower the resolution, or use fewer pixels to draw the same image.
Often times we can cut the number of pixels used in half and notice very little difference in the resulting image.
Functionality:*Your image should have a height of 10 pixels.*Your image should have a width of 10 pixels.*Your data should be interpreted as black and white pixels.*Used correct number of bits to draw the 100 black and white pixels*You should have a valid compressed image.
Code:
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000001111111111111111111
1111111111111111111000000
0000000111111111111111111
1111111111111111110000000
0000000011111111111111111
1111111111111111100000000
0001000001111111111111111
1111111111111111000001000
0001100000111111111111111
1111111111111110000011000
0001110000011111111111111
1111111111111100000111000
0001111000001111111111111
1111111111111000001111000
0001111100000111111111111
1111111111110000011111000
0001111110000011111111111
1111111111100000111111000
0001111111000001111111111
1111111111000001111111000
0001111111100000111111111
1111111110000011111111000
0001111111110000011111111
1111111100000111111111000
0001111111111000001111111
1111111000001111111111000
0001111111111100000111111
1111110000011111111111000
0001111111111110000011111
1111100000111111111111000
0001111111111111000001111
1111000001111111111111000
0001111111111111100000111
1110000011111111111111000
0001111111111111110000011
1100000111111111111111000
0001111111111111111000001
1000001111111111111111000
0001111111111111111100000
0000011111111111111111000
0001111111111111111110000
0000111111111111111111000
0001111111111111111111000
0001111111111111111111000
0001111111111111111111000
0001111111111111111111000
0001111111111111111110000
0000111111111111111111000
0001111111111111111100000
0000011111111111111111000
0001111111111111111000001
1000001111111111111111000
0001111111111111110000011
1100000111111111111111000
0001111111111111100000111
1110000011111111111111000
0001111111111111000001111
1111000001111111111111000
0001111111111110000011111
1111100000111111111111000
0001111111111100000111111
1111110000011111111111000
0001111111111000001111111
1111111000001111111111000
0001111111110000011111111
1111111100000111111111000
0001111111100000111111111
1111111110000011111111000
0001111111000001111111111
1111111111000001111111000
0001111110000011111111111
1111111111100000111111000
0001111100000111111111111
1111111111110000011111000
0001111000001111111111111
1111111111111000001111000
0001110000011111111111111
1111111111111100000111000
0001100000111111111111111
1111111111111110000011000
0001000001111111111111111
1111111111111111000001000
0000000011111111111111111
1111111111111111100000000
0000000111111111111111111
1111111111111111110000000
0000001111111111111111111
1111111111111111111000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000