diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-06-05 11:58:59 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-06-05 15:42:38 +0200 |
commit | bd92ad73ec995da9e2b2ca57faf011290f329d53 (patch) | |
tree | 8b2e617f6c43546bc0df2265d7f054256ec2668c /tools | |
parent | b3bc4811720d5d17e6a4d06fc7a328df23645c42 (diff) | |
download | fiv-bd92ad73ec995da9e2b2ca57faf011290f329d53.tar.gz fiv-bd92ad73ec995da9e2b2ca57faf011290f329d53.tar.xz fiv-bd92ad73ec995da9e2b2ca57faf011290f329d53.zip |
rawinfo: add output dimensions and PAR
Diffstat (limited to 'tools')
-rw-r--r-- | tools/rawinfo.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/rawinfo.c b/tools/rawinfo.c index 122486f..60f8482 100644 --- a/tools/rawinfo.c +++ b/tools/rawinfo.c @@ -46,12 +46,23 @@ parse_raw(jv o, const uint8_t *p, size_t len) return add_error(o, libraw_strerror(err)); } + // -> iprc->rawparams.shot_select + o = jv_set(o, jv_string("count"), jv_number(iprc->idata.raw_count)); + o = jv_set(o, jv_string("width"), jv_number(iprc->sizes.width)); o = jv_set(o, jv_string("height"), jv_number(iprc->sizes.height)); o = jv_set(o, jv_string("flip"), jv_number(iprc->sizes.flip)); - - // -> iprc->rawparams.shot_select - o = jv_set(o, jv_string("count"), jv_number(iprc->idata.raw_count)); + o = jv_set(o, jv_string("pixel_aspect_ratio"), + jv_number(iprc->sizes.pixel_aspect)); + + if ((err = libraw_adjust_sizes_info_only(iprc))) { + o = add_warning(o, libraw_strerror(err)); + } else { + o = jv_set( + o, jv_string("output_width"), jv_number(iprc->sizes.iwidth)); + o = jv_set( + o, jv_string("output_height"), jv_number(iprc->sizes.iheight)); + } jv thumbnails = jv_array(); for (int i = 0; i < iprc->thumbs_list.thumbcount; i++) { |