Keith Packard <[EMAIL PROTECTED]> writes:
> > Edge conditions are definitely the hard part of the specification; consider
> > a straight scale of a solid rectangle from 100x100 pixels by a ratio
> > of 75/100. The desired result is obvious ... a 75x75 pixel solid square
> > with hard edges.
>
> Both nearest neighbor and bilinear interpolation will yield this result.
This example and my last mail were making things too complicated.
Lets take a *very* simple example - scaling a 1x1 solid colored
constant square to 3x3 with bilinear interpolation and compositing it on
a 3x3 destination image.
Originally we have alpha values:
1
When scaled to 3x3 with bilinear interpolation, using
the "all pixels outside the image are transparent rule",
we get:
0.44 0.66 0.44
0.66 1 0.66
0.44 0.66 0.44
I don't think this is a terribly useful result.
(You don't have to get as complicated as my partial-convolution
suggestion to fix this ... a simpler rule is to simply clamp
source pixel coordinates to the bounds of the original image.)
Regards,
Owen
_______________________________________________
Render mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/render