fn pack_pixel_rows( src: &[u8], width: usize, height: usize, channels: usize, rowstride: usize, ) -> Result<Vec<u8>, String>