# Problems with loadImage("ran.png"); in processing 4.02a

**URL:** <https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652>\
**Category:** Coding Questions\
**Created:** [October 16, 2020, 10:42pm UTC](https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652 "2020-10-16T22:42:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![x13420x](https://avatars.discourse-cdn.com/v4/letter/x/ecc23a/32.png) [@x13420x](https://discourse.processing.org/u/x13420x)\
**Post date:** [October 16, 2020, 10:42pm UTC](https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652/1 "2020-10-16T22:42:09Z")

</div>

\<PImage paint;  
paint = loadImage(“ericarose.png”); \>

getting back a null pointer exception

> **[processing/processing4](https://github.com/processing/processing4/wiki/Exorcising-AWT)**
>
> Processing 4.x releases (currently in “alpha”) that use Java 11 - processing/processing4

worked fine in 4.01a

---

<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:** [October 16, 2020, 11:11pm UTC](https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652/3 "2020-10-16T23:11:33Z")

</div>

Your subject says “processing 4.02a”.

No issues here with Processing 4.0a2.

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

`:)`

---

<div class="post-metadata">

**Author:** ![x13420x](https://avatars.discourse-cdn.com/v4/letter/x/ecc23a/32.png) [@x13420x](https://discourse.processing.org/u/x13420x)\
**Post date:** [October 17, 2020, 3:25pm UTC](https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652/4 "2020-10-17T15:25:38Z")

</div>

So yeah the problem is with settings… I will report the bug

```auto
PImage paint;

void settings(){
//selectInput("Please select canvas:", "selectImage");

//interrupt();
paint = loadImage("ericarose.png"); 
size(paint.width, paint.height);
noSmooth();}

void setup(){

image(paint,0,0);
background(paint);}
void draw(){}

```

---

<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:** [October 17, 2020, 6:19pm UTC](https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652/5 "2020-10-17T18:19:43Z")

</div>

For Processing 3.54 the reference for settings() discusses this:

_[https://processing.org/reference/settings\_.html](https://processing.org/reference/settings_.html)_

This may help if you want to resize the image to use as a background:

_[https://processing.org/reference/PImage\_resize\_.html](https://processing.org/reference/PImage_resize_.html)_

`:)`

---

<div class="post-metadata">

**Author:** ![x13420x](https://avatars.discourse-cdn.com/v4/letter/x/ecc23a/32.png) [@x13420x](https://discourse.processing.org/u/x13420x)\
**Post date:** [October 18, 2020, 1:12am UTC](https://discourse.processing.org/t/problems-with-loadimage-ran-png-in-processing-4-02a/24652/6 "2020-10-18T01:12:56Z")

</div>

yeah but I want the user to define the image and then to manipulate the image at the pixel level so that wont work…thank you for taking the time to respond
