| 51 | } |
| 52 | |
| 53 | RawImage ThreefrDecoder::decodeRawInternal() { |
| 54 | const auto* raw = mRootIFD->getIFDWithTag(STRIPOFFSETS, 1); |
| 55 | uint32_t width = raw->getEntry(IMAGEWIDTH)->getU32(); |
| 56 | uint32_t height = raw->getEntry(IMAGELENGTH)->getU32(); |
| 57 | uint32_t off = raw->getEntry(STRIPOFFSETS)->getU32(); |
| 58 | // STRIPBYTECOUNTS is strange/invalid for the existing 3FR samples... |
| 59 | |
| 60 | const ByteStream bs(DataBuffer(mFile->getSubView(off), Endianness::little)); |
| 61 | |
| 62 | mRaw->dim = iPoint2D(width, height); |
| 63 | |
| 64 | HasselbladDecompressor l(bs, mRaw); |
| 65 | mRaw->createData(); |
| 66 | |
| 67 | int pixelBaseOffset = hints.get("pixelBaseOffset", 0); |
| 68 | l.decode(pixelBaseOffset); |
| 69 | |
| 70 | return mRaw; |
| 71 | } |
| 72 | |
| 73 | void ThreefrDecoder::decodeMetaDataInternal(const CameraMetaData* meta) { |
| 74 | mRaw->cfa.setCFA(iPoint2D(2,2), CFA_RED, CFA_GREEN, CFA_GREEN, CFA_BLUE); |
nothing calls this directly
no test coverage detected