本文整理汇总了C++中TiffEntry::getU32方法的典型用法代码示例。如果您正苦于以下问题:C++ TiffEntry::getU32方法的具体用法?C++ TiffEntry::getU32怎么用?C++ TiffEntry::getU32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TiffEntry
的用法示例。
在下文中一共展示了TiffEntry::getU32方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: decodeMetaDataInternal
void PefDecoder::decodeMetaDataInternal(const CameraMetaData* meta) {
int iso = 0;
mRaw->cfa.setCFA(iPoint2D(2,2), CFA_RED, CFA_GREEN, CFA_GREEN, CFA_BLUE);
if (mRootIFD->hasEntryRecursive(ISOSPEEDRATINGS))
iso = mRootIFD->getEntryRecursive(ISOSPEEDRATINGS)->getU32();
setMetaData(meta, "", iso);
// Read black level
if (mRootIFD->hasEntryRecursive(static_cast<TiffTag>(0x200))) {
TiffEntry* black = mRootIFD->getEntryRecursive(static_cast<TiffTag>(0x200));
if (black->count == 4) {
for (int i = 0; i < 4; i++)
mRaw->blackLevelSeparate[i] = black->getU32(i);
}
}
// Set the whitebalance
if (mRootIFD->hasEntryRecursive(static_cast<TiffTag>(0x0201))) {
TiffEntry* wb = mRootIFD->getEntryRecursive(static_cast<TiffTag>(0x0201));
if (wb->count == 4) {
mRaw->metadata.wbCoeffs[0] = wb->getU32(0);
mRaw->metadata.wbCoeffs[1] = wb->getU32(1);
mRaw->metadata.wbCoeffs[2] = wb->getU32(3);
}
}
}
示例2: decodeRawInternal
RawImage PefDecoder::decodeRawInternal() {
auto raw = mRootIFD->getIFDWithTag(STRIPOFFSETS);
int compression = raw->getEntry(COMPRESSION)->getU32();
if (1 == compression || compression == 32773) {
decodeUncompressed(raw, BitOrder_MSB);
return mRaw;
}
if (65535 != compression)
ThrowRDE("Unsupported compression");
TiffEntry *offsets = raw->getEntry(STRIPOFFSETS);
TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS);
if (offsets->count != 1) {
ThrowRDE("Multiple Strips found: %u", offsets->count);
}
if (counts->count != offsets->count) {
ThrowRDE(
"Byte count number does not match strip size: count:%u, strips:%u ",
counts->count, offsets->count);
}
if (!mFile->isValid(offsets->getU32(), counts->getU32()))
ThrowRDE("Truncated file.");
uint32 width = raw->getEntry(IMAGEWIDTH)->getU32();
uint32 height = raw->getEntry(IMAGELENGTH)->getU32();
mRaw->dim = iPoint2D(width, height);
mRaw->createData();
try {
PentaxDecompressor::decompress(
mRaw, ByteStream(mFile, offsets->getU32(), counts->getU32()),
getRootIFD());
} catch (IOException &e) {
mRaw->setError(e.what());
// Let's ignore it, it may have delivered somewhat useful data.
}
return mRaw;
}