# Adding an image to shape?

**URL:** <https://discourse.processing.org/t/adding-an-image-to-shape/21105>\
**Category:** Beginners\
**Created:** [May 20, 2020, 5:46pm UTC](https://discourse.processing.org/t/adding-an-image-to-shape/21105 "2020-05-20T17:46:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkk16](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@rkk16](https://discourse.processing.org/u/rkk16)\
**Post date:** [May 20, 2020, 5:46pm UTC](https://discourse.processing.org/t/adding-an-image-to-shape/21105/1 "2020-05-20T17:46:10Z")

</div>

How do you add a background for a shape? ie instead of filling a circle with a colour, fill it with an image?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [May 20, 2020, 8:51pm UTC](https://discourse.processing.org/t/adding-an-image-to-shape/21105/2 "2020-05-20T20:51:13Z")

</div>

[Processing.org/reference/texture\_.html](http://Processing.org/reference/texture_.html)

---

<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:** [May 20, 2020, 9:54pm UTC](https://discourse.processing.org/t/adding-an-image-to-shape/21105/3 "2020-05-20T21:54:02Z")

</div>

Hello,

An example of masking here:  
[https://forum.processing.org/one/topic/image-into-shapes.html](https://forum.processing.org/one/topic/image-into-shapes.html)

Note: remove the P2D from line 7.

`:)`

I had some fun with this:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/d4fd718f9a6f939d3bd66da239f0494894c45d12.jpeg)
