What is resizing?

Simple question. I realize that I can resize an image to new dimensions. What exactly is happening when I resize an image using Resize. Is it averaging/rounding pixels, is it selecting one pixel in the middle of a cluster? Is there a parameter that gives me control on the definition of Resize?

Hi Aaron,
You can find out what any of the fast.ai functions does with e.g. doc(Resize) There is a link to the documentation.


In the documentation there is even a link to the source:

As far as I can tell there are several parameters for resizing.
By default it will only crop the image without any need for averaging.
It seems like the resize function of the PIL Image class is used for “lossy” resizing, where a resampling method can be specified. Check it out:
1 Like