# What is the purpose of the resize() method in PGraphics if it doesn't work?

**URL:** <https://discourse.processing.org/t/what-is-the-purpose-of-the-resize-method-in-pgraphics-if-it-doesnt-work/46660>\
**Category:** Processing\
**Created:** [July 4, 2025, 11:11am UTC](https://discourse.processing.org/t/what-is-the-purpose-of-the-resize-method-in-pgraphics-if-it-doesnt-work/46660 "2025-07-04T11:11:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [July 4, 2025, 11:11am UTC](https://discourse.processing.org/t/what-is-the-purpose-of-the-resize-method-in-pgraphics-if-it-doesnt-work/46660/1 "2025-07-04T11:11:49Z")

</div>

maybe it depends on the version? or it didn’t work from the start?

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [July 4, 2025, 11:34am UTC](https://discourse.processing.org/t/what-is-the-purpose-of-the-resize-method-in-pgraphics-if-it-doesnt-work/46660/2 "2025-07-04T11:34:39Z")

</div>

The reference to the [resize](https://processing.org/reference/PImage_resize_.html) method why it doesn’t work. The alternative is to create a Pimage form it first like this

```auto
Pimage img = pg.get(); // where pg is a PGraphics object
img.resize(pg.width/2, pg.height/2); // 50% original size

```

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [July 4, 2025, 12:28pm UTC](https://discourse.processing.org/t/what-is-the-purpose-of-the-resize-method-in-pgraphics-if-it-doesnt-work/46660/3 "2025-07-04T12:28:30Z")

</div>

yes, I know it makes sense for PImage and it works.  
but this method is also available for PGraphics itself

---

<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:** [July 4, 2025, 1:37pm UTC](https://discourse.processing.org/t/what-is-the-purpose-of-the-resize-method-in-pgraphics-if-it-doesnt-work/46660/4 "2025-07-04T13:37:15Z")

</div>

> [@aiapps](#):
>
> but this method is also available for PGraphics itself

**“Follow the white rabbit.”**  
— _Alice in Wonderland_ & _Morpheus in The Matrix_

Source code has a comment about this:

> <https://github.com/processing/processing/blob/master/core%2Fsrc%2Fprocessing%2Fcore%2FPGraphics.java#L113>

`:)`
