-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Avoid roi_in over-expanding #15885
Avoid roi_in over-expanding #15885
Conversation
I tested the PR on windows 11 and it works as when using the 0/1080 values. The issue with 1/1080 is still happening. I will start a new Issue for it. Basically the scale is being calculated as a very small number (close to zero), so the resulting image is too small.
|
Yes, that's an UI issue for me. We should always restrict exported image sizes to something meaningful. |
I was thinking of using the range limit in the field, but 0 is a valid number. I'm thinking it is not a significant issue. I will just leave it alone. |
Due to imprecisions or ceil functions we might set roi_in size to be larger than what we provide via piece->buf_in.width/height. Relevant for modules that do scaling in the pipe like demosaic or finalscale. Also ensure a minimal size to avoid crashes.
7b6a886
to
5689ff7
Compare
Latest squash-force-pushed commit ensures a minimal size to be processed to avoid crashing and finish the export pipe. |
@jenshannoschwalm : If I read this correctly we now do not allow to export a picture smaller than 16 x 16. Right? |
Yes. It is not a bad restriction - at least i think so. Also it doesn't make sense for most algos. Let me know if you don't agree. |
I fully agree, just to be sure I'm understanding the code properly. |
Thanks, merged in master and darktable-4.6.x branch. |
Release note for 4.6 and 4.6 Fix spurious crashes while exporting to some output sizes |
Due to imprecisions or ceil functions we might set roi_in size to be larger than what we provide via piece->buf_in.width/height.
Relevant for modules that do scaling in the pipe like demosaic or finalscale.
Fixes #15876
We might want to do all these "safety checks" not in the module's code but in pixelpipe while we do all the modify roi_in calls, as this PR is meant for 4.6 and 4.8 branch just this fix.
While being here it doesn't hurt to fix some comments too.