Skip to content

Add the ability to choose the interpolation mode when resizing an image #1057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jSdCool
Copy link

@jSdCool jSdCool commented Apr 22, 2025

Added the ability to choose witch interpolation mode to use when resizing an image.

To do this there is a new overload for PImage.resize() that takes 3 ints (width, height, interpolation mode) there are also 3 new PConstants for the mode they are: NEAREST_NEIGHBOR, BILINEAR, and BICUBIC. They have a value of 0 1 and 2 respectively.

This has been accomplished by utilizing the different interpolation modes provided by the java awt library that was already used for resizing images.

benfry and others added 4 commits October 3, 2023 22:14
…zing an image.

to do this there is a new overload for PImage.resize() that takes 3 ints(width,height,interpolation mode)
there are also 3 new PConstants for the mode they are: NEAREST_NEIGHBOR, BILINEAR, and BICUBIC
@Stefterv
Copy link
Collaborator

Hi @jSdCool Thank you for the contribution, a few things of note:

  • Please make sure your PR is based on the new repo and not the old one.
  • keywords.txt is generated so should not be edited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants