# PImage object from current sketch state

**URL:** <https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433>\
**Category:** Beginners\
**Created:** [May 30, 2020, 6:59pm UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433 "2020-05-30T18:59:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arcadeperfect](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Post date:** [May 30, 2020, 6:59pm UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433/1 "2020-05-30T18:59:02Z")

</div>

Hi,  
Can I create a PImage object from the pixels in the sketch rather than by loading an image from disk?

Thanks

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [May 31, 2020, 1:42am UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433/2 "2020-05-31T01:42:48Z")

</div>

Yes. This is exactly what get() without any arguments returns.

---

<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 31, 2020, 8:12am UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433/3 "2020-05-31T08:12:38Z")

</div>

> **[r/processing - PImage from sketch](https://www.reddit.com/r/processing/comments/gtjlsf/pimage_from_sketch/)**
>
> 2 votes and 3 comments so far on Reddit

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [May 31, 2020, 2:30pm UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433/4 "2020-05-31T14:30:06Z")

</div>

> [@Spam attacks on this forum](https://discourse.processing.org/t/spam-attacks-on-this-forum/20646):
>
> Currently we are starting to get a new kind of attack from spambots (or spam posting humans). The spammer creates a new account, then copy-pastes a programming question from Reddit r/Processing. They then return many hours or days later and edit ad links or malware links into their original posts. Our spam filters aren’t catching this – and of course we aren’t either, responding to these (legitimate) reddit questions with full answers. I’m opening this community thread to let people know, and…

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 1, 2020, 3:26am UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433/5 "2020-06-01T03:26:58Z")

</div>

In this case this was just cross-posting, I believe, not bot.
