PhotoFlow News and Updates

If I start GIMP-2.10 using my usual script which sets some variables, GIMP finds the darktable, RawTherapee, and PhotoFlow plug-ins.

If I start GIMP-2.10 by dragging an image file to my newly-created GIMP desktop file, GIMP finds the darktable and RawTherapee plug-ins, but not the PhotoFlow plug-in.The same is true if I start GIMP-2.10 by navigating to the prefix “bin” folder and clicking on the executable - GIMP finds the darktable and RawTherapee plug-ins, but not the PhotoFlow plug-in.

Is there a way allow GIMP to find the PhotoFlow plug-in while dragging/dropping to the GIMP desktop file (and/or by clicking directly on the GIMP executable?

I suspect that your RT and DT are installed in “official” places and can started without setting additional environment variables, while PhotoFlow is installed in a custom prefix, right?
Which variables do you set when launching GIMP with your script from the command line? I guess you should set the same variables when launching GIMP with the desktop file, otherwise the environment is not the same.

Actually RT, DT, and PF are all compiled from source and installed in /usr/local. But the PF plug-in software and GIMP are both installed in a custom prefix.

The usual “comple in a prefix” lines. But those lines aren’t actually needed to run GIMP installed in a prefix. It’s sufficient to just do “/path/to/gimp-prefix/bin/gimp-2.10” for RT and DT, and also valgrind and gdb don’t need the script.

Checking, it seems the only script line that PhotoFlow needs is this:

export LD_LIBRARY_PATH=$HOME/code-install/gimp210/install/lib:$LD_LIBRARY_PATH

Is there any way to add the above export command to the desktop file? I tried but it didn’t work.

I suppose I could add the above export command to one of my startup scripts, to run when starting “X”, but I’m not sure what that would do for running different versions of GIMP installed in different prefixes.

Is there a way you, or else the person compiling the plug-in, can add the LD_LIBRARY_PATH information to the plug-in code or compile switches so it gets compiled right inside the plug-in? I compile and install the PhotoFlow plug-in separately right inside each GIMP prefix, and I think this is necessary, yes?

This explains the sometimes mysteriously missing ability to use PhotoFlow from within GIMP - once I realized the script wasn’t necessary to start GIMP I’ve only used the script somewhat randomly :slight_smile:

This is indeed what I was expecting. Concerning a possible solution, I need to think about it.

Could you post the terminal messages you get when you run GIMP on the command without a script? I guess the PhF plugin will complain about missing libraries, and then I will have maybe a better clue of how to fix that…

Thanks!

Starting with the script:

$ code-install/gimp210/rungimp210
phf_gimp::query() called, exec_path=photoflow
stdout:
this is photoflow 0.2.8

Starting without the script:

$ code-install/gimp210/install/bin/gimp-2.10
/home/elle/code-install/gimp210/install/lib/gimp/2.0/plug-ins/phf_gimp: error while loading shared libraries: libgimp-2.0.so.0: cannot open shared object file: No such file or directory
code-install/gimp210/install/bin/gimp-2.10: LibGimpBase-WARNING: gimp-2.10: gimp_wire_read(): error
/home/elle/code-install/gimp210/install/lib/gimp/2.0/plug-ins/file-photoflow: error while loading shared libraries: libgimp-2.0.so.0: cannot open shared object file: No such file or directory
code-install/gimp210/install/bin/gimp-2.10: LibGimpBase-WARNING: gimp-2.10: gimp_wire_read(): error

Thanks! for checking into this. FWIW, the “gimp_wire_read” errors don’t keep GIMP itself from running properly.

I didn’t check but

When I open photoflow-w64-20181118_2031, nothing bad happens, but I noticed a lot of these messages.

I’ve opened the issue #178 on this.

@afre @phweyland
I had to update my Windows build environment last week, and got stuck with a stupid library inconsistency problem until yesterday… now I am back into business and I hope to provide a new Windows version for testing by tomorrow.

@afre do you have special characters in your file/folder names when you see those messages?

2 Likes

Nope. Just -s and_s at most. Windows hates special characters!

Yeah, Area WB is definitely wonky. When I open a raw file and go straight to the selection, the pencil is already enabled and it works as expected. Any other time, including revisiting the file via a PFI, the box is either invisible or not interactable, or one corner node is visible at the top-left corner of the preview image.

@afre @Elle

I have found a bug in the way the corners of the Area WB rectangles were saved in the .pfi files, which explains why upon re-opening a file the rectangles were not visible or behaving in a strange way.

I still have to do more extensive tests of the rest, but maybe you can already provide me feedback wether this specific problem is fixed or not for you?

Meanwhile, I have added two more tools to the PhF arsenal:

  • a random noise generator, that can create a perceptually flat random distribution of pixels even when working on linear RGB data. It is found in the “Color” group
  • an implementation of the “guided filter” derived from RawTherapee. which allows to efficiently do edge-preserving preudo-gaussian blurs. It is found in the “Details” section.
2 Likes

It isn’t fixed yet. There are many cases where it doesn’t work as expected. E.g., if I use samplers, it doesn’t work.

Could you describe the problem better? I have tried to reproduce issues with AreaWB + samplers, but in my case everything seemed to behave as expected…

Thanks!

I have just committed an improved version of the local contrast tool.

This new version uses the guided filter as the blur operator to extract and enhance the high-frequency details.

The new version has three controls:

  • amount: adjusts the strength of the local contrast enhancement/suppression. A value of “0” gives the blurred image, “100” gives the original image, values <100 give an image softer than the original, and finally values >100 enhance the local contrast
  • radius: the radius of the underlying guided blur
  • threshold: the threshold of the guided blur to distinguish between strong edges and fine texture. The lower the value, the finer are the textures that are preserved

02

The suggested workflow is the following:

  1. set amount to “0”, and adjust the radius and threshold until you see smooth textures but at the same time the strong edges (for which you do not want visible halos) are not blurred
  2. set the amount to “150”
  3. adjust to your taste around this value

Used with moderation, I find that this tool can give a significant “pop” to some pictures without creating “fake” results. I have for example used it to enhance the fur of the jumping spider in my most recent picture.

Suggestions are welcome as usual!

1 Like

It is difficult to describe because the behaviour is inconsistent. If I turn on a sampler before I attempt Area WB, the Area rectangle control doesn’t appear. Except, now it does in the latest commit…

This last trial, the rectangle sometimes disappears and isn’t just invisible. I cannot access the rectangle or select the ROI for Area WB. Try doing the following:

1. Add another layer such as “tone mapping”.
2. Have the “raw developer” and “tone mapping” modules float.
3. Try different combinations of toggling the “tone mapping” layer, selecting either layer and toggling their respective edit pencils.

I know that there might be a state where the rectangle should be gone but right now the behaviour for #1-3 is unpredictable. Feels like the rectangle control randomly goes away and becomes inaccessible, leaving me scratching my head and giving up. Seems to me it is somehow getting better. At least, I was able to use Area WB for one of the recent PlayRaws.

I tried to use the Area white balance today. I never did set any Sample Points. The Area rectangle just didn’t want to appear. So I gave up and closed PhotoFlow. I haven’t updated recently, if that matters.

I often want to pixel peep more than 100%, something that I noticed that PF didn’t have right off the bat, but didn’t request it because it was a minor quibble. I don’t need interpolation, just bigger pixels. :slight_smile:

PS Zooming is particularly useful when I am using the defringe tool. I have trouble seeing and adjusting it without a huge zoom, often having to turn to RT (which is not a bad thing :stuck_out_tongue:) or exporting the image for examination in G’MIC.


PPS :thinking: Looks like something is wrong with the defringe tool. I exported 2 images, one without and the other with defringe. When I take the difference between the two, I get this. PFI: 20180603_140157.pfi (17.7 KB). Raw from [Play Raw] Peaceful mountain view.

PhotoFlow: left without defringe; right with it differenced and equalized (boosted).

pf_defringe

RawTherapee: left without defringe; right with it differenced and equalized (no boost).

rt_defringe

Looks like the defringing is only occurring in the brightest regions and not even the edges.

PhotoFlow: left without defringe; right with it differenced and equalized (boosted).

@afre @Elle I have just committed some improvements. Hopefully now the area WB will be more usable, as the rectangle with the target area should be visible whenever the RAW developer layer is selected.
I’d be very much interested to know if you find the new behaviour more intuitive than the previous…

I have also added the possibility to zoom in the image beyond 1:1, actually up to 800%. Pixel peepers will be happy!!!

I still need to look into the defringe tool problems, it’s the next item on the list.

Area WB seems to work now.

The edit mode still needs some work. When I am using Area WB and try to toggle the edit pencil, it turns off briefly and then goes back on. The off and on makes PF go into processing twice, when nothing should be happening. The processing also happens when toggling the edit pencil in modules that don’t need the edit mode. (Ideally, the expected behaviour would be for the rectangle to be active only when the WB tab of the module is active.)

Lastly, it would be great to have a percent zoom status.


PS In the meantime, I have been using RT’s (dev) Raw > Chromatic Aberration and Detail > Defringe tools, which are both quite agreeable, if you wish to see what is going on there.