With the new resampling_algorithm query parameter, the /resize endpoint now allows you to choose the resampling algorithm. In image processing, resampling can be refered to the process of changing the dimentions of an image by changing the number of pixels 1, unlike resizing, which changes the dimentions without changing the number pixels 2. Although both processes refer to different ways of scaling an image, resizing is sometimes used to refer to both, for simplification matters. Apologies about the confusion here, but the /resize enpoint of imager200 does resampling and not resizing, and this is the reason why, resampling_algorithm parameter makes sens in this context. Choosing which resampling algorithm is kind of an advanced subject, and only needed if there is special quality requirements when resizing an image.

Because changing an image’s pixels a has a direct impact on the image resolution, and therefore affects the visual quality of an image, research has led to the emergence of several resampling algorithms (or sometimes refer to as filters) that may or may not have a noticeable difference when compared. This Wikipedia entry compares between some well-known resampling methods. From the long list of available methods, imager200 supports 5 currently: Lanczos(default one), Linear, Box, Nearest Neighbor, and Catmull-Rom.

Checkout the resize endpoints api docs, for more details about the resampling_algorithm query parameter.

To conclude, here is a comparison between different resampling methods tested using imager200 API.

Original

Lanczos Linear Box Nearest Neighbor Catmull-Rom
Lanczos Linear Box Nearest Neighbor Catmull-Rom

Hoping this comes useful!

References: