MCPcopy Create free account
hub / github.com/darktable-org/rawspeed / getMode

Method getMode

src/librawspeed/decoders/NefDecoder.cpp:397–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397string NefDecoder::getMode() {
398 ostringstream mode;
399 const auto* raw = getIFDWithLargestImage(CFAPATTERN);
400 int compression = raw->getEntry(COMPRESSION)->getU32();
401 uint32_t bitPerPixel = raw->getEntry(BITSPERSAMPLE)->getU32();
402
403 if (NEFIsUncompressedRGB(raw))
404 mode << "sNEF-uncompressed";
405 else {
406 if (1 == compression || NEFIsUncompressed(raw))
407 mode << bitPerPixel << "bit-uncompressed";
408 else
409 mode << bitPerPixel << "bit-compressed";
410 }
411 return mode.str();
412}
413
414string NefDecoder::getExtendedMode(const string &mode) {
415 ostringstream extended_mode;

Callers

nothing calls this directly

Calls 2

getU32Method · 0.45
getEntryMethod · 0.45

Tested by

no test coverage detected