|
From: Ivan N. <in...@pd...> - 2005-11-10 20:50:38
|
Hello Maxim, The change I mentioned would still allow for use of the background color property (actually you will be able to use background color property, without side effects such as the border 'red gradient' I described in my previous email). In the code responsible for processing edge pixels (i.e. generate method in imagefilters) there are two cases: A) One case interpolates between the edge pixel and the background property. B) The other case (for segment pixels outside of image extents x<-1 || y<-1 || x>maxx || y>mayy) uses background color directly without any interpolation with edge pixels. I am saying that case A) should be modified so that there is no interpolation with background color property but that the edge pixel is just copied (most likely without any interpolation). Please note that the image really does not need to be extended, and that edge pixels are simply copied instead of interpolation them with the border color. The same idea applies to corners (the same corner pixel color is 'copied' in all required directions). Ivan ------------ From: Maxim Shemanarev <mcs...@ya...> Subject: Re: [AGG] RE: image-filtering bug > I must disagree with you. I like to think that a uniform (even 1x1) > surface should stay that way when stretched and that there should be > no blending with the transparent surroundings. Maybe we should come > up with a way of doing both ? Well, the problem is how to treat the corners. Note that with higher degree filters we need to propagete the edges to more than one pixel, so that the corners become squares. But the major problem is that AGG allows for rendering of arbitrary part of the image, including the out of bounds part. Play with image_transforms.cpp: Set option "2", check "Rotate Image" and drag the central green circle. If we propagate the edge pixels the rresult will not be as you expect. I suppose, if you need this propagation, you just prepare the source image in such a way before rendering. I agree it can be automated, but not in the filtering functions themselves. |