Closed
Description
Created by: clankill3r
Processing 4.2
OSX 10.15.7
When using a background value highter then the color range when recording a pdf, a NullPointerException is thrown:
import processing.pdf.PGraphicsPDF;
void settings() {
size(1024, 768);
}
public void setup() {
beginRecord(PDF, "output/cover.pdf");
colorMode(RGB, 1);
background(255);
endRecord();
}
It happens in PGraphicsJava2D on the last line shown here:
// BACKGROUND
int[] clearPixels;
protected void clearPixels(int color) {
// On a hi-res display, image may be larger than width/height
int imageWidth = image.getWidth(null);
In some way, it might not be a bug but a mistake by the user for exceeding the range, but yet I feel like it might be a bug as well...
Metadata
Metadata
Assignees
Labels
No labels