| 543 | } |
| 544 | |
| 545 | LoaderExifDataJpeg::LoaderExifDataJpeg(PreviewId id, const Image& image, int parIdx) : |
| 546 | Loader(id, image), dataKey_(param_[parIdx].dataKey_) { |
| 547 | if (auto pos = image_.exifData().findKey(dataKey_); pos != image_.exifData().end()) { |
| 548 | size_ = pos->sizeDataArea(); // indirect data |
| 549 | if (size_ == 0 && pos->typeId() == undefined) |
| 550 | size_ = pos->size(); // direct data |
| 551 | } |
| 552 | |
| 553 | if (size_ == 0) |
| 554 | return; |
| 555 | |
| 556 | valid_ = true; |
| 557 | } |
| 558 | |
| 559 | Loader::UniquePtr createLoaderExifDataJpeg(PreviewId id, const Image& image, int parIdx) { |
| 560 | return std::make_unique<LoaderExifDataJpeg>(id, image, parIdx); |
nothing calls this directly
no test coverage detected