Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crop makes image areas burned-white (haze removal) #17358

Open
franckmee opened this issue Aug 23, 2024 · 11 comments
Open

Crop makes image areas burned-white (haze removal) #17358

franckmee opened this issue Aug 23, 2024 · 11 comments
Assignees

Comments

@franckmee
Copy link

Describe the bug

Here is a bug I never had on any picture before : my spider had lots of white-washed areas that did NOT appear on preview.

Trying to work around the problem, I tried quitting&restarting and modifying export color profile with no luck.
I then tried de-activating modules. De-activating cropping resolved the issue: the uncropped 4000px (my usual export size) image looks like it did in the preview. Re-activating the crop tool produces the burnt areas again.

The export size also appears to play a part in this: both full size (cropped or not) pictures have some burnt areas, cropped 4000px picture has huge burnt areas, uncropped 4000px looks like the preview, uncropped 2000px looks just a bit lighter than the preview, cropped 2000px looks like the preview. So it seems there's actually a weird relationship between crop size and export size.

The joined file contains original raw and xmp files, a screenshot of the Darktable preview, and exports at 2000px, 4000px and full size of both the original frame and the cropped one.

Steps to reproduce

  1. Load the provided picture with the provided parameters.
  2. Export the picture, 4000 px wide.
  3. Compare exported JPEG to preview.

Expected behavior

The exported file should look like the preview, however cropped and whatever the export size

Logfile | Screenshot | Screencast

Darktable preview
Darktable_preview

Exported file
DSC08022_cropped_4000

Log file from darktable -d common
araignee_common.log

A zip file with original raw and xmp files is available here

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

4.8.0

What OS are you using?

Linux

What is the version of your OS?

Linux Mint 21.3 Cinnamon

Describe your system?

No response

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

NVIDIA GeForce GTX 1060 with Max-Q Design, 6 Go, driver 535.183.01

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

@ptilopteri
Copy link

ptilopteri commented Aug 23, 2024 via email

@MStraeten
Copy link
Collaborator

reproduceable on mac
@ptilopteri : darkroom doesn't display the embedded jpg but the processed image.
even switching to high quality processing gives a proper result in darkroom but that blown areas in the exported jpg after activating crop

@MStraeten
Copy link
Collaborator

btw: scaling down the export (e.g. 90%) gives a proper result as long as high quality resampling isn't activated

@jenshannoschwalm
Copy link
Collaborator

jenshannoschwalm commented Aug 23, 2024

@franckmee would you share the raw file plus xmp to investigate?
EDIT : Sorry, got both.

@MStraeten you're on master I guess?

@jenshannoschwalm jenshannoschwalm self-assigned this Aug 23, 2024
@ralfbrown ralfbrown added the scope: image processing correcting pixels label Aug 23, 2024
@jenshannoschwalm
Copy link
Collaborator

@franckmee the bad boy is our old friend "haze removal". It calculates some intermediate data from all available areas and does some maths using this intermediate stuff. If other parts of the image are almost black with the almost-white spider this fails. You may even see "inconsistent .." mesaages appearing.

So, a restriction of that module which is pretty difficult to fix due to the algorithm.
BTW i don't understand why you want to use that module here, there is no haze :-) Diffuse&sharpen might be better suited.

Overall, for me not a bug.

@MStraeten
Copy link
Collaborator

yes I’m on master

I’d expect that at least when using the high quality processing the output in darkroom shouldn’t differ from the exported image. Even this might be an edge case this raises the question if there’s a need for a wysiwyg preview mode (like softproof)

@jenshannoschwalm
Copy link
Collaborator

I’d expect that at least when using the high quality processing the output in darkroom shouldn’t differ from the exported image.

The problem is: the mentioned intermediate step happens in the preview pipe iirc.

I looked up that module some time ago when checking #16925 and there seems to be no immediate fix.
You wanna have a look?

@franckmee
Copy link
Author

@franckmee the bad boy is our old friend "haze removal". It calculates some intermediate data from all available areas and does some maths using this intermediate stuff. If other parts of the image are almost black with the almost-white spider this fails. You may even see "inconsistent .." mesaages appearing.

Ok, thanks for the tip and teh explanation!
I still think preview should match the export, but I do understand this module has an unusual behavior that make things complicated.

BTW i don't understand why you want to use that module here, there is no haze :-)

I take LOTS of pics in which atmospheric haze is a problem, so it's actually active in my default presets. For this particular image it is indeed not needed! :)

Thanks to everyone who took time to answer,

@MStraeten
Copy link
Collaborator

as @jenshannoschwalm suggested, try to use diffuse&sharpen instead - might need some time to find an appropriate default setting, but less hassle afterwards …

@MStraeten
Copy link
Collaborator

quite interesting side effect: when ISO 12646 Mode is enabled - the effect is visible in the darkroom main edit frame

@jenshannoschwalm jenshannoschwalm changed the title Crop makes image areas burned-white (not in preview) Crop makes image areas burned-white (haze removal) Aug 26, 2024
Copy link

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants