[Gimp-developer] Masks not very effective in 2.9 scheme script



Hi,

TL;DR - using masks in a 2.8 scheme script works as intended to
extract parts of an image, but after converting it for 2.9 it does
much less.

One of my interests is photos - particularly trains, and for that I
like to resurrect as much detail as possible.  Fortunately, I've
been taking raw photos for several years.  Towards 2 years ago I
found out how to use three versions of the same raw image : correct
exposure (for the intended subject), overexposed to add shadow
detail, similarly underexposed to restore the highlights.  For the
overexposed image I make a mask from itself, desaturated and
inverted, and for the underexposed one I just desaturate the mask.

At that time I was doing it all manually (and that still worked fine
when I last tried it in 2.9.4).  There is of course a problem with
this approach which may make it unsuitable for some uses - the
resulting image lacks contrast, but there are ways around that.

Eventually I decided that I wanted to script this.  By that stage I
had started to use 2.9.  I got the script working ok on another
machine using 2.8, but after making changes for 2.9.4 it seemed to
do almost nothing.  At that stage I was still hoping to make the
masks from the "correct" exposure (it sounded like the right thing,
but turns out to give "too much of everything").  I then simplified
the 2.8 script, used it, decided it was ok.  Somebody sent me fixes
for 2.9 (change NORMAL to NORMAL-MODE, and gimp-desaturate-full to
gimp-drawable-desaturate).

The 2.8 version, and some examples (with a faulty process! - I had
assumed the G'MIC tone mapping was similar to Advanced Tone Mapping,
Doh!) are at http://zarniwhoop.uk/three-exposures.html - the plugin
for 2.8 is linked from the bottom of that page.

BUT (at last!) this still does much less than in 2.8.  I've been
using git 14795c1f72 from 26th June.  By turning off the undo group
I've been able to look at steps along the way.  The problem shows in
the attached 800x602 example pngs when I do the shadow layer:  The
overexposed image, and the desaturated and inverted images I'm going
to use as the masks look the same, but when I apply the mask not
very much happens.

Originally I was going to attach some 800x602 pngs, but the list
would not let me do that (mail too big), so instead I've created a
temporary page showing the good 2.8 side by side with 2.9 :

http://zarniwhoop.uk/problem.html

The files are:

x-2.{8,9}-three.png - what the plugin produces.  In 2.9 it is not
very different from the base image without the plugin.

x-2.{8,9}-shadow-mask.png - the masks for the shadow layer (i.e.
for the overexposed image).  These appear to be similar, so the
different desaturate command is probably not an issue.

x-2.{8,9}-overexp.png - the overexposed image, after masking, with
the other layers deleted and then superimposed on a white background
to see it more clearly.  In 2.9 there is seems to be less of
everything.

I've also put links to the 2.8 and 2.9 scripts at the bottom left of
that page.

I notice that the file sizes of pngs from 2.9 are a lot bigger, but
I'm sure that you already know that.

From looking at the script you can probably tell that I don't
understand scheme, so maybe I'm doing things wrong - this was just
an attempt to convert my manual steps into a script.

Any suggestions, please ?

ĸen
-- 
I live in a city. I know sparrows from starlings.  After that
everything is a duck as far as I'm concerned.  -- Monstrous Regiment


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]