Easy layer access for rgb8 filters.
Casper Boemann
cbr at boemann.dk
Mon Jan 17 15:28:21 CET 2005
On Monday 17 January 2005 14:51, Boudewijn Rempt wrote:
> > I don't think you know what you turned down. please read again
>> I thought you intended to update the extent whenever the iterator moves
> a single pixel? I'm not sure that the precondition for the other option
> does exist? Can we be sure that an iterator will always be walked all the
> way through? That's a contract that we cannot enforce.
>
> > Sure, but with the above suggestioon of mine - that you turned down, we
> > would gain both performance (better than current) AND exact fit. But it
> > does mean that iterators (in write mode) are assumed to truly affect
> > every pixel.
>
> But how can we make sure that that condition holds? If you think it won't
> be a problem, we can give it a try. As long as we can guarantee consistent
> behaviour for the user, I'm satisfied.
I don't think it'll be a problem, but we need to use the iterators correctly,
but with the rules you have set up now it shouldn't be a problem.
>
> > With you last suggestion we would have a problem if it is based on
> > transparency and we have a background color.
>
> Even a layer with a background colour doesn't need to exactly coincide with
> tile boundaries, does it?
Well the easy way of filling with background color whenever the layer is moved
is to set the default tile with the background color. That way we gain it
automatically. However that means that the extent is not updated. It also
means that the background is confined to tile boundries, though you'ld never
see this offcause.
We could also fill the layer actively with background whenever moved, and that
would update the extent. This would mean that the background is not confined
to tile boundries. This is a bit harder to implement, and also allocates a
lot more tiles.
Finally: photoshop only prefills the image with color - not individual layers
and it does not extend with background when (a copy of) the background layer
is moved (you cannot move the background layer, but duplicating it, and
deleting the background gives you a movable layer). We could fill the layer,
but not extend with background when moved.
I think we would want the second or third choice. (the third is what is
currently implemented)
best regards
Casper Boemann
More information about the kimageshop
mailing list