Fix error in `ImageBuf::from_fn`. Closes #60