Fill_painter broken and colordistance in autolayer

Bart Coppens kde at bartcoppens.be
Mon Dec 27 15:50:26 CET 2004


Quoting Casper Boemann <cbr at boemann.dk>:  
> the flood fill part of fill_painter is disabled in the autolayer branch. 
> Could I ask the current maintainer (adrian ?) to take a look and perhabs 
> make the changes nessesary to bring it back to life. I would gladly answer 
> any questions needed, 
 
I've had a quick look at the changes in your branch, and at first sight it 
doesn't seem too difficult to make those changes work. The only thing that 
comes to my mind is how I should deal with the size of the layer. Currently, 
I'm using an array the size of the layer I'm filling, where I store whether 
that pixel has been filled or not. 
Now is there a way to get some estimates on how big the current layer is, not 
only for this array, but also for having a limit on how much to fill? (imagine 
filling a blank layer, without knowing its size). Currently, the code uses the 
regular iterators with a '-1' for width, but I don't see your code supporting 
that? 
  
> Also the difference function (that measures colordistance) is not colormodel  
> independent. Even though rgb,cmyk and cie-xyz are afine transforms the  
> distance may not be of the same magnitude, and when talking of lab,hsv  
> colorspaces the distance is not even an afine transform. So we need   
> colordistance to be a function of the color_strategy. (so that independent  
> of colorspace the distance is measured in say lab distance or cie-xyz  
> distance) 
 
I am aware of that, but because I didn't know what else to do with it, I put 
it temporarily in the filling code. If you've got an idea on how to fix this, 
feel free to implement it :-) 
 
 
Bart Coppens 


More information about the kimageshop mailing list