Extra blue line when saving portion of the background with PImage::save() using OPENGL mode
in
Core Library Questions
•
1 year ago
I have a sketch that spans 2 screens with the size of 3286 x 1080 pixels with following break-outs:
1. Screen 1 : 1920 x 1080 px
2. Screen 2 : 1366 x 768 px
When the app runs, it will display a background that is the same size as the sketch. The sketch would then save a portion of the image into a file. My problem is in the output file, there's a visible blue line which seems to come out of nowhere. Here's my sketch with unrelated code removed:
import processing.opengl.*;
PImage bg;
- void setup() {
- size(3286, 1080, OPENGL);
- frameRate(30);
- bg = loadImage("bg.png");
- }
- void draw() {
- background(bg);
- PImage noteImg = get(2309, 138, 589, 538);
- String filename = "test.png";
- noteImg.save(savePath("data/" + filename));
- noLoop();
- }
Here's the bg image:
And here's the output image:
When I change the rendering mode to other than OPENGL, the blue line is gone. But on my first screen, where images rotates (25 in total), they become laggy.
And also, when using OPENGL mode, the get(x, y, height, width) seems to be off, it gets the area of much lower part of the background which doesn't happen when I use JAVA2D, P2D and P3D.
Any thought or advice?
1