Zack Weinberg wrote:
The heuristic that comes to mind is to enable interpolation only for images that are not being scaled up by more than 10% or so of their natural size.
Here is a better approach that has correct limits and also handles non-uniform scaling and rotation.
Note that the source bitmap defines a function of two real (not integer!) variables (xdest and ydest) that has a constant value in each rectangle corresponding to a source pixel (and discontinuities at the edges of source pixels). The value of the destination pixel should be the integral from this (piecewise-constant) function over the area covered by this destination pixel.
-- Alexander E. Patrakov -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

