If you look into the processing 4 GitHub repo, you can find the source file where it throws an error :
~/Downloads/processing4 master grep -n -R "PImage type"
core/src/processing/core/PImage.java:492: throw new RuntimeException("resize() not implemented for this PImage type");
Which leads to :
/**
*
* Resize the image to a new width and height. To make the image scale
* proportionally, use 0 as the value for the <b>wide</b> or <b>high</b>
* parameter. For instance, to make the width of an image 150 pixels, and
* change the height using the same proportion, use resize(150, 0).<br />
* <br />
* Even though a PGraphics is technically a PImage, it is not possible to
* rescale the image data found in a PGraphics. (It's simply not possible
* to do this consistently across renderers: technically infeasible with
* P3D, or what would it even do with PDF?) If you want to resize PGraphics
* content, first get a copy of its image data using the <b>get()</b>
* method, and call <b>resize()</b> on the PImage that is returned.
*
* @webref pimage:method
* @webBrief Resize the image to a new width and height.
* @usage web_application
* @param w the resized image width
* @param h the resized image height
* @see PImage#get(int, int, int, int)
*/
public void resize(int w, int h) { // ignore
throw new RuntimeException("resize() not implemented for this PImage type");
}
It explains clearly why you can’t resize PGraphics. But it’s strange because it’s in the PImage source file…
You should open an issue on GitHub maybe it’s a mistake