# Bug related to PImage::copy() of images with transparency?

**URL:** <https://discourse.processing.org/t/bug-related-to-pimage-copy-of-images-with-transparency/34536>\
**Category:** Libraries\
**Created:** [January 9, 2022, 1:31pm UTC](https://discourse.processing.org/t/bug-related-to-pimage-copy-of-images-with-transparency/34536 "2022-01-09T13:31:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 9, 2022, 2:13pm UTC](https://discourse.processing.org/t/bug-related-to-pimage-copy-of-images-with-transparency/34536/2 "2022-01-09T14:13:21Z")

</div>

Hello @yodan,

This is a related topic:

> [@Alpha of Zero in first pixel makes whole image opaque](https://discourse.processing.org/t/alpha-of-zero-in-first-pixel-makes-whole-image-opaque/32400):
>
> When I use an image as a background, then set the alpha values for all pixels in a second image to something low, then draw that image, I can see “through” the second image to the background, just as I would expect. Here, the mandrill is the second image, with alpha set to 0x40 for every pixel: If I set alpha to 0x00 for the very first pixel, the entire mandrill becomes opaque: I’m using Processing 3.5.4. Here’s my code: PImage imgFace; PImage imgMandrill; …

[https://processing.org/reference/PImage\_copy\_.html](https://processing.org/reference/PImage_copy_.html) states:

> No alpha information is used in the process, however if the source image has an alpha channel set, it will be copied as well.

Another topic that is related:  
[https://discourse.processing.org/t/pixel-processing-grabbing-the-canvas-and-wheres-the-alpha/7162](https://discourse.processing.org/t/pixel-processing-grabbing-the-canvas-and-wheres-the-alpha/7162)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/bug-related-to-pimage-copy-of-images-with-transparency/34536)._
