-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
PImage.resize() not implemented in Processing 4?? #200
Comments
Created by: behreajj If you want to write one for yourself, it depends on what kind of algorithm you want to use (bicubic, bilinear, nearest neighbor). After reading this Stack Overflow discussion, I wrote this Processing code for my own use. Like the README says, functions that rely on AWT are being shifted around.
Whether this version of resize is called depends on which renderer you use and whether you use
|
Created by: benfry If you're using Can you share an example that causes this problem? |
Created by: behreajj void setup() {
size(256, 256, JAVA2D);
PImage img = createImage(256, 256, ARGB);
println(img.getClass());
img.resize(256, 128);
} |
Created by: jordirosa-p5 In my case, the image I need to resize is one I create by calling The visual effect i get from my app to create a nice blurry effect totally depends on the last lines in my
|
Created by: benfry Perfect, thanks both. |
Created by: jordirosa-p5 Thank you! |
Created by: benfry Fixed for 4.0 alpha 4. |
Created by: github-actions[bot] This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs. |
Created by: jordirosa-p5
Description
The resize method for the PImage class is not implemented (yet?).
Expected Behavior
PImage.resize() has always worked, resizing the image to the size provided. Code made using previous versions stops working, the documentation in the processing reference web shows resize() as a usable method, though.
Current Behavior
Attempting to using the resize method on a PImage throws an exception, and looking at the Processing 4 code is easy to see why it's throwing it:
public void resize(int w, int h) { // ignore
throw new RuntimeException("resize() not implemented for this PImage type");
}
Steps to Reproduce
Your Environment
Possible Causes / Solutions
Is this method going to be implemented in Processing 4?
The text was updated successfully, but these errors were encountered: