aferrero2707 / PhotoFlow

A fully non-destructive photo retouching program providing a complete layer-based workflow including RAW image development.
http://aferrero2707.github.io/PhotoFlow
GNU General Public License v3.0
308 stars 36 forks source link

Crash when selecting input source in a mask layer #181

Closed phweyland closed 5 years ago

phweyland commented 5 years ago

Wanted to reuse the mask of the previous local contrast, invert it and set up a new local contrast image

When I tick show mask, no mask appears. When I untick show mask pf crashes.

I've run gdb, the behaviour is a bit different. Doesn't crash on untick show mask, but does when untick invert mask.

PhotoFlow-01.txt 20181105_Agde_069.jpg.pfi.txt

using today pf build. Let me know if you need anything else.

phweyland commented 5 years ago

This one is crashing when I open the pfi without gdb.

With gdb the file opens, but pf crashes when I uncheck show mask. image

PhotoFlow-02.txt

20181105_Agde_069.jpg.pfi.txt

aferrero2707 commented 5 years ago

There must be still a bug in the input source selection...

I will try to reproduce the crash. Meanwhile, could you please try inserting an explicit layer clone below the "invert" layer, and see if it works as expected?

Thanks!

phweyland commented 5 years ago

I've added the clone layer, set the "mask sky" as input source, and set on "mask sea" the previous layer as input source. When I check show mask nothing appears. But crashes when uncheck (I think it crashed on the second time I unchecked ....)

image PhotoFlow-03.txt

aferrero2707 commented 5 years ago

I could reproduce the problem with your sample .pfi, and I'm investigating...

I was however able to modify the .pfi with my suggestion, and make it behave as expected. To fix the initially broken stack, I did the following:

Now if you go back into the mask, it should be possible to toggle the mask visibility and see the correct result... Here is my final arrangement for the mask:

screen shot 2018-12-16 at 10 12 43
phweyland commented 5 years ago

Great ! with clone layer that works ! :-) Thank you However I had to delete the topmost contrast layer and build it following your method. Maybe there was something wrong in my pfi. When I opened it the clone layer did appear on top. I've moved it on the bottom, but each time I leave and come back to mask view, the clone layer was back on top... like this: image Thanks !

aferrero2707 commented 5 years ago

I'm currently fixing the problem with the input source selection for mask layers... hopefully your initial idea will be working properly in a short while. Will let you know here before closing the issue.

phweyland commented 5 years ago

Thanks so much. I don't know if that's related but opening this pfi is endless (seems to process several times). In any case it's much faster to disable the group and each component, then enable the group and components one by one (I can share the raw if needed). 20181105_Agde_069.jpg.pfi.txt

EDIT: no, probably not related ... if I disable the bilateral blurr it's much faster.

aferrero2707 commented 5 years ago

@phweyland bilateral blur is definitely not optimized, and in fact I am replacing it with the "guided filter" from RawTherapee. According to the literature, it provides better transitions between smooth areas and sharp edges, and moreover is is significantly faster...

The new "local contrast" tool is actually based on the guided filter.

aferrero2707 commented 5 years ago

@phweyland I have just committed a fix of your initial issue (crash when selecting an input source for the invert tool). Pre-compiled packages should be available in less than one hour... could you please check if the new code works correctly for you as well?

Thanks!

phweyland commented 5 years ago

Yes, I can now set a previous mask in "invert layer" different than a "clone layer" without trouble when I enable/disable show mask. Thanks!

aferrero2707 commented 5 years ago

Closing issue, fixed with 94b681ba0cc4afa26a56eb57fc3b8bbed475456f.