Commit e1a87432 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[piexwasm] Add white space to piex.cpp wasm code GetDetails()

Add minor white space for better readability. GetDetails() returns the
EXIF photographic details of the RAW image. piex-loader.js cleans this
data later (remove trailing string null bytes and trim left and right,
reformat floating point and integer numbers) for eventual presentation
to users (in the FilesApp Quick View metadata info box for example).

The color space names used are presentation names (sRGB, AdobeRGB1998)
not values. The piex color space values are 'sRgb' and 'adobeRgb', and
this note to point out the difference.

Test: piex/tests.sh PASS
Tbr: adanillo
No-try: true
Bug: 1132695
Change-Id: Ic80765334c0a78a18bd0cbdd2c114cbb16658cee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454354Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814590}
parent 07baf835
...@@ -86,12 +86,13 @@ class PiexReader { ...@@ -86,12 +86,13 @@ class PiexReader {
object.set("width", emscripten::val(image.full_width)); object.set("width", emscripten::val(image.full_width));
object.set("height", emscripten::val(image.full_height)); object.set("height", emscripten::val(image.full_height));
object.set("orientation", emscripten::val(image.exif_orientation)); object.set("orientation", emscripten::val(image.exif_orientation));
object.set("colorSpace", emscripten::val("sRGB")); object.set("colorSpace", emscripten::val("sRGB"));
const auto space = static_cast<uint32_t>(image.color_space); const auto space = static_cast<uint32_t>(image.color_space);
if (space == piex::PreviewImageData::kAdobeRgb) if (space == piex::PreviewImageData::kAdobeRgb)
object.set("colorSpace", emscripten::val("AdobeRGB1998")); object.set("colorSpace", emscripten::val("AdobeRGB1998"));
object.set("date", emscripten::val(image.date_time));
object.set("date", emscripten::val(image.date_time));
return object; return object;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment