processing / processing/processing4

PGraphics saves fully transparent instead of red (P2D)

Open
#737 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted opengl
Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Created by: clankill3r

Processing 4.2, OSX 10.15.7

void setup() {
  size(600, 600, P2D);
  PGraphics pg = createGraphics(64, 64, P2D);
  pg.beginDraw();
  pg.background(255, 0, 0);
  pg.endDraw();

  image(pg, 0, 0);

  pg.save("bug.png");
}

It should save a red image, but it's fully transparent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Processing 4.2 example using PGraphics with the P2D renderer on the reported macOS setup, then trace the PGraphics save path. The fix is complete when pg.save("bug.png") produces the expected red, non-transparent image; add or run a regression test if the relevant test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.