One embodiment of the present invention provides a system that uses
nonlinear filtering while resizing an image to preserve sharp detail. The
system starts with an original image, which is a digital image comprised
of a plurality of pixels. Next, the system resizes the original image.
This involves first producing an initial resized image by using
neighboring pixel values in the original image (or a conventional
resizing operation) to produce initial values for subpixel locations in
the original image. The system then applies a nonlinear filter using
pixel values in the original and initial resized images to produce a
resized output image. When this nonlinear filter updates pixel values, it
weights the contributions of neighboring pixels nonlinearly. This
non-linear weighting of neighboring pixels can be used to significantly
reduce (or eliminate) the mixing pixel values from both sides of a sharp
edge caused by conventional linear filters, and can thereby alleviate the
problem of blurring sharp edges during image resizing operations.