Release of G'MIC 1.6.8

OK, this should be fixed as well (had to add two new parameters anyway).

It works correct now. That’s incredibly fast and super, super magnifique. :+1:

Thanks David, Color Balance indeed appears to be fixed. Color grading appears to be the same as before (ie. preview differs a lot from result)… perhaps you read my message before the edit.

Yes I hadn’t seen your edit. Actually, the color grading filter has been implemented by John Lakkas, and I don’t know if his code can be easily fixed so that the preview matches the final result.
Writing a filter that has a precise preview often requires special attentions. This is definitely not an easy task. I’ll let John manage his own filter sources, as I already manage mine (more than 300 :slight_smile: ), and as you can imagine, this is already a lot of work!
I’ll write him a mail about this problem.

Ah, I didn’t notice that. Thanks for letting him know.

I have found yet another bug ! :slight_smile:
This one is not with filters though, it’s in the gimp plugin itself, as far as I can tell.

Summary: Last gmic filter can only be repeated once using GIMP ‘Repeat filter’ command

Steps to reproduce:

  • Open an image in GIMP
  • Bring GMIC up, select Repair->Bilateral smooth filter.
  • Click OK to apply it
  • Check that the image has changed. It should have.
  • Use the Filters->Repeat last command ( I remember it has having shortcut F2 but may be wrong – I have customized my GIMP shortcuts.)
  • The filter is correctly re-applied (first re-application)
  • Use the Filters->Repeat last command, again.
  • the ‘gmic’ progress bar comes up, but the filter is not reapplied (second re-application)

My best guess at the cause of this, is that GMIC is resetting its stored data about the last command that was run – perhaps to the command that is being used to do the repetition?

Ah, yes, thank for reporting.
This is a regression.

The following commit fixes the issue : https://github.com/dtschump/gmic-minimal/commit/a2ee332041c1eddcb09c1fa36e89c41ede4abb90

Thanks.

Got another one specific to the GIMP plugin here…

Some filters destroy the current selection, for no apparent reason. For example, Local Variance Normalization, Freaky Details, Mighty details, Portrait Retouching, Sharpen [deblur, gold-meinel, inverse diffusion], Simple Local Contrast, Spotify, Texture Enhance…

These particular filters also demonstrate another undesirable effect: when an area is selected, the output image is changed to the rectangular bounds of the image. I can understand if that is complicated to manage, I just thought that in these conditions:

  • Input layers is set to default / ‘active’.
  • output mode is set to default / ‘replace’
  • There is an active selection
  • A filter outputs one image that is smaller than the source image, but matches exactly the size of the selection bounds

Then some kind of generic, filter-agnostic handling might be possible (blend the output image onto the active layer according to the selection mask, with the upper-left corner of the output positioned at the upper-left corner of the selection bound; and of course, preserve the selection mask.)

Since there are actually quite a few filters having this type of problem, a solution that would work for most of them would be a big help.

A simple test case:

  • load a photo
  • use Ellipse select to select a small area in the middle of the photo that you want to modify.
  • Apply one of the above filters
  • Only the area of the image containing that ellipse is now shown; and the elliptical selection has been removed.

I’m a bit surprised. It works flawlessly for me, on GIMP 2.8.
Maybe this happens only on GIMP 2.9 ?

EDIT : just tested with GIMP 2.9, and it works too.

To illustrate what I mean :

Interesting.

I am using Gimp 2.8. I wish I could use GMIC on GIMP 2.9! But all I have gotten from my attempts to compile GMIC for 2.9 is crashes (and GIMP 2.9 has other serious problems such as tablet input not working at all if it’s using evdev driver, so I prefer to ignore 2.9 for now.)

Anyway that’s an aside expressing my frustration;)

To be precise:

  • GIMP 2.8.15 (installed Aug 14, 1:19pm. Probably commit 597fae39b4911b6e6e201e711f6de86cb6548f10)
  • Running on Arch Linux x86_64
  • Development version of GMIC – installed Nov 12, 10:24am, so, I guess, either commit b3663db348f8fab2f9a824b059b8125879205895 or commit 4c50c1ae9bfa09a919c0899c362742d129c5b3ca

