[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gimp-developer
Subject:    [Gimp-developer] Converting Plug-ins
From:       Gregg Hauser <ghausermarch () gmail ! com>
Date:       2016-07-13 22:02:38
Message-ID: 5a4833a5-b248-5b9e-43af-69ba548ffb47 () gmail ! com
[Download RAW message or body]

I'm investigating converting existing plug-ins from 2.8 to use GEGL.

It appears that one would implement the calculations in GEGL, leave the 
interface and parameter input code pretty much as is, and then pass the 
parameters to the GEGL code from GIMP plug-in code (making two plug-ins, 
actually). Am I missing something?

Handling previews effectively seems like a task better left to GEGL or a 
generalized GIMP callback than being done in each plug-in.

Algorithm question, using despeckle.c as a starting point:

The "median" algorithm uses luminance of the pixels around the point of 
interest, creates a histogram of 256 levels of luminance, throws those 
below and above a user specified threshold out, finds the median level 
of luminance, and then chooses randomly from the pixels that have that 
level of luminance. This would seem to choose a random color with an 
appropriate luminance from the region. Seems to me this makes the 
algorithm useful for gray scale images that are not black and white. Only

The literature is full of other despeckle algorithms. The code itself 
mentions 4, including "adaptive" but appears to implement none of them. 
Handling the following all seem worthy at some point 1) black/white 
images, 2) maintaining detail and contrast while smoothing larger areas 
of more closely matching pixels, 3) separating luminance or value from 
color.

Questions:

Is renaming for example despeckle to despleckle-median easy to do in the 
future or is it somehow easier during the initial conversion process? My 
own preference would be to use a new more specific name in GEGL and keep 
the old despeckle name for now in GIMP, though adding a method parameter 
could also work for the GEGL code.

If I do take on a conversion, is it acceptable if I include comments 
explaining the algorithm, or will they just be deleted?

If I include comments about when the algorithm seems useful, will those 
just be deleted?

_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic