PImage resize larger
in
Programming Questions
•
9 months ago
Hello,
I'm just trying to use the resize function on a PImage, and it seems that this function don't work if you get greater parameter than the PImage original size (to get a larger image). I knon that i can do this by an another way, but i just want to know is this issue is "normal".
Here is my code, form the natives examples (the original size image "
moonwalk.jpg" is 640x480).
- /**
- * Load and Display
- *
- * Images can be loaded and displayed to the screen at their actual size
- * or any other size.
- */
- // The next line is needed if running in JavaScript Mode with Processing.js
- /* @pjs preload="moonwalk.jpg"; */
- PImage img; // Declare variable "a" of type PImage
- void setup() {
- size(800, 600);
- // The image file must be in the data folder of the current sketch
- // to load successfully
- img = loadImage("moonwalk.jpg"); // Load the image into the program
- img.resize(800,0);
- }
- void draw() {
- // Displays the image at its actual size at point (0,0)
- image(img, 0, 0);
- }
And happy new year :D
Edit : BTW this work on 1.5, but didn't on 2.0
Edit 2 : The issue is known : http://code.google.com/p/processing/issues/detail?id=1463, we have to wait for the new release :)
1