rotate image offscreen
in
Core Library Questions
•
5 months ago
hi,
i would like to rotate an image offscreen (as in the background) and save it.
i tried the following:
- size(640, 480);
- PGraphics printerImage;
- PImage img = loadImage("shot0.jpg");
- printerImage = createGraphics(img.width, img.height);
- printerImage.beginDraw();
- printerImage.image(img, 0, 0);
- printerImage.rotate(radians(90));
- // printerImage.updatePixels();
- printerImage.endDraw();
- img = printerImage.get();
- String path = savePath("shots/bpmRotated.jpg");
- printerImage.save(path);
however, the saved image is not rotated. nor are any errors thrown.
any ideas?
thanks for any help!
jns
1