Posted by cuntface Wed 21st Mar 2007 19:12 - Syntax is C++ - 59 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
for(x=0;x
get_image_width();x++) { -
for(y=0;y
get_image_height();y++) { -
-
rp = r;
-
r = data->get_pixel(x,y,RED);
-
-
if(rp == r && rn < 255) { //if we find another pixel the same colour, increment the counter
-
rn++;
-
}
-
-
-
else { //reset the counter and write the previous series
-
-
compressed[byte_ptr] = (char)rn & 0xff;
-
byte_ptr++;
-
compressed[byte_ptr] = (char)rp & 0xff;
-
byte_ptr++;
-
-
-
rt += rn;
-
rn = 1;
-
}
-
}
-
}
PermaLink to this entry https://pastebin.co.uk/12126
Posted by cuntface Wed 21st Mar 2007 19:12 - Syntax is C++ - 59 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0