Re: [Gegl-developer] Masks for image op

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

 



On Fri, Feb 21, 2003 at 10:30:02PM -0800, Daniel Rogers wrote:
> Hmm, It is unclear to me how to add a mask input to an image op.  Could 
> someone answer these questions for me:
> 
> Is the mask rectangular?

> Is it simply connected?
> 
> Is it binary?
> 
> If it's not binary, how should one blend the mask and image before 
> operating?

It would be an additional grayscale image data input to ImageOp.  It 
interpolates between the Op's full 100% normal operation (where the mask 
is 1.0) and where the Op is masked out so that the image is not affected 
(where the mask is 0.0).   

> I am kinda thinking that it might be easier to include a mask channel in 
> the ImageData, and use the scanline accessor functions to to snark the 
> image data that is not covered by the mask.  This could be implemented 
> with no change to the existing ops, since they only work on a single 
> scanline at a time.  All the work would be done in the scanline accessor 
> function, which wouldn't pass data that was masked.

I dont think it goes as an additional channel in an ImageData (or
an Image) object.

But I guess the choice is whether it is something that individual ops
handle, or whether it is a post/pre processing step that something
like ImageOp (or an appropriate or subclass, like scanline accessor) 
handles. 

Calvin 

[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux