Click here to Skip to main content
15,886,714 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
1. Encode each pixel’s color into a string:
-a. Start with the top left pixel.
-b. Write the color of the pixel in hexcode (#rrggbb).
-c. If there is pixel to the right of the current pixel, move onto that pixel. Otherwise, move to the leftmost pixel of the next row. Either way, continue again from step b.

2. Analyze the resulting string for runs.
-a. A run is defined as a sequence of identical pixel colors.
-b. For each run, count the number of times the color appears.
-c. Then replace the entire run with one instance of the pixel color, followed by “:n” where n is the number of consecutive pixels of that that color in the run.

im supposed to use this algorithm to complete an assignment but I'm not following at all can some one help me out and explain it a little better

What I have tried:

I have read this thing over and over but cant get a hold of it
Posted
Updated 2-Aug-16 20:13pm
v2
Comments
Maciej Los 3-Aug-16 1:42am    
Not a question at all!
Member 12637902 3-Aug-16 1:56am    
sorry I thought what I asked was a question I really thought this site was to help people out in not asking to do my assignment for me or anything like that everyone on here is always so high and mighty it's annoying
Maciej Los 3-Aug-16 2:00am    
I'd suggest to read the rules.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900