I’ll try updating my builds of both GIMP and GMIC, and report back. I should mention that this particular issue has affected me for basically the entire time I’ve used GMIC ever, so it’s not a new issue, I just finally decided to report it.

EDIT: Ah, I reproduced the behaviour you are showing. You are working on an RGB image. Indeed, with an RGB image there is no problem. Try converting the image to Grayscale mode (Image->Mode->Grayscale) before you run the filter.

Ah correct ! Thanks for noticing that, I’ll fix it asap. :slight_smile:

It looks better now, after :

https://github.com/dtschump/gmic-minimal/commit/10258b4e90b6a78bc36d9301f7a72713ff6598f3

Yeah, works well :slight_smile:
Another little bug report: I’m not sure if it relates to channels-application in general or only to Morphological filter, as I seem to recall encountering it with other filters.

Anyway, it is:

  1. Load a greyscale image in GIMP
  2. Make sure it has an alpha channel (via Layer->Transparency->Add Alpha Channel, and probably also erase some parts so there is actual variation in Alpha channel)
  3. Select Morphological filter, with settings “opening”, 2, Octagonal, RGBA(alpha).
  4. Apply the filter.

Result: Alpha channel is correctly filtered AFAICs;Greyscale channel is darkened (easily seen by repeating the filter)

Doing the same operation on an RGBA image works correctly (no channels are unexpectedly darkened).

I suppose selecting RGBA (alpha) on a greyscale image is a bit strange, but there is no YA (alpha) option, and I believe it still makes sense to do so.

Thanks David for reporting!
Commit :
https://github.com/dtschump/gmic-minimal/commit/8657aa0f873a6617f3d8637a476e17cb68a278d1

should fixes this bug.

Hi David, may I ask you a link to your web page ?
I’d like to add you as a contributor to the G’MIC project for your numerous bug reports! :smile:

Haha, thanks :smile: Personally I think that my github profile would be the most relevant link to GMIC users, since it links a collection of gimp plugins and my GMIC stuff will eventually go up there too. I don’t currently have anything more personalized than that.

Guess what, I have another.

I think this is also GIMP-plugin-specific.

’Colorize (Interactive)’ interacts badly with selection

Steps:

  1. Select region in middle of picture
  2. Open GMIC, select ‘Colorize (interactive)’
  3. The selected rectangle is shown, as expected
  4. Put some color marks down
  5. Hit Enter to process fullres

Result: the output is a layer, positioned at top left of the full image, which is empty in regions outside the selection, and has content inside any area that is within the selection. This content is placed as if the selected region were in top left of the picture; to align it with the content it is supposed to be colorizing you will usually need to move it down and to the right.

In case the previous paragraph is unclear, there is a visual demo here

Expected result: The output is first aligned to the top left corner of the selection, and then masked. Alternatively, generate results matching the size of the full image, in which case masking it by the selection should also produce a correct result.

EDIT: Have tested in both RGB and Greyscale modes, same result.

Hi David.

There must be something else… I’ve reproduced your steps and it works for me, both in RGB and color.


Tried with an alpha and without. Works the same.
Only when I select ‘2 output layers’ makes a difference (the image is entirely replaced by the processed selection instead), but this is somehow “technically” intended.

Hmm… I should have specified the settings I used:

  • Output: New layer
  • Input Type: Lineart
  • Output Type: Colors only (1 layer)
  • View Resolution: Medium

I was accessing it via a bookmark, but accessing it directly in Black+White section has the same result.
I can provide a test image, but AFAICT it occurs for all images (I just made a new white image and scribbled some black lines, it had just the same problem there.)

Since you mentioned testing with and without alpha, I checked that too; it makes no difference.

I also checked all ‘output type’ options, it occurs for all of them.

Version of GMIC is git c995d4d; I’ll upgrade to the latest when possible.
Version of GIMP is git 586d698 (2.8 branch).

Anyhow it is more of an inconvenience than a major problem; I can work around it by selecting ‘output = new image’, copying the resulting image, and using GIMP’s ‘Paste Into’ command to insert it into the selected pixels.

OK that was the ‘New layer’ option that allows to reproduce the bug.
Thanks, I’ll investigate that !