Any interest in a "film negative" feature in RT ?

Added support for X-Trans. It was quite straightforward.

Seems to work fine:

dpr
shared

I had to duplicate the entire loop code blocks in RawImageSource::filmNegativeProcess, because i did’t want to put the sensor type check inside the hot path, and i couldn’t figure out a way to assign a function pointer to FC or XTRANSFC before the loop.
I tried this:

    unsigned int (*theFC)(int,int);
    if(ri->getSensorType() == ST_BAYER) {
        theFC = &this->FC;
    } else if(ri->getSensorType() == ST_FUJI_XTRANS) {
        theFC = &ri->XTRANSFC;
    }

but the compiler barked at me:

ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function.

Does anybody have some advice? Is code duplication really the best way in this case? I saw there are other places in RawImageSource, where code is duplicated for Bayer/Xtrans/Foveon.

Sorry again, i’m not a C++ programmer.

Thank you all for the support :wink:

1 Like