diff options
author | Thomas White <taw@physics.org> | 2020-08-04 15:25:59 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-04 15:25:59 +0200 |
commit | dce8a7b87023159480d06c963751da7e4fd2cb7c (patch) | |
tree | af4bf3c1a9c177d9e358c57dcee607a7767800ca /libcrystfel/src/image.c | |
parent | 43b71428b68e94d22c2c5f9e8a25b1b46bc04a4c (diff) |
Add image_write()
This is a one-to-one transfer of the old hdf5_write_image()
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index d2fb30ba..c8d0f329 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -916,3 +916,16 @@ void mark_resolution_range_as_bad(struct image *image, } } + + +int image_write(const struct image *image, + const DataTemplate *dtempl, + const char *filename) +{ + if ( is_hdf5_file(filename) ) { + return image_hdf5_write(image, dtempl, filename); + } + + ERROR("Can only write to HDF5 files.\n"); + return 1; +} |