diff options
author | Thomas White <taw@physics.org> | 2021-04-19 16:23:41 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-04-19 16:45:30 +0200 |
commit | bd6f2aea61668638ddd2e934ce89e3715d30307d (patch) | |
tree | 071455c372988dda7217a277155d76e342d0f75c /src | |
parent | b126d28c8804fd30ca8934b3987e7a9cd1cfae93 (diff) |
Unify loading of image data and header values
This moves the entry point for loading MsgPack data to a new function,
image_read_data_block. Inside image.c, the image structure can be
created using exactly the same functions as for data files.
Diffstat (limited to 'src')
-rw-r--r-- | src/process_image.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/process_image.c b/src/process_image.c index 52e0a9e0..188a4829 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -195,10 +195,12 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, if ( pargs->zmq_data != NULL ) { set_last_task(last_task, "unpacking messagepack object"); - image = image_msgpack_read(iargs->dtempl, - pargs->zmq_data, - pargs->zmq_data_size, - iargs->no_image_data); + image = image_read_data_block(iargs->dtempl, + pargs->zmq_data, + pargs->zmq_data_size, + DST_MSGPACK, + iargs->no_image_data, + iargs->no_mask_data); if ( image == NULL ) return; } else { image = file_wait_open_read(pargs->filename, pargs->event, |