Merge QPR1.180718.001
Change-Id: I5dbf6109677a1cbbf8e334ef0158c54cb55c02dc
diff --git a/src/tiff_parser.cc b/src/tiff_parser.cc
index 6bf3bb4..f36c5ba 100644
--- a/src/tiff_parser.cc
+++ b/src/tiff_parser.cc
@@ -165,11 +165,14 @@
// Get color_space
if (tiff_directory.Has(kExifTagColorSpace)) {
std::uint32_t color_space;
- success &= tiff_directory.Get(kExifTagColorSpace, &color_space);
- if (color_space == 1) {
- preview_image_data->color_space = PreviewImageData::kSrgb;
- } else if (color_space == 65535 || color_space == 2) {
- preview_image_data->color_space = PreviewImageData::kAdobeRgb;
+ if (tiff_directory.Get(kExifTagColorSpace, &color_space)) {
+ if (color_space == 1) {
+ preview_image_data->color_space = PreviewImageData::kSrgb;
+ } else if (color_space == 65535 || color_space == 2) {
+ preview_image_data->color_space = PreviewImageData::kAdobeRgb;
+ }
+ } else {
+ success = false;
}
}
diff --git a/src/tiff_parser.h b/src/tiff_parser.h
index 84b3fc6..e809274 100644
--- a/src/tiff_parser.h
+++ b/src/tiff_parser.h
@@ -163,7 +163,7 @@
std::uint32_t* width, std::uint32_t* height);
// Reads the width and height of the crop information if available.
-// Returns false if an error occured.
+// Returns false if an error occurred.
bool GetFullCropDimension(const tiff_directory::TiffDirectory& tiff_directory,
std::uint32_t* width, std::uint32_t* height);