aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/rawinfo.c17
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++) {