[reposting] On Thu, Jun 26, 2008 at 2:31 PM, Øyvind Kolås <pippin@xxxxxxxx> wrote: > Formulated like that, this is GIMPs problem not GEGLs problem, one way > to achieve this is to crop the resulting image to the pre-extended > extents, I suspect that the result on the edges by doing this, will be > roughly equivalent to what you get in GIMP when blurring a > layer/rectangular selection etc. i doubt that. Consider a box-blur with radius = 1. A corner pixel will be the average of 4 image pixels and 5 abyss pixels. With larger radii the result gets deteriorated worse by larger fractions of abyss. > Another option is to define a new operation that doesn't grow, that > also encodes the edge/abyss behavior (I hve written som GEGL > operations based on random sampling of the neighbourhood that discards > the random sample if it falls outside the defined area and does > another random one instead). yes, that's what i'm thinking about. The only way to achieve high quality results for border pixels is to implement the edge handling in the filter itself. The current "blur to abyss"-behaviour will be supported by specifying an accordingly bigger bounding box (some additional copying might be involved). Sadly, this requires more complicated bounding box handling as this somehow infiltrates GEGL with the layer concept in disguise. Just limiting the filter to the source's bounding box might yield unexpected results if the source is a composition. For example, an overlay of two smaller nodes might look like this: *--*--------* | | | *--* *--* | | | *--------*--* (where the outer rectangle is the bounding box of the resulting composition and the smaller inner rectangles denote the source bounding boxes) Blurring this composition will fuzzy the inner edges while the outer edges stay crisp. If this result is undesired, some superordinate instance must enlarge the composition's bounding box prior to blurring. Down that path probably lies madness. Anyhow, implementing these filters as new operations solves the problem for now. Having two kinds of gaussian blur seems awkward at first, but it is a user choice which edges to blur and not GEGL's. The filter pairs can be merged later on by implementing one as a meta operation of the other or simply by an option property like "preserve bounding box". I'll derive the new filters from GeglOperationEdgedAreaFilter if no better naming comes up. For the filters probably: gaussian-blur-edged, box-blur-edged greetings, peter _______________________________________________ Gegl-developer mailing list Gegl-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer