Scale this image down to fit within a specific size.
Returns a new image. The image's aspect ratio is preserved.
The image is scaled to the maximum possible size that fits
within the bounds specified by nwidth and nheight.
This method uses a fast integer algorithm where each source
pixel contributes to exactly one target pixel.
May give aliasing artifacts if new size is close to old size.
Scale this image down to fit within a specific size. Returns a new image. The image's aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by
nwidth
andnheight
. This method uses a fast integer algorithm where each source pixel contributes to exactly one target pixel. May give aliasing artifacts if new size is close to old size.