Skip to content

RGB image created with “createImage()" has alpha channel. #388

@processing-bot

Description

@processing-bot

Created by: ertdfgcvb

Description

Images created with createImage(w, h, RGB) have an alpha channel.
The alpha channel is filled with 0 once a single pixel is set.

Expected Behavior

RGB images should be opaque (?).

Current Behavior

A newly created RGB image has all pixels in black but once a single pixel is changed trough the set() method the alpha channel is zeroed out (?) for all other pixels.

Steps to Reproduce

PImage a = createImage(10, 10, RGB);
// Uncomment below for a different result!
//image(a, 5, 5); 
a.set(0, 0, color(255,0,0));
image(a, 20, 5);

Your Environment

  • Processing version: 4.0b3
  • Operating System and OS version: MacOS 10.15.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions