let (w, h) = buf.get_dimensions(0);
let hdr = format!("P6\n{} {}\n255\n", w, h);
ofile.write_all(hdr.as_bytes()).unwrap();
let dta = buf.get_data();
let stride = buf.get_stride(0);
let offs: [usize; 3] = [
let (w, h) = buf.get_dimensions(0);
let hdr = format!("P6\n{} {}\n255\n", w, h);
ofile.write_all(hdr.as_bytes()).unwrap();
let dta = buf.get_data();
let stride = buf.get_stride(0);
let offs: [usize; 3] = [