diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-12-01 09:09:30 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-12-01 09:10:29 +0100 |
commit | 9707b6a254bdd38bd56f0eb89c1859c62b090aa2 (patch) | |
tree | 0f1b1558c13ebc3ca4d4ca82b32ef65e5e711f7d /tools | |
parent | 5bcaf39b325c0748d2e720dfc91426b5a8c5c693 (diff) | |
download | fiv-9707b6a254bdd38bd56f0eb89c1859c62b090aa2.tar.gz fiv-9707b6a254bdd38bd56f0eb89c1859c62b090aa2.tar.xz fiv-9707b6a254bdd38bd56f0eb89c1859c62b090aa2.zip |
jpeginfo: human-friendly frame content description
Diffstat (limited to 'tools')
-rw-r--r-- | tools/jpeginfo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/jpeginfo.c b/tools/jpeginfo.c index f8e723d..8e4331a 100644 --- a/tools/jpeginfo.c +++ b/tools/jpeginfo.c @@ -77,7 +77,6 @@ static const char *marker_ids[0xFF] = { [JPG12] = "JPG12", [JPG13] = "JPG13", [COM] = "COM" }; -/* // The rest is "RES (Reserved)", except for 0xFF (filler) and 0x00 (invalid). static const char *marker_descriptions[0xFF] = { [TEM] = "For temporary private use in arithmetic coding", @@ -145,7 +144,6 @@ static const char *marker_descriptions[0xFF] = { [JPG13] = "Reserved for JPEG extensions, 13", [COM] = "Comment", }; -*/ // --- Analysis ---------------------------------------------------------------- // Because the JPEG file format is simple, just do it manually. @@ -231,6 +229,7 @@ parse_marker(uint8_t marker, const uint8_t *p, const uint8_t *end, case DHP: // B.2.2 and B.3.2. // As per B.2.5, Y can be zero, then there needs to be a DNL segment. *o = add_to_subarray(*o, "info", JV_OBJECT( + jv_string("type"), jv_string(marker_descriptions[marker]), jv_string("bits"), jv_number(payload[0]), jv_string("height"), jv_number(payload[1] << 8 | payload[2]), jv_string("width"), jv_number(payload[3] << 8 | payload[4]), |