I wish to view tif files in python. I tried using PIL and resizing the image to fit the screen but the quality was poor.
im = image.resize((600, 950), Image.ANTIALIAS)
I converted the tif to jpg using Irfanview and resized the jpg and the quality was fine though the jpg file was 6 times larger at 1.6m compared with 250kB
In Irfanview I just ‘saved as’ without changing any default settings to obtain the jpg file.
Clearly Irfanview is doing something that PIL isn’t.
Most recommendations say that ANTIALIAS produces the best quality when resizing, are there other options?
Perhaps you have a palette color image (mode “P” in PIL). Antialiasing does not work well with those. Try
You can also try
BICUBICinstead ofANTIALIASand see which suits your image better.