Make image C-contiguous