mirror of
https://github.com/Evolution-X/external_piex
synced 2026-01-27 12:07:02 +00:00
Update PIEX from tip of tree am: 79ea86a6a1 am: 3f7e2a1cb2 am: 940f4ce6b5 am: 795c25ac50
Original change: https://android-review.googlesource.com/c/platform/external/piex/+/2037563 Change-Id: Ia2fdafa8870cea42d74fdecc736adbd8217bc712
This commit is contained in:
@@ -183,13 +183,14 @@ class ArwTypeChecker : public TypeChecker {
|
||||
// Search for (kSignatureFileTypeSection + kSignatureVersions[i]) in first
|
||||
// requested bytes
|
||||
const string kSignatureSection("\x00\xb0\x01\x00\x04\x00\x00\x00", 8);
|
||||
const int kSignatureVersionsSize = 5;
|
||||
const int kSignatureVersionsSize = 6;
|
||||
const string kSignatureVersions[kSignatureVersionsSize] = {
|
||||
string("\x02\x00", 2), // ARW 1.0
|
||||
string("\x03\x00", 2), // ARW 2.0
|
||||
string("\x03\x01", 2), // ARW 2.1
|
||||
string("\x03\x02", 2), // ARW 2.2
|
||||
string("\x03\x03", 2), // ARW 2.3
|
||||
string("\x04\x00", 2), // ARW 4.0
|
||||
};
|
||||
bool matched = false;
|
||||
for (int i = 0; i < kSignatureVersionsSize; ++i) {
|
||||
|
||||
@@ -283,9 +283,9 @@ bool GetOlympusPreviewImage(StreamInterface* stream,
|
||||
}
|
||||
|
||||
if (raw_processing_ifd.Has(kOlymTagAspectFrame)) {
|
||||
std::vector<std::uint32_t> aspect_frame(4);
|
||||
std::vector<std::uint32_t> aspect_frame;
|
||||
if (raw_processing_ifd.Get(kOlymTagAspectFrame, &aspect_frame) &&
|
||||
aspect_frame[2] > aspect_frame[0] &&
|
||||
aspect_frame.size() == 4 && aspect_frame[2] > aspect_frame[0] &&
|
||||
aspect_frame[3] > aspect_frame[1]) {
|
||||
preview_image_data->full_width = aspect_frame[2] - aspect_frame[0] + 1;
|
||||
preview_image_data->full_height = aspect_frame[3] - aspect_frame[1] + 1;
|
||||
|
||||
@@ -720,8 +720,8 @@ bool TiffParser::ParseIfd(const std::uint32_t ifd_offset,
|
||||
IfdVector* tiff_directory) {
|
||||
std::uint32_t next_ifd_offset;
|
||||
TiffDirectory tiff_ifd(static_cast<Endian>(endian_));
|
||||
if (!ParseDirectory(tiff_offset_, ifd_offset, endian_, desired_tags,
|
||||
stream_, &tiff_ifd, &next_ifd_offset) ||
|
||||
if (!ParseDirectory(tiff_offset_, ifd_offset, endian_, desired_tags, stream_,
|
||||
&tiff_ifd, &next_ifd_offset) ||
|
||||
!ParseSubIfds(tiff_offset_, desired_tags, max_number_ifds, endian_,
|
||||
stream_, &tiff_ifd)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user