Bug #10835

Invert module seems not to work properly

Added by J. Casales over 4 years ago. Updated about 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
git development version
hardware architecture:


I'm using VueScan to scan my negatives into linear gamma .tif files. Now I've tried darktable 2.0.0 to correct the orange mask. Unfortunately the invert module seems not to work properly when picking the color of the film material. The scan is inverted but the orange mask is still not corrected.

invert1.jpg (229 KB) invert1.jpg J. Casales, 12/31/2015 12:48 AM
invert2.jpg (261 KB) invert2.jpg J. Casales, 12/31/2015 12:48 AM
vuescan_lock_film_base_color.jpg (528 KB) vuescan_lock_film_base_color.jpg 'Lock film base color' option in VueScan J. Casales, 01/05/2016 12:24 AM
raw0022.tif.xmp (2.75 KB) raw0022.tif.xmp Tobias Ellinghaus, 01/05/2016 02:56 PM
img_0001_01.jpg (81 KB) img_0001_01.jpg Tobias Ellinghaus, 01/05/2016 02:56 PM


#2 Updated by Tobias Ellinghaus over 4 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete

Could you provide a sample file to test with?

#5 Updated by Tobias Ellinghaus over 4 years ago

  • Affected Version changed from 2.0.0 to git development version
  • Status changed from Incomplete to Triaged

Something is different with your sample than my test files (which work nicely). I'll have a look to see what is happening. At least it's not a regression, 1.6.x couldn't process it either.

#6 Updated by Tobias Ellinghaus over 4 years ago

So, I managed to process your image properly with invert, wb and levels, see the attached XMP for details. The steps I did was first enable invert and pick the brighter orange from the frame, next to the holes of the stock. Then I added wb and picked the NOW brighter color on the bottom, outside the unexposed film. Then I used levels to bring the whitepoint way down. I am not sure if simple inversion can remove the color cast alone.

#7 Updated by J. Casales over 4 years ago

I've uploaded a 35mm scan because of the smaller file size. Both samples are from color negative film. Well, 'Invert' and 'White Balance' is working. In VueScan I've just to select a piece of unexposed film and enable 'Lock film base color' to invert the scan AND correct the orange mask. Combining both actions in the 'Invert' module may be helpful.

#8 Updated by Tobias Ellinghaus over 4 years ago

With my test files that's what invert does, I am not sure why it doesn't work for your file. Maybe the math in our "invert" is too simple and it's just a happy coincidence that it works with my files. I'll leave this bug open, maybe someone has an idea.

#9 Updated by Cory Larson about 1 year ago

I managed to reproduce it, and the nil return ( were red herrings. It happens when dt shuts down while lua is still running. This can be provoked when hitting ctrl-e to export and then ctrl-q to quit while the export is still running. Other cases are probably possible, too.

Also available in: Atom PDF

Go to top