Lines Matching refs:tiff_directory
28 using tiff_directory::Endian;
29 using tiff_directory::Rational;
30 using tiff_directory::SRational;
31 using tiff_directory::SizeOfType;
32 using tiff_directory::TIFF_TYPE_LONG;
33 using tiff_directory::TIFF_TYPE_UNDEFINED;
34 using tiff_directory::TiffDirectory;
35 using tiff_directory::kBigEndian;
36 using tiff_directory::kLittleEndian;
43 bool GetFullDimension16(const TiffDirectory& tiff_directory, in GetFullDimension16() argument
47 if (!GetFullDimension32(tiff_directory, &tmp_width, &tmp_height) || in GetFullDimension16()
128 void GetImageSize(const TiffDirectory& tiff_directory, StreamInterface* stream, in GetImageSize() argument
132 GetFullDimension16(tiff_directory, &image->width, &image->height); in GetImageSize()
143 bool FillPreviewImageData(const TiffDirectory& tiff_directory, in FillPreviewImageData() argument
150 if (GetImageData(tiff_directory, stream, &image)) { in FillPreviewImageData()
159 if (tiff_directory.Has(kTiffTagOrientation) && in FillPreviewImageData()
161 success &= tiff_directory.Get(kTiffTagOrientation, in FillPreviewImageData()
166 if (tiff_directory.Has(kExifTagColorSpace)) { in FillPreviewImageData()
168 success &= tiff_directory.Get(kExifTagColorSpace, &color_space); in FillPreviewImageData()
176 success &= GetFullDimension32(tiff_directory, &preview_image_data->full_width, in FillPreviewImageData()
179 if (tiff_directory.Has(kTiffTagMake)) { in FillPreviewImageData()
180 success &= tiff_directory.Get(kTiffTagMake, &preview_image_data->maker); in FillPreviewImageData()
183 if (tiff_directory.Has(kTiffTagModel)) { in FillPreviewImageData()
184 success &= tiff_directory.Get(kTiffTagModel, &preview_image_data->model); in FillPreviewImageData()
187 if (tiff_directory.Has(kTiffTagCfaPatternDim)) { in FillPreviewImageData()
189 if (tiff_directory.Get(kTiffTagCfaPatternDim, &cfa_pattern_dim) && in FillPreviewImageData()
196 if (tiff_directory.Has(kExifTagDateTimeOriginal)) { in FillPreviewImageData()
197 success &= tiff_directory.Get(kExifTagDateTimeOriginal, in FillPreviewImageData()
201 if (tiff_directory.Has(kExifTagIsoSpeed)) { in FillPreviewImageData()
202 success &= tiff_directory.Get(kExifTagIsoSpeed, &preview_image_data->iso); in FillPreviewImageData()
203 } else if (tiff_directory.Has(kPanaTagIso)) { in FillPreviewImageData()
204 success &= tiff_directory.Get(kPanaTagIso, &preview_image_data->iso); in FillPreviewImageData()
207 if (tiff_directory.Has(kExifTagExposureTime)) { in FillPreviewImageData()
208 success &= GetRational(kExifTagExposureTime, tiff_directory, 1, in FillPreviewImageData()
212 if (tiff_directory.Has(kExifTagFnumber)) { in FillPreviewImageData()
213 success &= GetRational(kExifTagFnumber, tiff_directory, 1, in FillPreviewImageData()
217 if (tiff_directory.Has(kExifTagFocalLength)) { in FillPreviewImageData()
218 success &= GetRational(kExifTagFocalLength, tiff_directory, 1, in FillPreviewImageData()
226 const IfdVector& tiff_directory) { in FindFirstTagInIfds() argument
227 for (std::uint32_t i = 0; i < tiff_directory.size(); ++i) { in FindFirstTagInIfds()
228 if (tiff_directory[i].Has(tag)) { in FindFirstTagInIfds()
229 return &tiff_directory[i]; in FindFirstTagInIfds()
234 FindFirstTagInIfds(tag, tiff_directory[i].GetSubDirectories()); in FindFirstTagInIfds()
365 bool GetImageData(const TiffDirectory& tiff_directory, StreamInterface* stream, in GetImageData() argument
370 if (tiff_directory.Has(kTiffTagJpegOffset) && in GetImageData()
371 tiff_directory.Has(kTiffTagJpegByteCount)) { in GetImageData()
372 if (!tiff_directory.Get(kTiffTagJpegOffset, &offset) || in GetImageData()
373 !tiff_directory.Get(kTiffTagJpegByteCount, &length)) { in GetImageData()
377 } else if (tiff_directory.Has(kTiffTagStripOffsets) && in GetImageData()
378 tiff_directory.Has(kTiffTagStripByteCounts)) { in GetImageData()
381 if (!tiff_directory.Get(kTiffTagStripOffsets, &strip_offsets) || in GetImageData()
382 !tiff_directory.Get(kTiffTagStripByteCounts, &strip_byte_counts)) { in GetImageData()
388 !tiff_directory.Get(kTiffTagCompression, &compression)) { in GetImageData()
393 if (tiff_directory.Get(kTiffTagPhotometric, &photometric_interpretation) && in GetImageData()
413 } else if (tiff_directory.Has(kPanaTagJpegImage)) { in GetImageData()
414 if (!tiff_directory.GetOffsetAndLength( in GetImageData()
425 GetImageSize(tiff_directory, stream, image); in GetImageData()
470 TiffDirectory* tiff_directory, in ParseDirectory() argument
519 tiff_directory->AddEntry(tag, type, number_of_elements, value_offset, data); in ParseDirectory()
537 for (const auto& tiff_directory : tiff_content.tiff_directory) { in GetExifOrientation() local
538 if (tiff_directory.Has(kTiffTagOrientation) && in GetExifOrientation()
539 tiff_directory.Get(kTiffTagOrientation, orientation)) { in GetExifOrientation()
547 bool GetFullDimension32(const TiffDirectory& tiff_directory, in GetFullDimension32() argument
551 if (tiff_directory.Has(kTiffTagSubFileType)) { in GetFullDimension32()
553 if (!tiff_directory.Get(kTiffTagSubFileType, &sub_file_type) || in GetFullDimension32()
559 if (tiff_directory.Has(kExifTagDefaultCropSize)) { in GetFullDimension32()
562 if (tiff_directory.Get(kExifTagDefaultCropSize, &crop)) { in GetFullDimension32()
565 } else if (tiff_directory.Get(kExifTagDefaultCropSize, &crop_rational) && in GetFullDimension32()
573 } else if (tiff_directory.Has(kExifTagWidth) && in GetFullDimension32()
574 tiff_directory.Has(kExifTagHeight)) { in GetFullDimension32()
575 if (!tiff_directory.Get(kExifTagWidth, width) || in GetFullDimension32()
576 !tiff_directory.Get(kExifTagHeight, height)) { in GetFullDimension32()
579 } else if (tiff_directory.Has(kTiffTagImageWidth) && in GetFullDimension32()
580 tiff_directory.Has(kTiffTagImageLength)) { in GetFullDimension32()
581 if (!tiff_directory.Get(kTiffTagImageWidth, width) || in GetFullDimension32()
582 !tiff_directory.Get(kTiffTagImageLength, height)) { in GetFullDimension32()
585 } else if (tiff_directory.Has(kPanaTagTopBorder) && in GetFullDimension32()
586 tiff_directory.Has(kPanaTagLeftBorder) && in GetFullDimension32()
587 tiff_directory.Has(kPanaTagBottomBorder) && in GetFullDimension32()
588 tiff_directory.Has(kPanaTagRightBorder)) { in GetFullDimension32()
593 if (tiff_directory.Get(kPanaTagLeftBorder, &left) && in GetFullDimension32()
594 tiff_directory.Get(kPanaTagRightBorder, &right) && in GetFullDimension32()
595 tiff_directory.Get(kPanaTagTopBorder, &top) && in GetFullDimension32()
596 tiff_directory.Get(kPanaTagBottomBorder, &bottom) && bottom > top && in GetFullDimension32()
615 for (const auto& tiff_directory : tiff_content.tiff_directory) { in GetPreviewImageData() local
616 success = FillPreviewImageData(tiff_directory, stream_, preview_image_data); in GetPreviewImageData()
617 if (success && tiff_directory.Has(kTiffTagExifIfd) && in GetPreviewImageData()
622 if (success && tiff_directory.Has(kExifTagGps) && in GetPreviewImageData()
626 for (const auto& sub_directory : tiff_directory.GetSubDirectories()) { in GetPreviewImageData()
639 if (!tiff_content->tiff_directory.empty()) { in Parse()
652 &tiff_content->tiff_directory)) { in Parse()
657 if (FindFirstTagInIfds(kTiffTagExifIfd, tiff_content->tiff_directory) != in Parse()
660 FindFirstTagInIfds(kTiffTagExifIfd, tiff_content->tiff_directory); in Parse()
676 if (FindFirstTagInIfds(kExifTagGps, tiff_content->tiff_directory) != in Parse()
679 FindFirstTagInIfds(kExifTagGps, tiff_content->tiff_directory); in Parse()
689 IfdVector* tiff_directory) { in ParseIfd() argument
699 tiff_directory->push_back(tiff_ifd); in ParseIfd()
700 if (next_ifd_offset != 0 && tiff_directory->size() < max_number_ifds) { in ParseIfd()
702 max_number_ifds, tiff_directory); in ParseIfd()