Following up on the earlier discussion on stitching panos (#555): it seems NegPy treats TIFFs tagged with an sRGB profile differently from those tagged with other profiles or no profile.
When the TIFF is tagged as sRGB, the output has lifted shadows, as if the data is being interpreted as having a sRGB TRC rather than linear. If the TIFF is tagged with any other ICC profile (I tried Adobe RGB, ProPhoto RGB, and ColorMatch RGB), the profile is ignored, which is the behavior I'd expect for raw scan data.
Reading code comments, this appears to be intentional. However, it can be problematic when a file is actually linear but happens to be tagged as sRGB. For example, Nikon Scan has a bug where it tags all scans as sRGB even when color management is disabled and the files are raw linear scans. More generally, it's probably not that unusual for TIFFs to contain an embedded ICC profile for one reason or another.
Would it be possible to add an option to disable this behavior? Ideally, there could be a setting where the user specifies the input gamma (e.g. sRGB, gamma 2.2, gamma 1.8, etc.) so NegPy can convert it to linear when appropriate. At a minimum, having an option to force all input to be treated as linear would make it possible to work around incorrectly tagged files.
Here is an image from #555, the last one with an srgb tag renders noticeably brighter than the other two:

Following up on the earlier discussion on stitching panos (#555): it seems NegPy treats TIFFs tagged with an sRGB profile differently from those tagged with other profiles or no profile.
When the TIFF is tagged as sRGB, the output has lifted shadows, as if the data is being interpreted as having a sRGB TRC rather than linear. If the TIFF is tagged with any other ICC profile (I tried Adobe RGB, ProPhoto RGB, and ColorMatch RGB), the profile is ignored, which is the behavior I'd expect for raw scan data.
Reading code comments, this appears to be intentional. However, it can be problematic when a file is actually linear but happens to be tagged as sRGB. For example, Nikon Scan has a bug where it tags all scans as sRGB even when color management is disabled and the files are raw linear scans. More generally, it's probably not that unusual for TIFFs to contain an embedded ICC profile for one reason or another.
Would it be possible to add an option to disable this behavior? Ideally, there could be a setting where the user specifies the input gamma (e.g. sRGB, gamma 2.2, gamma 1.8, etc.) so NegPy can convert it to linear when appropriate. At a minimum, having an option to force all input to be treated as linear would make it possible to work around incorrectly tagged files.
Here is an image from #555, the last one with an srgb tag renders noticeably brighter than the other two:
