Back

Bilinear image resize

Mostly followed a scratchapixel tutorial

I'm not sure if this is what happens by default when using ctx.drawImage() and source and target sizes differ. The result looks similar.

There are jagged edges when resizing because there is no antialiasing function applied.

This demo could also upscale the image. Due to the layout of this page, I decided to cap it to a maximum value which is always smaller or equal to the original image.

Bilinear Image Resize
1 0
1 0
Checkmark