fn flip_rows(data: Vec<u8>, height: usize, row_len: usize) -> Vec<u8> {
		let mut new_data = Vec::with_capacity(data.len());
		unsafe {new_data.set_len(data.len())};
		for row_i in (0..height) {
			for byte_i in (0..row_len) {
				let old_idx = (height-row_i-1)*row_len + byte_i;
				let new_idx = row_i*row_len + byte_i;
				new_data[new_idx] = data[old_idx];
			}
		}
		new_data
	}
/// Reorder rows in bitmap, last to first.
/// TODO rewrite functionally
Reorder rows in bitmap, last to first.
TODO rewrite functionally
Reorder rows in bitmap last to first . TODO rewrite functionally
fn flip_rows(data: Vec<u8>, height: usize, row_len: usize) -> Vec<u8> {
		let mut new_data = Vec::with_capacity(data.len());
		unsafe {new_data.set_len(data.len())};
		for row_i in (0..height) {
			for byte_i in (0..row_len) {
				let old_idx = (height-row_i-1)*row_len + byte_i;
				let new_idx = row_i*row_len + byte_i;
				new_data[new_idx] = data[old_idx];
			}
		}
		new_data
	}
fn flip_rows ( data : Vec < u8 > , height : usize , row_len : usize ) -> Vec < u8 > { let mut new_data = Vec :: with_capacity ( data . len ( ) ) ; unsafe { new_data . set_len ( data . len ( ) ) } ; for row_i in ( 0 .. height ) { for byte_i in ( 0 .. row_len ) { let old_idx = ( height - row_i - 1 ) * row_len + byte_i ; let new_idx = row_i * row_len + byte_i ; new_data [ new_idx ] = data [ old_idx ] ; } } new_data }
Reorder rows in bitmap, last to first.
Reorder rows in bitmap last to first .
data
Vec<u8>
height
usize
row_len
usize
data
Vec<u8>
height
usize
row_len
usize