[Image-SIG] Upsample an image
Fredrik Lundh
fredrik at pythonware.com
Fri Jun 9 15:06:23 CEST 2006
Fredrik Lundh wrote:
>> When I tried downsample an image using im.resize and then upsampled it to
>> get to the original size, it looked a bit blurry and lost a lot of details.
>
> that's expected: if you downsample an image, you lose information. once
> lost, there's no way to get it back.
footnote: if you're e.g. implementing an image display tool, the right
solution is to keep resampling/transforming from the same source image:
original = Image.open(...)
# (re)draw
display_im = original.resize(display_size)
render_to_screen(display_im)
instead of resizing the same image over and over again:
image = Image.open(...)
# (re)draw
image = image.resize(display_size)
render_to_screen(image)
</F>
More information about the Image-SIG
mailing list