# Creategraphics as an image

**URL:** <https://discourse.processing.org/t/creategraphics-as-an-image/4375>\
**Category:** Coding Questions\
**Created:** [October 11, 2018, 8:10pm UTC](https://discourse.processing.org/t/creategraphics-as-an-image/4375 "2018-10-11T20:10:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristencostello1](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@kristencostello1](https://discourse.processing.org/u/kristencostello1)\
**Post date:** [October 11, 2018, 8:10pm UTC](https://discourse.processing.org/t/creategraphics-as-an-image/4375/1 "2018-10-11T20:10:16Z")

</div>

Hi, I combined a bunch of image files using creategraphics and .image to make a “pgraphics” (or whatever p5 calls a processing pgraphic… maybe it’s called p5.Renderer?) that has all of the images in one pgraphic. I’d like to use the dom library to copy that combined pgraphic into the HTML of my page. Is this possible?

Basically my code is building a big image combined of several other images, and I want to save the combined image that I created in p5 back to the HTML page that is holding the p5 script.

Thanks!!

---

<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:** [October 11, 2018, 8:17pm UTC](https://discourse.processing.org/t/creategraphics-as-an-image/4375/2 "2018-10-11T20:17:36Z")

</div>

> [@kristencostello1](#):
>
> I want to save the combined image that I created in p5 back to the HTML page that is holding the p5 script.

What do you mean by “back to HTML”? Is it turning the p5.Renderer into a regular HTMLElement? 🤔

You need to explain it much clearer. 😕

---

<div class="post-metadata">

**Author:** ![kristencostello1](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@kristencostello1](https://discourse.processing.org/u/kristencostello1)\
**Post date:** [October 12, 2018, 4:08am UTC](https://discourse.processing.org/t/creategraphics-as-an-image/4375/3 "2018-10-12T04:08:10Z")

</div>

Yes that is exactly what we want to do! I want to save my big image (combined of a smaller images) and save all of the big images so that they can be placed into my HTML. We aren’t sure how to save these files.

---

<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:** [October 12, 2018, 4:21am UTC](https://discourse.processing.org/t/creategraphics-as-an-image/4375/4 "2018-10-12T04:21:58Z")

</div>

> [@kristencostello1](#):
>
> … and save all of the big images so that they can be placed into my HTML.

But save got nothing to do about placing an element inside HTML. Still confused! 💫

Can you provide your current attempt? 🤠

---

<div class="post-metadata">

**Author:** ![kristencostello1](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@kristencostello1](https://discourse.processing.org/u/kristencostello1)\
**Post date:** [October 12, 2018, 12:19pm UTC](https://discourse.processing.org/t/creategraphics-as-an-image/4375/5 "2018-10-12T12:19:48Z")

</div>

[https://editor.p5js.org/kristencostello/sketches/r1Dwil6cQ](https://editor.p5js.org/kristencostello/sketches/r1Dwil6cQ)
